Network distribution method and device of Internet of Things equipment

By starting the headless browser locally on the IoT device and using near field communication to transmit the authentication information to the terminal, the problem of screenless devices being unable to perform captive portal authentication is solved, and the network configuration and application scenario expansion of the IoT device are realized. .

CN118590843APending Publication Date: 2024-09-03BEIJING FLYING ELEPHANT PLANET TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410811414.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

It is difficult to effectively implement the distribution network of IoT devices with existing technology, especially those devices that lack display screens or operating controls and cannot perform captive portal authentication, which limits their network access and application scenarios.

Method used

By starting the headless browser locally on the IoT device, the network service address of the captive portal authentication is obtained, and the address is provided to the terminal using near field communication. The terminal obtains the authentication page based on the network connection and generates authentication information, completing the IoT Captive portal authentication for the device.

Benefits of technology

It realizes network distribution for screenless IoT devices, expands its application scenarios, improves user experience, and allows these devices to access the network after authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590843A
    Figure CN118590843A
Patent Text Reader

Abstract

The embodiment of the invention provides a network distribution method and device for Internet of Things equipment. The network distribution method for the Internet of Things equipment comprises the following steps: establishing near field communication with the Internet of Things equipment needing forced portal authentication; acquiring a network service address which is accessed by the Internet of Things equipment through a locally started headless browser and is used for performing forced portal authentication through a communication mode of near field communication; establishing a network connection with the Internet of Things device; accessing the network service address based on a network connected with the network connection, and obtaining an authentication page; and based on the authentication page, generating authentication information, so that a network server completes forced portal authentication on the Internet of Things equipment based on the authentication information. And the Internet of Things equipment can complete forced portal authentication through the terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of Internet of Things technology, and more particularly to a method for configuring a network for an Internet of Things device. This specification also relates to a configuration device for an Internet of Things device, a computing device, a computer-readable medium, and a computer program product. Background Art

[0002] With the development of computer technology, the application of Internet of Things (IoT) is becoming more and more extensive. From smart home to industrial automation, from smart city to health care, IoT is changing the world. IoT refers to a network that connects any object to the Internet through information sensing devices such as radio frequency identification (RFID), infrared sensors, global positioning system, laser scanners, etc., according to the agreed protocol, to exchange information and communicate, so as to achieve intelligent identification, positioning, tracking, monitoring and management.

[0003] Internet of Things (IoT) devices are devices that are connected to the Internet and equipped with various sensors and actuators, capable of collecting, exchanging, processing, and executing operations. These devices use their built-in sensors and actuators to interact with users, other devices, and the environment, providing users with a more convenient and intelligent lifestyle. It can be seen that IoT devices can only function when connected to the Internet. Therefore, how to realize the network configuration of IoT devices is a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, the embodiments of this specification provide a network configuration method for an IoT device. One or more embodiments of this specification also relate to a network configuration device for an IoT device, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a network configuration method for an Internet of Things device is provided, which is applied to a terminal and includes:

[0006] Establishing near field communication with IoT devices that require captive portal authentication;

[0007] Acquire, by means of near field communication, a network service address for performing captive portal authentication that is accessed by the IoT device by launching a headless browser locally;

[0008] Establishing a network connection with the IoT device;

[0009] Access the network service address based on the network to which the network connection is connected, and obtain an authentication page;

[0010] Based on the authentication page, authentication information is generated so that the network server completes the mandatory portal authentication of the Internet of Things device based on the authentication information.

[0011] According to a second aspect of an embodiment of this specification, a network configuration method for an Internet of Things device is provided, which is applied to the Internet of Things device, and includes:

[0012] Establishing near field communication with a terminal;

[0013] Access the network service address used for captive portal authentication by launching a headless browser locally;

[0014] The network service address is provided to the terminal through the communication method of the near field communication, so that the terminal can access the network service address based on the network connected to the network connection established with the Internet of Things device and generate authentication information, and the authentication information is used by the network server to complete the mandatory portal authentication of the Internet of Things device. According to the third aspect of the embodiment of this specification, a network distribution device for an Internet of Things device is provided, including:

[0015] A near field communication module, configured to establish near field communication with an IoT device requiring captive portal authentication;

[0016] An address acquisition module is configured to acquire, through a near field communication method, a network service address for performing a captive portal authentication that is accessed by the IoT device through a locally launched headless browser;

[0017] A network connection module, configured to establish a network connection with the IoT device;

[0018] an authentication acquisition module, configured to access the network service address based on the network to which the network connection is connected, and acquire an authentication page;

[0019] The information generation module is configured to generate authentication information based on the authentication page, so that the network server completes the mandatory portal authentication of the Internet of Things device based on the authentication information.

[0020] According to a fourth aspect of the embodiments of this specification, a network distribution device for an Internet of Things device is provided, including:

[0021] A near field communication module, configured to establish near field communication with a terminal;

[0022] An address access module is configured to access a network service address for performing captive portal authentication by launching a headless browser locally;

[0023] The address sending module is configured to provide the network service address to the terminal through the near field communication method, so that the terminal can access the network service address and generate authentication information based on the network connected to the network connection established with the Internet of Things device, and the authentication information is used by the network server to complete the mandatory portal authentication of the Internet of Things device.

[0024] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:

[0025] Memory and processor;

[0026] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the network configuration method of the above-mentioned Internet of Things device are implemented.

[0027] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the network configuration method of the above-mentioned Internet of Things devices are implemented.

[0028] According to a seventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned network configuration method for Internet of Things devices.

[0029] In one embodiment of the present specification, an IoT device can access a network service address for compulsory portal authentication by locally launching a headless browser, and provide the address to a terminal that has established near-field communication with the IoT device through near-field communication. The terminal can access the network service address based on the network connection established with the IoT device and obtain an authentication page for compulsory portal authentication. The terminal can generate authentication information based on the authentication page, so that the network server can complete the compulsory portal authentication of the IoT device based on the authentication information, so that the authenticated IoT device can access the network, thereby realizing network configuration for the IoT device.

[0030] Furthermore, in an example of the present specification, authentication information for compulsory portal authentication is provided through a terminal, so that an IoT device that does not have operating components such as a screen but requires compulsory portal authentication can also implement compulsory portal authentication, so that the IoT device can also access the network after passing the compulsory portal authentication. This can also expand the use scenarios of IoT devices, have a wider range of applications, and can more conveniently utilize existing networks in the environment, so that IoT devices can better provide services to users. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1This is a flow chart of a network configuration method for an Internet of Things device provided by an embodiment of this specification;

