Lora terminal device network access method, device, terminal device, system and storage medium
By pre-burning device information in Lora terminal equipment and automatically generating network access requests, the problem of low network access efficiency in the existing technology is solved, and automatic network access and efficiency improvement are achieved.
Patent Information
- Application Number
- CN202210319654.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-03-29
AI Technical Summary
The existing network access method of Lora terminal equipment is inefficient. Users need to manually obtain and enter device information, making the network access process cumbersome and time-consuming.
Pre-burn device information in the terminal device, automatically generate and send network access requests when a network access trigger event is detected, and generate application keys through the gateway and server to achieve automatic network access, reduce the amount of pre-stored information on the server, and improve network access efficiency.
It realizes automatic network access of terminal equipment, improves network access efficiency, and reduces server operating load and user manual operation time.
Smart Images

Figure CN114786238B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of Internet of Things technology, and in particular to a method, apparatus, terminal device, system and storage medium for accessing a Lora terminal device to the network. Background Art
[0002] As people's living standards improve, more and more families use heat pump unit smart home Lora terminal devices, such as water heaters, air conditioners or floor heating, etc. Smart home terminal devices need to be connected to the network when they are powered on for the first time.
[0003] There are currently two main ways to join the network, namely OTAA (Over-The-Air Activation) and ABP (Activation By Personalization). Among them, OTAA configures the same ternary information (DevEUI (device unique identifier), AppEUI (application identifier), AppKEY (application key)) in advance on the device side and the server side. The device sends a network joining request, and the server verifies the ternary information after receiving it. After the verification is successful, the device and the server will get the same DevAddr (short address), NwkSKey (network session key), and AppSKey (application session key). ABP configures the same session address and key information DevAddr (short address), NwkSKey (network session key), and AppSKey (application session key) on the device side and the server, and there is no need to go through the network joining process.
[0004] The ABP method configures session key information, etc. The key is passed to the device and network server in plain text. Once the information is leaked, the communication data can be monitored and decrypted. The OTAA network access method only configures DevEUI (device unique identifier), AppEUI (application identifier), and AppKEY (application key) on the device and server sides. The data communication uses the key and other information dynamically generated when joining the network, and each time the network is joined, different session information and other parameters are dynamically allocated. Therefore, if the pre-configured information is leaked, the communication data cannot be decrypted. The data security is relatively high, so OTAA is currently the mainstream network access method.
[0005] In the existing OTAA network access method, users need to obtain the ternary information (DevEUI (device unique identifier), AppEUI (application identifier), AppKEY (application secret key)) in advance before the network access operation. In order to ensure the security performance of the terminal device, the manufacturer generally provides the ternary information (DevEUI (device unique identifier), AppEUI (application identifier), AppKEY (application secret key)) to the user when the terminal device needs to access the network. This method of network access is more troublesome and the network access efficiency is low. Summary of the invention
[0006] The embodiments of the present application provide a Lora terminal device network access method, apparatus, terminal device, system and storage medium, which can solve the problem of low network access efficiency of Lora terminal devices and improve the network access efficiency of Lora terminal devices.
[0007] In a first aspect, an embodiment of the present application provides a Lora terminal device network access method, which is used for a terminal device, including:
[0008] Confirm that a network access triggering event is detected;
[0009] In response to the network access triggering event, first device information is read from the terminal device according to a preset access rule, wherein the first device information includes an application identifier and specific parameters pre-burned in the terminal device, and a device unique identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters;
[0010] Sending a first network access request to a gateway, wherein the first network access request includes first device information, the gateway is used to generate an application key according to an application identifier and a device unique identification code in the first device information, and generate a second network access request according to the first device information and the application key, sending the second network access request to a first server and a second server, and receiving a network access permission fed back by the first server for the second network access request and cloud access information fed back by the second server for the second network access request;
[0011] Receive the network access permission and the cloud access information fed back by the gateway to complete the network access, wherein the cloud access information includes the device name, product name and device key.
[0012] Further, the receiving the network access permission and the cloud access information fed back by the gateway includes:
[0013] Receive the network access permission and the cloud access information fed back by the gateway, the gateway is used to receive the network access permission generated by the first server after the first device information is successfully matched with the pre-stored information, and receive the cloud access information generated by the second server after the first device information is successfully matched with the pre-stored information.
[0014] Further, the receiving the network access permission and the cloud access information fed back by the gateway includes:
[0015] Receive the network access permission and the cloud access information fed back by the gateway, the gateway being used to receive the network access permission generated by the first server after creating server-side device information according to the first device information after a match between the first device information and the pre-stored information fails, and receive the cloud access information generated by the second server after creating server-side device information according to the first device information after a match between the first device information and the pre-stored information fails.
[0016] Furthermore, after completing the network access, the following steps are included:
[0017] Establish communication with the third server according to the cloud information.
[0018] Further, after establishing communication with the third server according to the cloud information, the method further includes:
[0019] Encrypting the first data information to obtain second data information, wherein the first data information includes working status data information of the terminal device;
[0020] The second data information is sent to the gateway, the gateway is used to send the second data information to the first server, the first server is used to parse the second data information and obtain the third data information and send it to the gateway, the gateway is also used to send the third data information to the third server, and the third server is used to send the third data information to the second server.
[0021] In a second aspect, an embodiment of the present application provides a Lora terminal device network access device, including:
[0022] A trigger detection module, used to confirm that a network access trigger event has been detected;
[0023] A network access response module, configured to respond to the network access trigger event and read first device information from the terminal device according to a preset access rule, wherein the first device information includes an application identifier and specific parameters pre-burned in the terminal device, and a device unique identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters;
[0024] A network access request module, configured to send a first network access request to a gateway, wherein the first network access request includes first device information, the gateway is configured to generate the application key according to the application identifier and the device unique identification code in the first device information, and generate a second network access request according to the first device information and the application key, send the second network access request to the first server and the second server, and receive the network access permission fed back by the first server for the second network access request and the cloud access information fed back by the second server for the second network access request;
[0025] The data receiving module is used to receive the network access permission and the cloud information fed back by the gateway to complete the network access, wherein the cloud information includes the device name, product name and device key.
[0026] Furthermore, the data receiving module is also used to receive the network access permission and the cloud information, and the gateway is used to receive the network access permission generated by the first server after a successful match between the first device information and the pre-stored information, and to receive the cloud information generated by the second server after a successful match between the first device information and the pre-stored information.
[0027] Furthermore, the data receiving module is also used to receive the network access permission and the cloud access information fed back by the gateway, and the gateway is used to receive the network access permission generated by the first server after creating the server-side device information according to the first device information after unsuccessful matching of the first device information with the pre-stored information, and receive the cloud access information generated by the second server after creating the server-side device information according to the first device information after unsuccessful matching of the first device information with the pre-stored information.
[0028] Furthermore, the device also includes a communication module;
[0029] The communication module is used to establish communication with the third server according to the cloud information.
[0030] Furthermore, the communication module is further used to encrypt the first data information to obtain second data information, wherein the first data information includes the working status data information of the terminal device;
[0031] The second data information is sent to the gateway, the gateway is used to send the second data information to the first server, the first server is used to parse the second data information and obtain the third data information and send it to the gateway, the gateway is also used to send the third data information to the third server, and the third server is used to send the third data information to the second server.
[0032] In a third aspect, an embodiment of the present application provides a Lora terminal device network access system, including:
[0033] The terminal device is used to determine that a network access triggering event is detected;
[0034] In response to the network access triggering event, first device information is read from the terminal device according to a preset access rule, wherein the first device information includes an application identifier and specific parameters pre-burned in the terminal device, and a device unique identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters;
[0035] Sending a first network access request to a gateway, wherein the first network access request includes the first device information;
[0036] Receive the network access permission and cloud access information fed back by the gateway to complete the network access, wherein the cloud access information includes the device name, product name and device key;
[0037] Establishing communication with a third server according to the cloud information;
[0038] a gateway, configured to receive the first network access request, generate an application key according to the application identifier and the device unique identification code in the first device information, generate a second network access request according to the first device information and the application key, and send the second network access request to the first server and the second server;
[0039] receiving a network access permission fed back by the first server in response to the second network access request and the cloud access information fed back by the second server in response to the second network access request;
[0040] Feedback the network access permission and the cloud access information to the corresponding terminal device;
[0041] A first server, configured to receive the second network access request;
[0042] According to the second network access request, matching the first device information with pre-stored information;
[0043] If the first device information matches the pre-stored information successfully, a network access permit is generated;
[0044] If the first device information fails to match the pre-stored information, after creating the server device information according to the first device information, a network access permit is generated;
[0045] Feedback the network access permission to the gateway;
[0046] A second server, configured to receive the second network access request;
[0047] According to the second network access request, matching the first device information with pre-stored information;
[0048] If the first device information matches the pre-stored information successfully, cloud information is generated;
[0049] If the first device information fails to match the pre-stored information, after creating the server device information according to the first device information, the cloud information is generated;
[0050] Feedback the cloud information to the gateway;
[0051] Furthermore, the system also includes a third server;
[0052] The third server is used to establish communication with the gateway according to the cloud information.
[0053] Furthermore, the terminal device is further used to encrypt the first data information to obtain second data information, wherein the first data information includes the working status data information of the terminal device;
[0054] Sending the second data information to the gateway;
[0055] The gateway is further configured to send the second data information to the first server;
[0056] The first server is further configured to send third data information obtained by parsing the second data information to the gateway;
[0057] The gateway is further used to send the third data information to the third server;
[0058] The third server is further configured to send the third data information to the second server.
[0059] In a fourth aspect, an embodiment of the present application provides a Lora terminal device, including:
[0060] memory and one or more processors;
[0061] The memory is used to store one or more programs;
[0062] When the one or more programs are executed by the one or more processors, the one or more processors implement the Lora terminal device network access method as described in the first aspect.
[0063] In a fifth aspect, an embodiment of the present application provides a storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute the Lora terminal device network access method as described in the first aspect.
[0064] The terminal device of the embodiment of the present application determines that a network access trigger event is detected, corresponds to the network access trigger event, and reads the first device information from the terminal device according to the preset access rules, wherein the first device information includes the application identifier and specific parameters pre-burned in the terminal device, and the device unique identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters, and sends a first network access request to the gateway, wherein the first network access request includes the first device information, and the gateway is used to generate an application key according to the application identifier and the device unique identification code in the first device information, and generate a second network access request according to the first device information and the application key, send the second network access request to the first server and the second server, and receive the network access permission fed back by the first server for the second network access request and the cloud information fed back by the second server for the second network access request; receive the network access permission and cloud information fed back by the gateway to complete the network access, wherein the cloud information includes the device name, product name and device key. By adopting the above-mentioned technical means, the device information can be pre-burned in the terminal device, so that there is no need to contact the manufacturer to obtain the corresponding device information when joining the network, so that the terminal device can automatically join the network when the network access trigger event is met, thereby improving the degree of automation of the terminal device joining the network and improving the efficiency of joining the network. In addition, by having multiple terminal devices of the same series correspond to the same application identifier and specific parameters, it is possible to achieve that multiple terminal devices of the same series share the same application identifier and specific parameters, so that when multiple terminal devices of the same series join the network, the server can use the same set of pre-stored information for matching verification when matching the network access device information, avoiding the situation where different terminal devices of the same series need to match with different sets of pre-stored information, thereby reducing the amount of pre-stored information in the server, thereby improving the server operation speed and improving the efficiency of joining the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 This is a flow chart of a method for Lora terminal device to access the network provided by an embodiment of the present application;
[0066] Figure 2 This is a schematic diagram of the connection between the terminal device and the server provided in the embodiment of the present application;
[0067] Figure 3 It is a structural diagram of a Lora terminal device network access device provided in an embodiment of the present application;
[0068] Figure 4 It is a structural diagram of a Lora terminal device network access system provided in an embodiment of the present application;
[0069] Figure 5It is a structural diagram of a Lora terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only part of the present application is shown in the accompanying drawings, but not all of the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0071] The Lora terminal device network access method, device, equipment, system and storage medium provided in the present application are intended to improve the network access efficiency by burning the device information in the terminal device when the Lora terminal device is connected to the network, and automatically connecting to the network through the device information when the network access event is triggered. In addition, by having multiple terminal devices of the same series correspond to the same application identifier and specific parameters, the amount of pre-stored information on the server can be reduced, the operating speed can be improved, and the network access efficiency can be improved. Compared with the traditional Lora terminal device network access method, it usually obtains device information from the manufacturer when connecting to the network, and the user manually enters the corresponding device information to send a network access request, which requires a lot of manpower and material resources, and needs to contact the manufacturer to provide information, which is more troublesome, resulting in low network access efficiency. Based on this, a Lora terminal device network access method according to an embodiment of the present application is provided to solve the problem of low network access efficiency of existing Lora terminal devices.
[0072] Figure 1 A flowchart of a Lora terminal device access method provided in an embodiment of the present application is given. The Lora terminal device access method provided in this embodiment can be executed by a Lora terminal device, which can be implemented by software and / or hardware. The Lora terminal device can be composed of two or more physical entities or one physical entity. Generally speaking, the Lora terminal device can be a smart home device, such as a water heater, air conditioner, or floor heating.
[0073] The following description takes a smart home device as an example of the main body of the Lora terminal device network access method. Figure 2This is a schematic diagram of the connection between the terminal device and the server provided in the embodiment of the present application, referring to Figure 1 and Figure 2 The Lora terminal device network access method specifically includes:
[0074] S101: Confirm that a network access triggering event is detected.
[0075] Smart home devices such as water heaters, air conditioners or floor heating need to be connected to the network after the first power-on in order to establish communication with the server 13 to achieve intelligent control. The network access trigger event can be a preset terminal device 11 that automatically triggers the network access trigger event after the first power-on, or it can be a corresponding physical button / virtual button that needs to be manually triggered to trigger the network access trigger event after the first power-on of the terminal device 11. The terminal device 11 detects the network access trigger event signal in real time after the first power-on, and when the network access trigger event signal is detected, it is determined that the network access trigger event occurs.
[0076] S102. In response to the network access triggering event, first device information is read from the terminal device according to preset access rules, wherein the first device information includes an application identifier and specific parameters pre-burned in the terminal device, and a unique device identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters.
[0077] The terminal device 11 is pre-burned with device information during production, and the application identifier (AppEUI) and specific parameters are burned into the terminal device 11. Among them, multiple terminal devices 11 of the same series correspond to the same application identifier and specific parameters. The application identifier (AppEUI) and specific parameters may be pre-burned into the Lora communication module of the terminal device 11. The corresponding pre-stored information is also entered in advance in the server 13, and the pre-stored information includes the application identifier (AppEUI) and specific parameters of the terminal device 11.
[0078] When a network access triggering event of the terminal device 11 is detected, the pre-burned application identifier (AppEUI) and specific parameters are obtained from the terminal device 11 according to the preset access rules, and the application identifier (AppEUI) and specific parameters of the terminal device 11 and the device unique identification code (DevEUI) are packaged to generate the first device information, and the network access request data packet is obtained in combination with the network access request instruction.
[0079] S103. Send a first network access request to a gateway, wherein the first network access request includes first device information, the gateway is used to generate an application key according to an application identifier and a device unique identification code in the first device information, and generate a second network access request according to the first device information and the application key, send the second network access request to a first server and a second server, and receive a network access permission fed back by the first server for the second network access request and cloud access information fed back by the second server for the second network access request.
[0080] Reference Figure 2 , the terminal device 11 sends a first network access request to the gateway 12, wherein the first network access request includes the first device information, and the first device information includes the application identifier (AppEUI) and the specific parameters pre-burned in the terminal device 11, and the device unique identifier (DevEUI) generated by the terminal device 11. The gateway 12 is used to generate the application key (AppKEY) according to the application identifier (AppEUI) and the device unique identifier (DevEUI) in the first device information, and generate a second network access request according to the application identifier (AppEUI), the specific parameters, the device unique identifier (DevEUI) and the application key (AppKEY) in the first device information, send the second network access request to the first server 131 and the second server 132, and receive the network access permission fed back by the first server 131 for the second network access request and the cloud access information fed back by the second server 132 for the second network access request. The terminal device 11 receives the network access permission and the cloud access information fed back by the gateway 12.
[0081] S104. Receive the network access permission and the cloud access information fed back by the gateway to complete the network access, wherein the cloud access information includes the device name, product name, and device key.
[0082] Receive the cloud access information and network access permission generated by the server 13 after the first device information is successfully matched with the pre-stored information. Receive the cloud access information and network access permission generated by the server 13 after the server 13 creates the server-side device information according to the first device information after the first device information is unsuccessfully matched with the pre-stored information. When the first device information sent by the terminal device 11 fails to match the pre-stored information in the server 13, the server-side device information is created through the first device information to create the terminal device 11 in the server 13, so as to avoid the situation where the pre-stored information pre-entered by the server 13 is incorrect, resulting in an application identifier (AppEUI), which causes the terminal device 11 to fail to access the network.
[0083] In one embodiment, the server 13 obtains the application identifier (AppEUI) and specific parameters in the received second network access request, and matches the application identifier (AppEUI) and specific parameters obtained from the second network access request with the application identifier (AppEUI) and specific parameters in the pre-stored information. If the application identifier (AppEUI) and specific parameters obtained from the second network access request match the application identifier (AppEUI) and specific parameters in the pre-stored information, cloud information and network access permission are generated, wherein the cloud information includes the device name (deviceName), the product name (product) and the device key (deviceSecret), and the cloud information and network access permission are fed back to the terminal device 11. If the application identifier (AppEUI) and specific parameters obtained from the second network access request do not match the application identifier (AppEUI) and specific parameters in the pre-stored information, it proves that the pre-stored information corresponding to the terminal device 11 has not been created in the server 13, so it is necessary to create the pre-stored information of the terminal device 11 in the server 13, and create the server-side device information according to the application identifier (AppEUI), specific parameters, device unique identification code (DevEUI) and application key (AppKEY) obtained from the second network access request, and the server-side device information includes the application identifier (AppEUI), specific parameters, device unique identification code (DevEUI) and application key (AppKEY) that are the same as the application identifier (AppEUI), specific parameters, device unique identification code (DevEUI) and application key (AppKEY) obtained in the network access request. Based on the created server-side device information, the cloud information and network access permission are generated, and the cloud information and network access permission are fed back to the terminal device 11. The server-side device information includes an application identifier (AppEUI), specific parameters, a device unique identifier (DevEUI) and an application key (AppKEY).
[0084] In one embodiment, referring to Figure 2 The Lora terminal device 11 network access method also includes:
[0085] S201 . The terminal device 11 sends a first network access request to the gateway 12 . The first network access request includes an application identifier (AppEUI), specific parameters, and a device unique identifier (DevEUI).
[0086] S202, the gateway 12 generates an application key (AppKEY) according to the application identifier (AppEUI) and the device unique identifier (DevEUI) in the first network access request, and generates a second network access request according to the application identifier (AppEUI), specific parameters, the device unique identifier (DevEUI) and the application key (AppKEY), and sends the second network access request to the first server 131, wherein the first server 131 can be a Lora server.
[0087] The first server 131 receives the second network access request, and obtains the application identifier (AppEUI) and specific parameters in the second network access request, and matches the application identifier (AppEUI) and specific parameters obtained from the second network access request with the application identifier (AppEUI) and specific parameters in the pre-stored information in the first server 131; if the application identifier (AppEUI) and specific parameters obtained from the second network access request match the application identifier (AppEUI) and specific parameters in the pre-stored information in the first server 131 successfully, a network access license is generated. If the application identifier (AppEUI) and specific parameters obtained from the second network access request do not match the application identifier (AppEUI) and specific parameters in the pre-stored information in the first server 131, it proves that the pre-stored information corresponding to the terminal device 11 is not created in the first server 131, so it is necessary to create the pre-stored information of the terminal device 11 in the first server 131, and create the server device information according to the application identifier (AppEUI), specific parameters, device unique identifier (DevEUI) and application key (AppKEY) obtained from the second network access request, and the server device information includes the application identifier (AppEUI), specific parameters, device unique identifier (DevEUI) and application key (AppKEY) that are the same as the application identifier (AppEUI), specific parameters, device unique identifier (DevEUI) and application key (AppKEY) obtained in the second network access request. Generate a network access license based on the created server device information.
[0088] S203 , the first server 131 feeds back the network access permission to the gateway 12 .
[0089] S204 , the gateway 12 feeds back the network access permission to the terminal device 11 .
[0090] S205, the gateway 12 generates an application key (AppKEY) according to the application identifier (AppEUI) and the device unique identifier (DevEUI) in the first network access request, generates a second network access request according to the application identifier (AppEUI), specific parameters, the device unique identifier (DevEUI) and the application key (AppKEY), and sends the second network access request to the second server 132. The second server 132 may be a management server 13 or a user server 13. S202 and S205 may be performed simultaneously.
[0091] The second server 132 receives the second network access request, and obtains the application identifier (AppEUI) and specific parameters in the second network access request, and matches the application identifier (AppEUI) and specific parameters obtained from the second network access request with the application identifier (AppEUI) and specific parameters in the pre-stored information in the second server 132. If the application identifier (AppEUI) and specific parameters obtained from the second network access request match the application identifier (AppEUI) and specific parameters in the pre-stored information in the second server 132 successfully, cloud information is generated. If the application identifier (AppEUI) and specific parameters obtained from the second network access request do not match the application identifier (AppEUI) and specific parameters in the pre-stored information in the second server 132, it proves that the pre-stored information corresponding to the terminal device 11 is not created in the second server 132, so it is necessary to create the pre-stored information of the terminal device 11 in the second server 132, and create the server device information according to the application identifier (AppEUI), specific parameters, device unique identification code (DevEUI) and application key (AppKEY) obtained from the second network access request. The server device information includes the application identifier (AppEUI), specific parameters, device unique identification code (DevEUI) and application key (AppKEY) that are the same as the application identifier (AppEUI), specific parameters, device unique identification code (DevEUI) and application key (AppKEY) obtained in the second network access request. The cloud information is generated according to the created server device information.
[0092] S206 , the second server 132 feeds back the cloud information to the gateway 12 .
[0093] S207 , the gateway 12 feeds back the cloud information to the terminal device 11 .
[0094] In one embodiment, the terminal device 11 completes network access after receiving the network access permission and cloud information. After the network access is completed, communication is established with the third server 133 according to the cloud information. Among them, the third server 133 can be distinguished from the third-party server 13 of the Lora server 13 or the management server 13. The gateway 12 establishes communication with the third server 133 according to the received cloud information, device name (deviceName), product name (product) and device secret key (deviceSecret). Log in to the third server 133 through the MQTT protocol (Message Queuing Telemetry Transport, message queue telemetry transmission protocol), and report the topology of the terminal device 11, and the topology of the terminal device 11 includes the number of terminal devices 11 corresponding to the gateway 12.
[0095] In one embodiment, the first data information is encrypted to obtain the second data information, wherein the first data information includes the working status data information of the terminal device 11. The working status data information of the terminal device 11 includes environmental information and equipment operation information such as compressor operating frequency, outdoor unit ambient temperature, outdoor unit exhaust pressure, coil temperature and indoor heating temperature. The second data information is sent to the gateway 12, and the gateway 12 is used to send the second data information to the first server 131, and the first server 131 is used to parse the second data information to obtain the third data information and send it to the gateway 12. The gateway 12 is also used to send the third data information to the third server 133, and the third server 133 is used to send the third data information to the second server 132.
[0096] In one embodiment, referring to Figure 2 The Lora terminal device 11 network access method also includes:
[0097] S208 , the terminal device 11 encrypts the received first data information to obtain second data information, and reports the second data information to the gateway 12 .
[0098] S209 , the gateway 12 sends the received second data information to the first server 131 .
[0099] S210. The first server 131 parses the received second data information to obtain third data information, and sends the third data information to the gateway 12 via the MQTT protocol (Message Queuing Telemetry Transport).
[0100] S211. After receiving the third data information, the gateway 12 sends the third data information to the third server 133 through the MQTT protocol (Message Queuing Telemetry Transport).
[0101] S212: The third server 133 sends the third data information to the second server 132 through the distributed information service. According to the above embodiment, when the second server 132 needs to obtain the working status data information of the terminal device 11, it needs to be forwarded through the third server 133.
[0102] As described above, by being able to automatically make a network access request and send pre-burned device information when a network access trigger event is detected, manufacturers / users are prevented from manually entering device information into the terminal device 11. When the number of terminal devices 11 is large, the time for manually entering device information into the terminal device 11 can be reduced, thereby improving the efficiency of network access work.
[0103] In the above, by determining that a network access trigger event is detected, the corresponding network access trigger event is read from the terminal device 11 according to the preset access rules, wherein the first device information includes the application identifier and specific parameters pre-burned in the terminal device 11, and the device unique identification code generated by the terminal device 11, wherein multiple terminal devices 11 of the same series correspond to the same application identifier and specific parameters, and the first network access request is sent to the gateway 12, wherein the first network access request includes the first device information, and the gateway 12 is used to generate an application key according to the application identifier and the device unique identification code in the first device information, and generate a second network access request according to the first device information and the application key, and send the second network access request to the first server 131 and the second server 132, and receive the network access permission fed back by the first server 131 for the second network access request and the cloud information fed back by the second server 132 for the second network access request; receive the network access permission and cloud information fed back by the gateway 12, and complete the network access, wherein the cloud information includes the device name, product name and device key. By adopting the above-mentioned technical means, the device information can be pre-burned in the terminal device 11, so that there is no need to contact the manufacturer to obtain the corresponding device information when joining the network, so that the terminal device 11 can automatically join the network when the network access trigger event is met, thereby improving the degree of automation of the network access work of the terminal device 11 and improving the network access work efficiency. In addition, by having multiple terminal devices 11 of the same series correspond to the same application identifier and specific parameters, it can be achieved that multiple terminal devices 11 of the same series share the same application identifier and specific parameters, so that when multiple terminal devices 11 of the same series join the network, the server 13 can use the same set of pre-stored information for matching verification when matching the network access device information, avoiding the situation where different terminal devices 11 of the same series need to match with different sets of pre-stored information, thereby reducing the amount of pre-stored information in the server 13, thereby improving the running speed of the server 13 and improving the network access work efficiency.
[0104] Based on the above embodiments, Figure 3 This is a schematic diagram of the structure of a Lora terminal device access device provided in an embodiment of the present application. Figure 3 The Lora terminal device network access apparatus provided in this embodiment specifically includes: a trigger detection module 21, a network access response module 22, a network access request module 23 and a data receiving module 24.
[0105] The trigger detection module 21 is used to confirm that a network access trigger event is detected;
[0106] A network access response module 22, configured to respond to the network access trigger event and read first device information from the terminal device according to a preset access rule, wherein the first device information includes an application identifier and specific parameters pre-burned in the terminal device, and a device unique identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters;
[0107] A network access request module 23 is configured to send a first network access request to a gateway, wherein the first network access request includes first device information, and the gateway is configured to generate the application key according to the application identifier and the device unique identification code in the first device information, and generate a second network access request according to the first device information and the application key, send the second network access request to the first server and the second server, and receive the network access permission fed back by the first server for the second network access request and the cloud access information fed back by the second server for the second network access request;
[0108] The data receiving module 24 is used to receive the network access permission and the cloud access information fed back by the gateway to complete the network access, wherein the cloud access information includes the device name, product name and device key.
[0109] Furthermore, the data receiving module 24 is also used to receive the network access permission and the cloud information, and the gateway is used to receive the network access permission generated by the first server after the first device information is successfully matched with the pre-stored information, and receive the cloud information generated by the second server after the first device information is successfully matched with the pre-stored information.
[0110] Furthermore, the data receiving module 24 is also used to receive the network access permission and the cloud access information fed back by the gateway, and the gateway is used to receive the network access permission generated by the first server after creating the server-side device information according to the first device information after the first device information fails to match the pre-stored information, and receive the cloud access information generated by the second server after creating the server-side device information according to the first device information after the first device information fails to match the pre-stored information.
[0111] Furthermore, the device also includes a communication module;
[0112] The communication module is used to establish communication with the third server according to the cloud information.
[0113] Furthermore, the communication module is further used to encrypt the first data information to obtain second data information, wherein the first data information includes the working status data information of the terminal device;
[0114] The second data information is sent to the gateway, the gateway is used to send the second data information to the first server, the first server is used to parse the second data information and obtain the third data information and send it to the gateway, the gateway is also used to send the third data information to the third server, and the third server is used to send the third data information to the second server.
[0115] In the above, by determining that a network access trigger event is detected, the corresponding network access trigger event is read from the terminal device according to the preset access rules. The device information includes the application identification and specific parameters pre-burned in the terminal device, the device unique identification code and application key generated by the terminal device, and multiple terminal devices of the same series correspond to the same application identification and specific parameters. A network access request is sent to the server, wherein the network access request includes the device information, and the network access permission and cloud information fed back by the server for the network access request are received to complete the network access, wherein the cloud access information includes the device name, product name and device key. By adopting the above technical means, the device information can be pre-burned in the terminal device, so that there is no need to contact the manufacturer to obtain the corresponding device information when accessing the network, so that the terminal device can automatically access the network when the network access trigger event is met, thereby improving the automation of the terminal device access work and improving the efficiency of the network access work. In addition, by having multiple terminal devices of the same series correspond to the same application identifier and specific parameters, it is possible for multiple terminal devices of the same series to share the same application identifier and specific parameters, so that when multiple terminal devices of the same series access the network, the server can use the same set of pre-stored information for matching and verification when matching the network access device information, avoiding the situation where different terminal devices of the same series need to correspond to a different set of pre-stored information for matching, thereby reducing the amount of pre-stored information in the server, and further improving the server running speed and improving the efficiency of network access.
[0116] The Lora terminal device network access apparatus provided in the embodiment of the present application can be used to execute the Lora terminal device network access method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0117] Based on the above embodiments, Figure 4 A schematic diagram of the structure of a Lora terminal device access system provided in an embodiment of the present application. Figure 4 The Lora terminal device network access system provided in this embodiment specifically includes: a terminal device 11, a gateway 12, a server 13, a first server 131, a second server 132 and a third server 133;
[0118] Wherein, the terminal device 11 is used to determine that a network access triggering event is detected;
[0119] In response to the network access triggering event, first device information is read from the terminal device 11 according to a preset access rule, wherein the device information includes an application identifier and specific parameters pre-burned in the terminal device 11, and a device unique identification code generated by the terminal device 11, wherein multiple terminal devices 11 of the same series correspond to the same application identifier and specific parameters;
[0120] Sending a first network access request to the gateway 12, wherein the first network access request includes the first device information;
[0121] Receive the network access permission and cloud access information fed back by the gateway 12 to complete the network access, wherein the cloud access information includes the device name, product name and device key;
[0122] Establishing communication with the third server 133 according to the cloud information;
[0123] The gateway 12 is used to receive the first network access request, generate an application key according to the application identifier and the device unique identification code in the first device information, generate a second network access request according to the first device information and the application key, and send the second network access request to the first server 131 and the second server 132;
[0124] receiving the network access permission fed back by the first server 131 in response to the second network access request and the cloud access information fed back by the second server 132 in response to the second network access request;
[0125] Feedback the network access permission and the cloud access information to the corresponding terminal device 11;
[0126] The first server 131 is configured to receive the second network access request;
[0127] According to the second network access request, matching the first device information with pre-stored information;
[0128] If the first device information matches the pre-stored information successfully, the cloud information and network access permission are generated;
[0129] If the first device information fails to match the pre-stored information, after creating the server device information according to the first device information, a network access permit is generated;
[0130] The second server 132 is used to receive the second network access request;
[0131] According to the second network access request, matching the first device information with pre-stored information;
[0132] If the first device information matches the pre-stored information successfully, cloud information is generated;
[0133] If the first device information fails to match the pre-stored information, after creating the server device information according to the first device information, the cloud information is generated;
[0134] Feedback the cloud information to the gateway 12.
[0135] Furthermore, the system also includes a third server 133;
[0136] The third server 133 is used to establish communication with the gateway 12 according to the cloud information.
[0137] Furthermore, the terminal device 11 is further used to encrypt the first data information to obtain second data information, wherein the first data information includes the working status data information of the terminal device 11;
[0138] Sending the second data information to the gateway 12;
[0139] The gateway 12 is further configured to send the second data information to the first server 131;
[0140] The first server 131 is further configured to send third data information obtained after parsing the second data information to the gateway 12;
[0141] The gateway 12 is further configured to send the third data information to the third server 133;
[0142] The third server 133 is further configured to send the third data information to the second server 132 .
[0143] By determining that a network access trigger event is detected, corresponding to the network access trigger event, the first device information is read from the terminal device 11 according to the preset access rules, wherein the first device information includes the application identification and specific parameters pre-burned in the terminal device 11, and the device unique identification code generated by the terminal device 11, wherein multiple terminal devices 11 of the same series correspond to the same application identification and specific parameters, and a first network access request is sent to the server 13, wherein the first network access request includes the first device information, and the network access permission and cloud information fed back by the server 13 for the network access request are received to complete the network access, wherein the cloud access information includes the device name, product name and device secret key. By adopting the above technical means, the device information can be pre-burned in the terminal device 11, so that there is no need to contact the manufacturer to obtain the corresponding device information when accessing the network, so that the terminal device 11 can automatically access the network when the network access trigger event is met, thereby improving the automation of the network access work of the terminal device 11 and improving the efficiency of the network access work. In addition, by having multiple terminal devices 11 of the same series correspond to the same application identifier and specific parameters, it is possible for multiple terminal devices 11 of the same series to share the same application identifier and specific parameters, so that when multiple terminal devices 11 of the same series access the network, the server 13 can use the same set of pre-stored information for matching verification when matching the network access device information, thereby avoiding the situation where different terminal devices 11 of the same series need to correspond to a different set of pre-stored information for matching, thereby reducing the amount of pre-stored information in the server 13, and further improving the operating speed of the server 13 and the efficiency of network access.
[0144] The Lora terminal device network access system provided in the embodiment of the present application can be used to execute the Lora terminal device network access method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0145] The present application embodiment provides a Lora terminal device, referring to Figure 5 , the Lora terminal device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The number of processors in the Lora terminal device can be one or more, and the number of memories in the Lora terminal device can be one or more. The processor, memory, communication module, input device and output device of the Lora terminal device can be connected through a bus or other means.
[0146] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the Lora terminal device network access method described in any embodiment of the present application (for example, the trigger detection module, network access response module, network access request module and data receiving module in the Lora terminal device network access device; or the terminal device and server in the Lora terminal device network access system). The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the 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 a combination thereof.
[0147] The communication module 33 is used for data transmission.
[0148] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, implements the above-mentioned Lora terminal device network access method.
[0149] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.
[0150] The Lora terminal device provided above can be used to execute the Lora terminal device network access method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0151] The embodiment of the present application also provides a storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute a Lora terminal device network access method when executed by a computer processor, and the Lora terminal device network access method comprises: confirming that a network access trigger event is detected; responding to the network access trigger event, reading first device information from the terminal device according to a preset access rule, wherein the first device information includes an application identifier and specific parameters pre-burned in the terminal device, and a device unique identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters; sending a first network access request to the network; The first network access request includes first device information, and the gateway is used to generate an application key according to the application identifier and the device unique identification code in the first device information, and generate a second network access request according to the first device information and the application key, send the second network access request to the first server and the second server, and receive the network access permission fed back by the first server for the second network access request and the cloud information fed back by the second server for the second network access request; receive the network access permission and the cloud information fed back by the gateway to complete the network access, wherein the cloud information includes the device name, product name and device key.
[0152] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.
[0153] Of course, the storage medium storing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the Lora terminal device network access method described above, can also execute related operations in the Lora terminal device network access method provided in any embodiment of the present application.
[0154] The Lora terminal device network access device, storage medium and Lora terminal device provided in the above embodiments can execute the Lora terminal device network access method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the Lora terminal device network access method provided in any embodiment of the present application.
[0155] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for Lora terminal device to access the network, characterized in that: For terminal equipment, including: Confirm that a network access triggering event is detected; In response to the network access triggering event, first device information is read from the terminal device according to a preset access rule, wherein the first device information includes an application identifier and specific parameters pre-burned in the terminal device, and a device unique identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters; Sending a first network access request to a gateway, wherein the first network access request includes first device information, the gateway is used to generate an application key according to an application identifier and a device unique identification code in the first device information, and generate a second network access request according to the first device information and the application key, sending the second network access request to a first server and a second server, and receiving a network access permission fed back by the first server for the second network access request and cloud access information fed back by the second server for the second network access request; Receive the network access permission and the cloud access information fed back by the gateway to complete the network access, wherein the cloud access information includes the device name, product name and device key; The method further comprises: Establishing communication with a third server according to the cloud information; Encrypting the first data information to obtain second data information, wherein the first data information includes working status data information of the terminal device; The second data information is sent to the gateway, the gateway is used to send the second data information to the first server, the first server is used to parse the second data information and obtain the third data information and send it to the gateway, the gateway is also used to send the third data information to the third server, and the third server is used to send the third data information to the second server.
2. The Lora terminal device network access method according to claim 1, characterized in that: The receiving the network access permission and the cloud access information fed back by the gateway includes: Receive the network access permission and the cloud access information, the gateway is used to receive the network access permission generated by the first server after the first device information is successfully matched with the pre-stored information, and receive the cloud access information generated by the second server after the first device information is successfully matched with the pre-stored information.
3. The Lora terminal device network access method according to claim 1, characterized in that: The receiving the network access permission and the cloud access information fed back by the gateway includes: Receive the network access permission and the cloud access information fed back by the gateway, the gateway being used to receive the network access permission generated by the first server after creating server-side device information according to the first device information after a match between the first device information and the pre-stored information fails, and receive the cloud access information generated by the second server after creating server-side device information according to the first device information after a match between the first device information and the pre-stored information fails.
4. A Lora terminal device network access device, characterized in that: include: A trigger detection module, used to confirm that a network access trigger event has been detected; A network access response module, configured to respond to the network access trigger event and read first device information from the terminal device according to a preset access rule, wherein the first device information includes an application identifier and specific parameters pre-burned in the terminal device, and a device unique identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters; A network access request module, configured to send a first network access request to a gateway, wherein the first network access request includes first device information, the gateway is configured to generate an application key according to an application identifier and a device unique identification code in the first device information, and generate a second network access request according to the first device information and the application key, send the second network access request to a first server and a second server, and receive a network access permission fed back by the first server for the second network access request and cloud access information fed back by the second server for the second network access request; A data receiving module, used to receive the network access permission and the cloud access information fed back by the gateway to complete the network access, wherein the cloud access information includes the device name, product name and device key; The device also includes: The terminal device is used to establish communication with the third server according to the cloud information, and encrypt the first data information to obtain the second data information, wherein the first data information includes the working status data information of the terminal device; The terminal device is further used to send the second data information to the gateway, the gateway is used to send the second data information to the first server, the first server is used to send the third data information obtained after parsing the second data information to the gateway, the gateway is also used to send the third data information to the third server, and the third server is used to send the third data information to the second server.
5. A Lora terminal device access system, characterized in that: include: The terminal device is used to determine that a network access triggering event is detected; In response to the network access triggering event, first device information is read from the terminal device according to a preset access rule, wherein the first device information includes an application identifier and specific parameters pre-burned in the terminal device, and a device unique identification code generated by the terminal device, wherein multiple terminal devices of the same series correspond to the same application identifier and specific parameters; Sending a first network access request to a gateway, wherein the first network access request includes the first device information; Receive the network access permission and cloud access information fed back by the gateway to complete the network access, wherein the cloud access information includes the device name, product name and device key; Establishing communication with a third server according to the cloud information; a gateway, configured to receive the first network access request, generate an application key according to the application identifier and the device unique identification code in the first device information, generate a second network access request according to the first device information and the application key, and send the second network access request to the first server and the second server; receiving a network access permission fed back by the first server in response to the second network access request and the cloud access information fed back by the second server in response to the second network access request; Feedback the network access permission and the cloud access information to the corresponding terminal device; A first server, configured to receive the second network access request; According to the second network access request, matching the first device information with pre-stored information; If the first device information matches the pre-stored information successfully, a network access permit is generated; If the first device information fails to match the pre-stored information, after creating the server device information according to the first device information, a network access permit is generated; Feedback the network access permission to the gateway; A second server, configured to receive the second network access request; According to the second network access request, matching the first device information with pre-stored information; If the first device information matches the pre-stored information successfully, cloud information is generated; If the first device information fails to match the pre-stored information, after creating the server device information according to the first device information, the cloud information is generated; Feedback the cloud information to the gateway; The system further comprises: The terminal device is further used to encrypt the first data information to obtain second data information, wherein the first data information includes the working status data information of the terminal device; The terminal device is further configured to send the second data information to the gateway; The gateway is further configured to send the second data information to the first server; The first server is further configured to send third data information obtained by parsing the second data information to the gateway; The gateway is further configured to send the third data information to the third server; The third server is used to send the third data information to the second server.
6. A Lora terminal device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.
7. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a processor, they are used to perform the method according to any one of claims 1 to 3.