[0032] Figure 2 This is a flow chart of a network configuration method for an Internet of Things device provided by an embodiment of this specification;

[0033] Figure 3 It is a process flow chart of a network configuration method for an Internet of Things device provided by an embodiment of this specification;

[0034] Figure 4 This is a schematic diagram of the structure of a network distribution device for an Internet of Things device provided by an embodiment of this specification;

[0035] Figure 5 This is a schematic diagram of the structure of a network distribution device for an Internet of Things device provided by an embodiment of this specification;

[0036] Figure 6 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0037] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0038] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0039] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0040] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0041] First, the terms involved in one or more embodiments of this specification are explained.

[0042] Internet of Things (IoT) device network configuration: refers to the process of configuring an IoT device so that it can connect to the Internet. For example, connecting to a wireless network (Wi-Fi) or a wired network. The network configuration process includes selecting a network, entering security credentials (such as Wi-Fi password), and configuring the device's network parameters (IP, network management).

[0043] Bluetooth Low Energy (BLE) is a type of Bluetooth technology that is used to significantly reduce energy consumption while maintaining communication capabilities. Compared with traditional Bluetooth, Bluetooth Low Energy consumes less power when maintaining a stable connection, and is particularly suitable for devices and applications that require long-term operation and are sensitive to energy consumption, such as wearables, the Internet of Things (IoT) and other devices.

[0044] Captive portal authentication: is a network authentication technology that forces users to connect to the Internet to be authenticated before they can access the Internet normally. For example, in many public Wi-Fi hotspots such as schools and hospitals, users need to log in through a captive portal interface and agree to the terms of service before they can fully access the Internet. The interface is a web page where users are "captured" (Captive) before any other network activities, and can only jump to the normal Internet after completing the required login action.

[0045] Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to automatically assign IP addresses to devices on the network (such as IoT devices). The IP address allocation of the DHCP client is leased, which means that the IP address assigned to the device is only valid for a certain period of time. When the lease is about to end, the client needs to apply to the DHCP server for renewal. If the client cannot renew successfully (for example, the server is unresponsive, temporary network problems, etc.), then the device will lose its IP address and thus lose network connectivity. In addition, the IP assigned to the device by DHCP is allocated from a dynamic pool, and it is not possible to give the device a fixed IP.

[0046] Headless Browser: A web browser without a user interface. It provides a practical way for screenless scenarios, and can indirectly operate the browser through a remote network address.

[0047] In this specification, a network configuration method for an Internet of Things device is provided. This specification also relates to a network configuration device for an Internet of Things device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0048] See also Figure 1 , Figure 1 A flowchart of a network configuration method for an Internet of Things device provided according to an embodiment of the present specification is shown. The method can be applied to a terminal and specifically includes the following steps.

[0049] Step 102: Establish near field communication with an IoT device that requires captive portal authentication.

[0050] Near field communication, also known as short-range wireless communication, is a short-range high-frequency, wireless communication that can include communication methods such as Bluetooth, NFC, and RFID. Terminals and IoT devices can have near field communication functions, such as Bluetooth modules that can establish Bluetooth communication. In practical applications, the near field communication function of the terminal or IoT device can be turned on manually or automatically. IoT devices can include smart home devices such as smart thermostats, smart security systems, and smart lighting; they can also include industrial equipment such as vehicle tracking systems and industrial robots; they can also include medical equipment such as medical equipment that supports the Internet of Things; they can also include wearable devices such as fitness trackers and smart watches; they can also include smart home appliances such as refrigerators, ovens, washing machines, etc.; they can also include school supplies such as reading pens and smart desk lamps, etc.

[0051] The terminal may have a program for configuring the network for the IoT device, or may establish near field communication with the IoT device that requires mandatory portal authentication through the terminal client.

[0052] Captive portal authentication means that after users connect to a wireless or wired network, they do not directly obtain Internet access rights, but need to pass the identity authentication required by the website provider before they can obtain Internet access permission. Such as some business centers, airports, hotels, cafes and other places.

[0053] Step 104: Obtain, by means of near field communication, a network service address for performing captive portal authentication that is accessed by the IoT device by launching a headless browser locally.

[0054] In actual applications, IoT devices may not have a display screen or operating controls, which makes it inconvenient to display or input information. When an IoT device needs to access the network through compulsory portal authentication, the IoT device can determine the network service address for compulsory portal authentication by locally starting the network service of a headless browser. In actual applications, a terminal is usually a device with a display screen or operating controls, which can display or input information more conveniently. In the embodiments of this specification, the IoT device can provide the network service address to the terminal and perform compulsory portal authentication with the help of the terminal. Among them, the terminal can obtain the network service address for compulsory portal authentication determined by the IoT device through near-field communication.

[0055] Step 106: Establish a network connection with the IoT device.

[0056] Among them, the data transmission volume of the network connected by the network connection can be greater than the data transmission volume of the near-field communication. Considering that the terminal needs to access the network service address to obtain the authentication page for mandatory portal authentication, and the data volume of the web page is usually large, while the data transmission volume of the near-field communication is usually small, in order to ensure the smooth progress of the authentication, the terminal can establish a network connection with the IoT device and use the network connected to the IoT device to obtain the authentication page. For example, the terminal can connect to the IoT device through the network interface and realize network sharing with the IoT device, such as connecting the terminal to the IoT device through the USB interface and turning on the network card sharing.

[0057] Step 108: Access the network service address based on the network to which the network connection is connected, and obtain an authentication page.

[0058] IoT devices that require compulsory portal authentication are usually already connected to the Internet, but cannot access the Internet normally. The terminal establishes a network connection with the IoT device, which can be understood as the terminal is also connected to the network to which the IoT device is connected. In this way, the terminal can use the network connected to the IoT device to access the network service address used for compulsory portal authentication and obtain the authentication page used for compulsory portal authentication.

[0059] Step 110: Generate authentication information based on the authentication page so that the network server completes the mandatory portal authentication of the IoT device based on the authentication information.

[0060] The authentication page can contain content that needs to be authenticated. The specific content format can be set by the network server according to actual needs. For example, in some captive network portals, advertisements of the service provider's sponsors will be displayed, and the user must click or close the window that appears before being granted Internet access. Some captive network portals also require the user to provide a preset user ID and password information before the user is granted Internet access.

[0061] The authentication information may be generated based on the authentication page, and may represent the information required for the network server to complete the verification of the captive portal authentication, such as information generated by the user closing the display window in the authentication page, information generated by browsing the information displayed in the authentication page, information provided according to the requirements in the page, information input by the user, etc. The specific content of the authentication information can be determined according to actual needs, and is not specifically limited here.

[0062] The network server may represent a server that provides Internet services. In the embodiments of this specification, the Internet of Things device can access the network service address for the mandatory portal authentication by launching a headless browser locally, so that the network access identifier is the identifier of the Internet of Things device, such as the cookie generated by accessing the network and the corresponding request are both corresponding to the Internet of Things device, such as the IP address used is the IP address of the Internet of Things device, so that the terminal obtains the authentication page and generates authentication information through the network connection with the Internet of Things device, which can be represented as the authentication information corresponding to the Internet of Things device, so that the network server can complete the mandatory portal authentication of the Internet of Things device based on the authentication information.

[0063] In actual applications, the terminal can send authentication information to the network server through the network connection established with the IoT device. The terminal can also send the generated authentication information to the IoT device through near-field communication or a network connection. The IoT device can send the authentication information to the network server, and the network server can complete the mandatory portal authentication for the IoT device based on the authentication information.

[0064] In the embodiments of this specification, the terminal can be used to complete the network configuration of IoT devices that require mandatory portal authentication, so that IoT devices without display screens or that are not convenient for network configuration operations can also be configured, which greatly improves the application scenarios of IoT devices and is also conducive to improving the user experience of IoT devices.

[0065] As an implementation method, the near field communication in the embodiments of this specification may be Bluetooth communication, preferably low-power Bluetooth communication. Optionally, the IoT device has a Bluetooth function; the establishment of near field communication with the IoT device that requires captive portal authentication may specifically include:

[0066] Based on preset communication protocol rules, establish low-power Bluetooth communication with IoT devices that require captive portal authentication.

[0067] Bluetooth Low Energy (BLE), also known as Bluetooth Low Energy or Bluetooth Smart, is a communication technology designed specifically for low-power applications. Compared with traditional Bluetooth technology, BLE can provide similar communication capabilities at a much lower energy consumption at the same communication distance. The preset communication protocol rules can be protocol rules for implementing Bluetooth Low Energy communication.

[0068] As an implementation method, the preset communication protocol rules may be GATT protocol rules, wherein GATT is a high-level protocol specification based on communication between BLE devices, which defines how to exchange data through a BLE link. GATT uses a simple client-server model, wherein a device performing Bluetooth communication can act as a GATT server to provide data, or act as a GATT client to request data.

[0069] In the embodiments of this specification, the IoT device can represent a GATT server, and the terminal can represent a GATT client. The IoT device can also represent a GATT client, and the corresponding terminal can also represent a GATT server. Among them, the user can send data to or read data from the IoT device by operating the terminal interface (such as an App on a mobile phone), thereby completing the network configuration operation of the IoT device.

[0070] In actual applications, other protocol rules may also be used, for example, protocol rules may be customized according to actual needs, and terminal clients and IoT devices may transmit data based on customized protocol rules. In this way, there is no specific limitation on specific protocol rules.

[0071] In the embodiments of this specification, the terminal may establish a network connection with the IoT device. Optionally, the above-mentioned establishment of a network connection with the IoT device may specifically include:

[0072] Connect to the IoT device through a preset network interface to share the network of the IoT device.

[0073] The terminal and the IoT device may have a network interface, and the terminal can be connected to the IoT device through the network interface so that the terminal can share the network of the IoT device. The preset network interface can be an interface in the terminal that can obtain network data, for example, it can be a USB interface, an Ethernet interface, etc. As an implementation method, the terminal can be connected to the IoT device through a USB interface, and the network card sharing function can be enabled to share the network of the IoT device. In actual applications, the preset network interface can be an interface that the terminal has, and the type of network interface can be determined based on the hardware configuration of the terminal.

[0074] In the embodiments of this specification, the terminal may be a terminal with a display screen, such as a mobile phone, a computer, a smart wearable device, a smart display device, etc. In practical applications, captive portal authentication usually requires a display screen to display the information that needs to be authenticated. Optionally, the authentication page in the embodiments of this specification includes an area for filling in authentication information; the authentication information generated based on the authentication page may specifically include:

[0075] Displaying the authentication page;

[0076] Obtain the authentication information filled in by the user based on the authentication page.

[0077] The terminal can display an authentication page. If the authentication page contains information that needs to be filled in, the user can fill in the authentication information, such as mobile phone number, verification code, etc., on the authentication page displayed by the terminal.

[0078] In actual applications, some user agreements can also be displayed on the authentication page. The user needs to browse for a period of time or perform a confirmation operation before generating authentication information.

[0079] Considering that the amount of data that can be transmitted by near field communication is limited, in order to ensure the integrity of information transmission and avoid information omission, the transmitted data can also be compressed in the embodiments of this specification. Optionally, the above-mentioned communication method of near field communication to obtain the network service address for the mandatory portal authentication accessed by the IoT device by launching a headless browser locally can specifically include:

[0080] Acquire, by a near field communication method, a first compressed address obtained by compressing, by the IoT device according to a first data compression rule, a network service address for performing captive portal authentication accessed by locally starting a headless browser;

[0081] The first compressed address is decompressed according to a first decompression rule to obtain the network service address.

[0082] In practical applications, the network service address may be an IP address, which may include four fields. In order to ensure that the terminal can obtain complete address information through near field communication, the IoT device may represent each field with one byte, and the obtained first compressed address may be four bytes of data. After the terminal obtains the first compressed address, it may decompress the data according to the first decompression rule to restore the network service address. The first decompression rule is a rule corresponding to the first data compression rule, and may include the inverse operation of the calculation rule used in the first data compression rule.

[0083] In actual applications, the IoT device needs to connect to the network first. If a mandatory portal authentication is required, the mandatory portal authentication is performed again. After the authentication is passed, the Internet can be accessed. Considering that when connecting to the network, it may be necessary to provide information such as a password, and the IoT device may not be convenient to input information, the network information of the IoT device can also be configured through the terminal in the embodiment of this specification. Optionally, the method in the embodiment of this specification can also include:

[0084] Acquire a connectable long-distance communication network; the long-distance communication network includes a wired network or a wireless network;

[0085] Get the network connection password provided by the user;

[0086] The network identifier of the long-distance communication network and the network connection password are sent to the Internet of Things device so that the Internet of Things device can connect to the long-distance communication network.

[0087] The terminal can obtain a connectable long-distance communication network, which may include a wired network or a wireless network. The terminal can also display a password input page, where the user can enter a network connection password. If the terminal has previously connected to the network and saved the password, the network connection password can also be a password previously provided by the user and saved by the terminal.

[0088] If there are multiple connectable long-distance communication networks, the terminal may also display a network list, and the user may select the long-distance communication network to be connected from the list. The terminal may also determine the long-distance communication network to be connected based on the terminal's historical network connection information, such as selecting the network with the most connections or the most recently connected network.

[0089] The network identifier of the long-distance communication network may represent an identifier used to distinguish different networks, and may be a network name, SSID (Service Set Identifier), etc. The terminal may send the network identifier and the network connection password to the IoT device, and the IoT device may connect to the network according to the network information provided by the terminal, so that the IoT device may connect to the network even if it is inconvenient to operate.

[0090] In the embodiment of this specification, the terminal and the IoT device establish near field communication, and the terminal can send the network identification and the network connection password to the IoT device via near field communication. Optionally, sending the network identification and the network connection password of the target long-distance communication network to the IoT device may specifically include:

[0091] Processing the network identifier of the long-distance communication network and the network connection password according to a second data compression rule to obtain compressed data;

[0092] The compressed data is sent to the IoT device via near field communication.

[0093] In actual applications, the communication protocol of near field communication such as Bluetooth will specify the number of transmissions at one time, or the number of payloads. If the network identifier or password is long, it needs to be compressed before transmission. The second data compression rule may include a data splitting rule, which can split a long string into multiple short strings for data transmission.

[0094] As an implementation method, the terminal can split the network identifier or the network connection password or a character string containing the network identifier and the network connection password according to a preset character length to obtain several sub-data, i.e., compressed data, and then send each sub-data to the Internet of Things device through a near-field communication method. After obtaining the compressed data, the Internet of Things device can restore the obtained data according to the data restoration rule corresponding to the second data compression rule, and obtain the network identifier and network connection password of the long-distance communication network.

[0095] To facilitate data restoration by IoT devices, the terminal can also generate serial numbers corresponding to each sub-data. Each sub-data can be sent to the IoT device in the order of the serial numbers. The IoT device can also splice each sub-data based on the serial numbers to obtain the original network identification and network connection password.

[0096] As an implementation method, the compressed data may include several transmission data; one transmission data may include at least part of a string representing a network identifier or a network connection password, and may also include a message sequence number, based on which several transmission data may be concatenated to obtain the original network identifier or network connection password. One transmission data may also include a message identifier, and the message identifiers included in several transmission data may be the same, so that the IoT device may parse out the network connection password corresponding to the network identifier.

[0097] The Bluetooth BLE protocol limits the payload to 20 bytes. For wireless SSIDs, passwords, and other strings that may exceed the length limit, they need to be split into multiple interactions to meet the needs. In the embodiment of this specification, the format of the interactive protocol can be set as: rnd, seq, and payload. Among them, rnd represents the message identifier, which can be one byte or a random number. It is generated each time the SSID or password is set, and rnd remains unchanged in the subsequent multiple interactions for the SSID and password. Seq can represent the message sequence number, which can be one byte or a number in a certain order, such as the message sequence number of the first message can be 01, the message sequence number of the second message can be 02, and so on. The message here can also be understood as the above-mentioned transmission data. The payload can represent the data to be transmitted, which can be at least part of the string in the network identifier and the network connection password, and the length of the payload can be 18 bytes.

[0098] Assume that the network ID of the wireless network wifi is aexampleofwifiname123456, the password is 123456789091234567890, and the generated random number rnd is 20. The generated compressed data can include multiple pieces of interaction data, as follows:

[0099] 2001aexampleofwifiname 2002123456 2003123456789012345678 200490

[0103] Among them, messages with message numbers 01 and 02 can contain network identifiers, such as SSID, and these two messages can support a total of up to 36 bytes of network identifiers. Messages with message numbers 03 and 04 can contain network connection passwords, and these two messages can support a total of up to 36 bytes of passwords.

[0104] In actual applications, when the IoT device is already connected to the network, such as a wireless network or a wired network, some network parameters may need to be defined. In the embodiments of this specification, the network parameters of the IoT device can also be configured through the terminal. Optionally, the method in the embodiments of this specification may also include:

[0105] Displaying a network parameter configuration page for connecting to a long-distance communication network; the long-distance communication network includes a wired network or a wireless network;

[0106] Acquire network configuration parameters obtained based on the network parameter configuration page; the network configuration parameters include at least one of an IP address, a gateway address, and a DNS server address;

[0107] The network configuration parameters are provided to the IoT device so that the IoT device completes the parameter configuration of the long-distance communication network.

[0108] In actual applications, the terminal may have a client corresponding to the IoT device, and the user may select the IoT device to be configured for network from the client, and may also display the network parameter configuration page for the IoT device, which may include network configuration parameters such as IP address, gateway address, DNS server address, etc., and may also include operation controls for indicating automatic configuration or manual configuration. Automatic configuration may represent DHCP (Dynamic Host Configuration Protocol) mode. In actual applications, the user may choose automatic configuration or manual configuration according to actual needs, and the terminal may also automatically choose automatic configuration or manual configuration according to the preset protocol. The network configuration parameters may be filled in by the user or automatically generated by the terminal.

[0109] In the embodiments of this specification, the terminal can provide the determined network configuration parameters to the IoT device, so that the IoT device can complete the network configuration according to the acquired network configuration parameters, so that the IoT device that is inconvenient to operate can also configure the network parameters.

[0110] In the embodiments of this specification, the terminal and the IoT device establish near field communication, and the terminal can provide the configured network parameters to the IoT device via near field communication. Considering that the amount of data transmitted via near field communication is limited, in order to ensure that the IoT device obtains complete network parameters, the terminal can also compress the network parameters and provide the compressed data to the IoT device. Optionally, providing the network configuration parameters to the IoT device may specifically include:

[0111] Processing the network configuration parameters according to a third data compression rule to obtain compressed network configuration parameters;

[0112] The compressed network configuration parameters are sent to the Internet of Things device via near field communication.

[0113] The third data compression rule may be a data compression rule set based on the communication protocol of near field communication, and the obtained compressed network configuration parameters may meet the data transmission requirements specified by the communication protocol of near field communication. After obtaining the compressed network configuration parameters, the corresponding IoT device may perform data parsing according to the decompression rule corresponding to the third data compression rule, and may restore the required network configuration parameters.

[0114] Corresponding to the above method embodiments, this specification also provides a network configuration method for an Internet of Things device with the Internet of Things device as the execution subject. Figure 2 A flowchart of a network configuration method for an Internet of Things device provided in one embodiment of this specification, which method can be applied to the Internet of Things device, may specifically include the following steps:

[0115] Step 202: Establish near field communication with the terminal.

[0116] In actual applications, the IoT device may include a near field communication module, and may establish near field communication with the terminal. For example, the terminal and the IoT device may enable the Bluetooth function, and the two may establish a Bluetooth connection. As an implementation method, a connection may also be established with the IoT device through a terminal client. For example, a user may open the client, and the IoT device logo may be displayed in the client. The user may select the IoT device to be connected, and the terminal may establish a connection with the IoT device.

[0117] Step 204: Access the network service address for captive portal authentication by launching a headless browser locally.

[0118] The IoT device may be in a state where it is connected to the network but cannot access the Internet normally. It may automatically or according to the user's operation start a headless browser to access the network server. If captive portal authentication is required, the network server may feedback a redirection address for obtaining authentication information. The network service address used for captive portal authentication may represent the redirection address fed back by the network server.

[0119] Step 206: Provide the network service address to the terminal via the near field communication method, so that the terminal can access the network service address and generate authentication information based on the network connected to the network connection established with the IoT device, and the authentication information is used by the network server to complete the mandatory portal authentication of the IoT device.

[0120] In actual applications, the IoT device may not have a display screen or operation controls, which is not convenient for performing the mandatory portal authentication operation. In the embodiments of this specification, the IoT device can provide the network service address to the terminal, generate authentication information with the help of the terminal, and then the network server can complete the mandatory portal authentication of the IoT device, so that the IoT device can access the Internet through the mandatory portal authentication.

[0121] In the embodiment of this specification, the IoT device can also detect whether a mandatory portal authentication is required. If a mandatory portal authentication is required, the authentication can be performed with the help of a terminal. Optionally, before the local headless browser is started to access the network service address for mandatory portal authentication, the following steps can also be included:

[0122] Get network connection status;

[0123] If the network connection state is connected, determining whether captive portal authentication is required;

[0124] The method of accessing the network service address for performing the captive portal authentication by launching a headless browser locally specifically includes:

[0125] If captive portal authentication is required, start a headless browser locally to access the network service address used for captive portal authentication.

[0126] In actual applications, after the IoT device is connected to the network and the network connection status is in the connected state, but it still cannot access the Internet, you can consider whether a compulsory portal authentication is needed. If a compulsory portal is needed, you can access the network service address for compulsory portal authentication by launching a headless browser locally.

[0127] As an implementation manner, the above determination of whether captive portal authentication is required may specifically include:

[0128] Access the preset public network interface;

[0129] Determine whether preset data is received;

[0130] If the preset data is not received, it is determined that captive portal authentication is required.

[0131] The preset network interface may be a public network http interface that only returns 204. The preset data may indicate the data that can be returned by accessing the preset public network interface. If the preset data cannot be received, it may indicate that captive portal authentication is required. If 204 cannot be successfully returned, it may indicate that captive portal authentication is required.

[0132] If captive portal authentication is required, the IoT device can obtain a redirected access address, which can be a page address for captive portal authentication. The IoT device can provide the address to the terminal, and the terminal can display the authentication page for captive portal authentication.

[0133] In the embodiment of this specification, the terminal can also be used to assist the Internet of Things device to connect to the network. Optionally, the method in the embodiment of this specification can also include:

[0134] Acquire network connection parameters provided by the terminal; the network connection parameters include a network identifier and a network connection password of a long-distance communication network;

[0135] connecting the long-distance communication network based on the network connection parameters;

[0136] and / or,

[0137] Acquire network configuration parameters provided by the terminal; the network configuration parameters include at least one of an IP address, a gateway address, and a DNS server address;

[0138] The parameter configuration of the long-distance communication network is completed based on the network configuration parameters.

[0139] Among them, the terminal can be connected to the IoT device through near-field communication such as Bluetooth. If the IoT device needs to enter the network name, password and other information, the user can enter the password and other information in the terminal, and the terminal can send this information to the IoT device, so that the IoT device can connect to the network based on these network connection parameters. Long-distance communication networks can include wired networks, wireless networks, etc.

[0140] When the IoT device is already connected to the network but needs to configure network parameters, the network configuration parameters can also be set through the terminal. For example, parameters such as IP address, gateway address, DNS server address, etc. can be set in the terminal, and the terminal can provide these parameters to the IoT device, so that the IoT device can also configure the network parameters.

[0141] In actual applications, if the IoT device has a wired network connection interface, it can also be connected to a wired network. After the terminal establishes near-field communication with the IoT device, the user can set the wired network parameters of the IoT device in the terminal, specifically in a client that matches the IoT device. In this way, even if the IoT device does not have a screen or information input component, it can be connected to a wired network.

[0142] The following combination Figure 3 , taking the application of the network configuration method of the Internet of Things device provided in this specification in the Bluetooth network configuration as an example, the network configuration method of the Internet of Things device is further described. Among them, Figure 3 A flowchart of a processing process of a network configuration method for an Internet of Things device provided by an embodiment of this specification is shown, which specifically includes the following steps.

[0143] Step 302: The IoT device turns on the Bluetooth function and starts the Bluetooth BLE service.

[0144] Step 304: Obtain the network status of the IoT device.

[0145] The network status may include the Internet connection status, the wireless network connection status, the wired network connection status and other network connection status. To facilitate data transmission, the information representing the network status may also be compressed and saved in the embodiments of this specification. Specifically, data compression may be performed using bitwise encoding. If there are 8 switch states that need to be recorded, and each switch has only two states, open (1) and closed (0), then these 8 states may be respectively corresponded to each bit of a byte (8 bits). The example operation is as follows: initialize a byte: 0b00000000; assuming that the first switch is open (1), the first bit is set to 1, i.e., 0b00000001; assuming that the third switch is open (1), the third bit is set to 1, i.e., 0b00000101, and so on, until all states are encoded into one byte. In this way, up to 8 different state information may be stored in one byte. The above-mentioned wireless network connection status, wired network connection status, Internet connection status, etc. can be represented as "0-1 switch bit" data, and this data compression method can be used.

[0146] Step 306: Determine whether the IoT device is connected to the Internet.

[0147] The obtained network status information can be used to determine whether the IoT device is connected to the network.

[0148] Step 308: If the IoT device is in a connected state, it can be determined whether the Internet is connected.

[0149] Step 310: If the Internet of the network to which the IoT device is connected is connected, the process can be terminated.

[0150] IoT devices can access the Internet and process business through a connected network that is already connected to the Internet.

[0151] Step 312: If the Internet of the network to which the IoT device is connected is not connected, determine whether a captive portal authentication is required.

[0152] Among them, the IoT device can start a headless browser to access the set default web page. If the preset data is not obtained, but the redirected access address is obtained, it can indicate that a captive portal authentication is required. For example, if a public network http interface that only returns 204 is accessed, if 204 cannot be successfully returned, it can indicate that a captive portal is required, and the redirected network service address for captive portal authentication can be obtained.

[0153] Step 314: If mandatory portal authentication is required, the IoT device may provide the network service address for mandatory portal authentication to the terminal that has established the Bluetooth connection.

[0154] If captive portal authentication is not required, it may be that the network is connected but the network is not connected to the Internet, and the process can be ended.

[0155] Step 316: The terminal accesses the network service address and obtains the authentication page.

[0156] Among them, the terminal can establish a network connection with the IoT device through network connection methods such as USB and intranet cable, and then access the network service address used for mandatory portal authentication through a local browser or in the client to display the authentication page.

[0157] Step 318: The terminal generates authentication information based on the authentication page.

[0158] Step 320: After obtaining the authentication information, the network server completes the mandatory authentication of the IoT device.

[0159] Step 322: If the IoT device is not connected to the Internet, the network can be set up through the terminal.

[0160] Specifically, there are three situations. The first situation may include:

[0161] Step 324: The terminal scans wireless networks to determine a wireless network to be connected.

[0162] Step 326: The user enters the wireless network password in the terminal.

[0163] Step 328: The terminal provides the wireless network connection parameters to the IoT device via Bluetooth.

[0164] The wireless network connection parameters may include the wireless network SSID and password, etc.

[0165] Step 330: After obtaining the wireless network connection parameters, the IoT device can connect to the wireless network.

[0166] The second scenario may include:

[0167] Step 332: The user inputs wireless network configuration parameters in the terminal.

[0168] Wireless network parameters may include parameter configuration methods, such as DHCP or manual, and may also include parameters such as IP, gateway, and DNS server address.

[0169] Step 334: The terminal provides the wireless network configuration parameters to the IoT device via Bluetooth communication.

[0170] Step 336: The IoT device can complete the customized parameter configuration of the wireless network based on the acquired wireless network parameters.

[0171] IoT devices can connect to wireless networks by configuring custom wireless network parameters.

[0172] The third scenario may include:

[0173] Step 338: The user enters wired network configuration parameters in the terminal.

[0174] Step 340: The terminal provides the wired network configuration parameters to the IoT device via Bluetooth communication.

[0175] Step 342: The IoT device completes the custom parameter configuration of the wired network based on the acquired wired network configuration parameters.

[0176] Wired network parameters can include parameter configuration methods, such as DHCP or manual, and can also include parameters such as IP, gateway, DNS server address, etc. IoT devices can connect to wired networks through customized wired network parameter configuration.

[0177] In actual applications, in the process of customizing wireless or wired network parameters, multiple parameters need to be used. In the embodiments of this specification, if the GATT protocol is used for data transmission, each network parameter can be represented as a different feature. In GATT, a service is a set of related functions. For example, in the network configuration process, each service consists of one or more characteristics. A feature is a data point in a service. It has a unique UUID (Universal Unique Identifier) ​​that is used to identify a specific feature. In the embodiments of this specification, several features are required to complete network configuration. The following table shows some of the features involved in this specification:

[0178]

[0179] Characteristics can be divided into read characteristics (Read Characteristic) and write characteristics (Write Characteristic). Among them, read characteristics can allow the GATT client to obtain data from the characteristics of the GATT server. Write characteristics enable the GATT client to send data to the characteristics of the GATT server. The characteristic types in the above table are defined from the perspective of the GATT client.

[0180] In the embodiments of this specification, the terminal or IoT device can act as a GATT client or a GATT server, which can be defined according to the needs of the actual execution steps. The terminal or client can maintain data representing network characteristics, such as the various data in the above table. The terminal or client can change the attribute values ​​of each characteristic in a timely manner according to actual needs. For example, after the terminal obtains the password provided by the user, it can update the password to the wireless network setting feature so that the IoT device can read the data. For example, after the IoT device obtains the network service address for mandatory portal authentication, it can update the address information to the mandatory portal authentication address feature so that the terminal can read the address. Different characteristics can correspond to different UUIDs, and the terminal or IoT device can obtain the required information based on the UUID.

[0181] Considering that the amount of data transmitted by Bluetooth BLE is limited, the embodiments of this specification can also compress the IP, subnet mask, gateway, DNS and other information into 20 bytes. Specifically, in the function of wireless or wired custom network parameters, the IP address, subnet mask, gateway, DNS and other information can be compressed into 20 bytes.

[0182] The IP address is usually an IPv4 address, which can occupy 4 bytes.

[0183] The subnet mask, similar to 255.255.255.0, can be expressed as / 24, that is, 24. This range is 0 to 32 and can be represented by 1 byte.

[0184] The gateway can be an IPv4 address or it can be represented by 4 bytes.

[0185] DNS usually sets 1 DNS address, which is also an IPv4 address and can also occupy 4 bytes.

[0186] The network configuration mode, i.e. DHCP or custom, can occupy 1 byte and can be represented by 0 or 1 in actual applications.

[0187] The network parameters used to configure the network in this way occupy a total of 4+1+4+4+1=14 bytes. Within the 20-byte limit specified by the GATT protocol, the configuration parameters can be transmitted via Bluetooth BLE, and the integrity of the parameters can also be guaranteed.

[0188] Corresponding to the above method embodiment with the terminal as the execution subject, this specification also provides an embodiment of a network configuration device for an Internet of Things device. Figure 4 The schematic diagram of the structure of a network distribution device for an Internet of Things device provided by an embodiment of the present specification is shown. The device can be applied to a terminal, such as Figure 4 As shown, the device may include:

[0189] A near field communication module 402, configured to establish near field communication with an IoT device that requires captive portal authentication;

[0190] The address acquisition module 404 is configured to acquire, through a near field communication communication method, a network service address for performing captive portal authentication that is accessed by the IoT device through a locally launched headless browser;

[0191] A network connection module 406 is configured to establish a network connection with the IoT device;

[0192] The authentication acquisition module 408 is configured to access the network service address based on the network to which the network connection is connected, and obtain an authentication page;

[0193] The information generation module 410 is configured to generate authentication information based on the authentication page, so that the network server completes the mandatory portal authentication of the Internet of Things device based on the authentication information.

[0194] Optionally, the near field communication module 402 may be specifically configured to establish low power Bluetooth communication with an IoT device that requires captive portal authentication based on preset communication protocol rules.

[0195] Optionally, the network connection module 406 may be specifically configured to connect to the IoT device through a preset network interface to share the network of the IoT device.

[0196] Optionally, the information generation module 410 may be specifically configured to: display the authentication page; and obtain authentication information filled in by the user based on the authentication page.

[0197] Optionally, the address acquisition module 404 may be specifically configured as follows:

[0198] Acquire, by a near field communication method, a first compressed address obtained by compressing, by the IoT device according to a first data compression rule, a network service address for performing captive portal authentication accessed by locally starting a headless browser;

[0199] The first compressed address is decompressed according to a first decompression rule to obtain the network service address.

[0200] Optionally, the device may further include a password setting module, which may be specifically configured as follows:

[0201] Acquiring a connectable long-distance communication network; the long-distance communication network includes a wired network or a wireless network;

[0202] Get the network connection password provided by the user;

[0203] The network identifier of the long-distance communication network and the network connection password are sent to the Internet of Things device so that the Internet of Things device can connect to the long-distance communication network.

[0204] Optionally, the device may also include a first data compression module, which may be specifically configured to: process the network identifier of the long-distance communication network and the network connection password according to a second data compression rule to obtain compressed data; and send the compressed data to the Internet of Things device via a near field communication method.

[0205] Optionally, the device may further include a network parameter configuration module, which may be configured as follows:

[0206] Displaying a network parameter configuration page for connecting to a long-distance communication network; the long-distance communication network includes a wired network or a wireless network;

[0207] Acquire network configuration parameters obtained based on the network parameter configuration page; the network configuration parameters include at least one of an IP address, a gateway address, and a DNS server address;

[0208] The network configuration parameters are provided to the IoT device so that the IoT device completes the parameter configuration of the long-distance communication network.

[0209] Optionally, the device may further include a second data compression module, which may be configured to: process the network configuration parameters according to a third data compression rule to obtain compressed network configuration parameters; and send the compressed network configuration parameters to the Internet of Things device via near field communication.

[0210] Corresponding to the above method embodiment with the IoT device as the execution subject, this specification also provides an embodiment of a network distribution device for the IoT device. Figure 5 The schematic diagram of the structure of a network distribution device for an Internet of Things device provided by an embodiment of the present specification is shown. The device can be applied to Internet of Things devices, such as Figure 5 As shown, the device may include:

[0211] A near field communication module 502, configured to establish near field communication with a terminal;

[0212] The address access module 504 is configured to access the network service address for performing captive portal authentication by launching a headless browser locally;

[0213] The address sending module 506 is configured to provide the network service address to the terminal through the near field communication method, so that the terminal can access the network service address and generate authentication information based on the network connected to the network connection established with the Internet of Things device, and the authentication information is used by the network server to complete the mandatory portal authentication of the Internet of Things device.

[0214] Optionally, the device may further include a network status determination module, which may be configured to:

[0215] Get network connection status;

[0216] If the network connection state is in a connected state, it is determined whether captive portal authentication is required.

[0217] Optionally, the network status determination module may be specifically configured as follows:

[0218] Access the preset public network interface;

[0219] Determine whether preset data is received;

[0220] If the preset data is not received, it is determined that captive portal authentication is required.

[0221] Optionally, the device may further include a network parameter acquisition module, which may be configured to:

[0222] Acquiring network connection parameters provided by the terminal; the network connection parameters include a network identifier and a network connection password of the long-distance communication network; connecting to the long-distance communication network based on the network connection parameters;

[0223] And / or, obtaining network configuration parameters provided by the terminal; the network configuration parameters include at least one of an IP address, a gateway address, and a DNS server address; and completing parameter configuration of the long-distance communication network based on the network configuration parameters.

[0224] The above is a schematic scheme of a network distribution device for an IoT device of this embodiment. It should be noted that the technical scheme of the network distribution device for the IoT device and the technical scheme of the network distribution method for the IoT device described above belong to the same concept, and the details of the technical scheme of the network distribution device for the IoT device that are not described in detail can all be referred to the description of the technical scheme of the network distribution method for the IoT device described above.

[0225] Figure 6 The block diagram of a computing device 600 according to an embodiment of the present specification is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.

[0226] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface, wired or wireless (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, and a Near Field Communication (NFC).

[0227] In one embodiment of the present specification, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 6 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0228] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 600 may also be a mobile or stationary server.

[0229] Among them, the processor 620 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned network configuration method for the Internet of Things device.

[0230] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the network configuration method of the above-mentioned Internet of Things device belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the network configuration method of the above-mentioned Internet of Things device.

[0231] An embodiment of the present specification also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the above-mentioned network configuration method for the Internet of Things device are implemented.

[0232] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the network configuration method of the above-mentioned Internet of Things device belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the network configuration method of the above-mentioned Internet of Things device.

[0233] An embodiment of the present specification also provides a computer product, which may include a computer program / instruction, wherein when the computer program / instruction is executed in a computer, the computer executes the steps of the above-mentioned network configuration method for an Internet of Things device.

[0234] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the network configuration method of the above-mentioned Internet of Things device belong to the same concept, and the details not described in detail in the technical scheme of the computer program can be referred to the description of the technical scheme of the network configuration method of the above-mentioned Internet of Things device.

[0235] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0236] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0237] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0238] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0239] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A network configuration method for IoT devices. It is characterized in that Applied to terminals, including: Establishing near field communication with IoT devices that require captive portal authentication; Obtaining, by means of near field communication, a network service address for performing captive portal authentication that is accessed by the IoT device by launching a headless browser locally; Establishing a network connection with the IoT device; Access the network service address based on the network to which the network connection is connected, and obtain an authentication page; Based on the authentication page, authentication information is generated so that the network server completes the mandatory portal authentication of the Internet of Things device based on the authentication information.

2. The method according to claim 1, It is characterized in that The IoT device has a Bluetooth function; the step of establishing near field communication with the IoT device that requires captive portal authentication specifically includes: Based on preset communication protocol rules, establish low-power Bluetooth communication with IoT devices that require captive portal authentication.

3. The method according to claim 1, It is characterized in that The establishing of a network connection with the IoT device specifically includes: Connect to the IoT device through a preset network interface to share the network of the IoT device.

4. The method according to claim 1, It is characterized in that The authentication page includes an area for filling in authentication information; the generating authentication information based on the authentication page specifically includes: Displaying the authentication page; Obtain the authentication information filled in by the user based on the authentication page.

5. The method according to claim 1, It is characterized in that The obtaining, by means of near field communication, a network service address for performing captive portal authentication that is accessed by the IoT device through a locally started headless browser specifically includes: Acquire, by a near field communication method, a first compressed address obtained by compressing, by the IoT device according to a first data compression rule, a network service address for performing captive portal authentication accessed by locally starting a headless browser; The first compressed address is decompressed according to a first decompression rule to obtain the network service address.

6. The method according to claim 1, It is characterized in that The method further comprises: Acquire a connectable long-distance communication network; the long-distance communication network includes a wired network or a wireless network; Get the network connection password provided by the user; The network identifier of the long-distance communication network and the network connection password are sent to the Internet of Things device so that the Internet of Things device can connect to the long-distance communication network.

7. The method according to claim 6, It is characterized in that The sending the network identifier of the target long-distance communication network and the network connection password to the Internet of Things device specifically includes: Processing the network identifier of the long-distance communication network and the network connection password according to a second data compression rule to obtain compressed data; The compressed data is sent to the IoT device via near field communication.

8. The method according to claim 1, It is characterized in that The method further comprises: Displaying a network parameter configuration page for connecting to a long-distance communication network; the long-distance communication network includes a wired network or a wireless network; Acquire network configuration parameters obtained based on the network parameter configuration page; the network configuration parameters include at least one of an IP address, a gateway address, and a DNS server address; The network configuration parameters are provided to the IoT device so that the IoT device completes the parameter configuration of the long-distance communication network.

9. The method according to claim 8, It is characterized in that Providing the network configuration parameters to the IoT device specifically includes: Processing the network configuration parameters according to a third data compression rule to obtain compressed network configuration parameters; The compressed network configuration parameters are sent to the Internet of Things device via near field communication.

10. A network configuration method for an IoT device. It is characterized in that Applied to IoT devices, including: Establishing near field communication with a terminal; Access the network service address used for captive portal authentication by launching a headless browser locally; The network service address is provided to the terminal through the near field communication method, so that the terminal can access the network service address and generate authentication information based on the network connected to the network connection established with the Internet of Things device, and the authentication information is used by the network server to complete the mandatory portal authentication of the Internet of Things device.

11. The method according to claim 10, It is characterized in that Before the method starts the headless browser locally to access the network service address for performing the captive portal authentication, the method further includes: Get network connection status; If the network connection state is connected, determining whether captive portal authentication is required; The method of accessing the network service address for performing the captive portal authentication by launching a headless browser locally specifically includes: If captive portal authentication is required, start a headless browser locally to access the network service address used for captive portal authentication.

12. The method according to claim 11, It is characterized in that The determining whether captive portal authentication is required specifically includes: Access the preset public network interface; Determine whether preset data is received; If the preset data is not received, it is determined that captive portal authentication is required.

13. The method according to claim 10, It is characterized in that The method further comprises: Acquire network connection parameters provided by the terminal; the network connection parameters include a network identifier and a network connection password of a long-distance communication network; connecting the long-distance communication network based on the network connection parameters; and / or, Acquire network configuration parameters provided by the terminal; the network configuration parameters include at least one of an IP address, a gateway address, and a DNS server address; The parameter configuration of the long-distance communication network is completed based on the network configuration parameters.

14. A network distribution device for IoT equipment, It is characterized in that Applied to terminals, including: A near field communication module, configured to establish near field communication with an IoT device requiring captive portal authentication; An address acquisition module is configured to acquire, through a near field communication method, a network service address for performing a captive portal authentication that is accessed by the IoT device through a locally launched headless browser; A network connection module, configured to establish a network connection with the IoT device; an authentication acquisition module, configured to access the network service address based on the network to which the network connection is connected, and acquire an authentication page; The information generation module is configured to generate authentication information based on the authentication page, so that the network server completes the mandatory portal authentication of the Internet of Things device based on the authentication information.

15. A network distribution device for IoT equipment, It is characterized in that Applied to IoT devices, including: A near field communication module, configured to establish near field communication with a terminal; An address access module is configured to access a network service address for performing captive portal authentication by launching a headless browser locally; The address sending module is configured to provide the network service address to the terminal through the near field communication method, so that the terminal can access the network service address and generate authentication information based on the network connected to the network connection established with the Internet of Things device, and the authentication information is used by the network server to complete the mandatory portal authentication of the Internet of Things device.

16. A computing device, It is characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the network configuration method for an Internet of Things device described in any one of claims 1 to 13 are implemented.

17. A computer-readable storage medium, It is characterized in that It stores computer executable instructions, which, when executed by a processor, can implement the steps of the network configuration method for an Internet of Things device as described in any one of claims 1 to 13.

18. A computer program product, It is characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the steps of the network configuration method for an Internet of Things device as described in any one of claims 1 to 13.