Router connection method and device

CN120642460APending Publication Date: 2025-09-12HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480009876.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-05-31
Filing Date
2024-03-19
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The connection method of existing routers is complicated, and users need to manually enter the WIFI password, which affects the connection experience.

Method used

Scan the router's QR code through the terminal device to obtain the router's SSID and password, establish a LAN connection, and obtain the returned SSID and password through the LAN connection, so as to realize the WIFI connecting the router without manual input by the user.

Benefits of technology

Simplifies the router connection process, improves the user experience, reduces the trouble of memory passwords, and obtains Internet access information in LAN connections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120642460A_ABST
    Figure CN120642460A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a router connection method and device, and the method comprises the steps: building first WIFI connection with terminal equipment based on a first WIFI SSID and a first WIFI password; based on the first WIFI connection, sending a second WIFI SSID (Service Set Identifier) and a second WIFI password to the terminal equipment; and establishing a second WIFI connection with the terminal device based on the second WIFI SSID and the second WIFI password. Therefore, the router can realize the local area network connection with the terminal equipment through the first WIFI, and obtains the information of the second WIFI through the local area network connection, thereby realizing the WIFI connection with the router, realizing the connection with the router WIFI without inputting information such as a WIFI password by a user, and bringing better connection experience to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Router connection method and device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on May 31, 2023, with application number 202310644223.0 and application name “Router Connection Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a router connection method and device. Background Art

[0003] With the popularization and development of the Internet, wireless fidelity (WIFI) technology has been widely used in daily life and office scenarios. WIFI technology is a wireless local area network technology based on the Institute of Electrical and Electronics Engineers (IEEE) 802.11 standard.

[0004] Typically, when a terminal device is connected to a router's WIFI, the terminal device can open a WIFI search in the settings function based on user operations, select any WIFI to be connected, and enter the WIFI password to successfully connect to the WIFI.

[0005] However, the above router connection method is relatively complicated.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a router connection method and device. When a terminal device obtains a first Wi-Fi SSID and a first Wi-Fi password based on a target QR code, the router can achieve a local area network connection with the terminal device, and return a second Wi-Fi SSID and a second Wi-Fi password to the terminal device via the local area network connection, thereby achieving a Wi-Fi connection with the router. This allows the user to connect to the router's Wi-Fi without actively entering information such as the Wi-Fi password, thereby providing the user with a better connection experience.

[0008] In a first aspect, an embodiment of the present application provides a method for connecting a router, which is applied to the router, the method comprising: establishing a first WIFI connection with a terminal device based on a first WIFI SSID and a first WIFI password, wherein the first WIFI SSID and the first WIFI password are determined based on attribute parameters of the router indicated in a target QR code, wherein the target QR code is a QR code corresponding to the router; sending a second WIFI SSID and a second WIFI password to the terminal device based on the first WIFI connection; and establishing a second WIFI connection with the terminal device based on the second WIFI SSID and the second WIFI password. In this way, when the terminal device obtains the first WIFI SSID and the first WIFI password based on the target QR code, the router can achieve a local area network connection with the terminal device, and return the second WIFI SSID and the second WIFI password to the terminal device via the local area network connection, thereby achieving a WIFI connection with the router, so that the user can connect to the router WIFI without actively entering information such as the WIFI password, thereby providing the user with a better connection experience.

[0009] In one possible implementation, the first WIFI connection is a local area network connection. In this way, the router can return the WIFI information that allows Internet access, such as the second WIFI SSID and the second WIFI password, to the terminal device through the local area network connection, thereby establishing a second WIFI connection with the terminal device.

[0010] In one possible implementation, after establishing the second Wi-Fi connection, the method further includes: receiving a first data packet from the terminal device based on the second Wi-Fi connection, where the first data packet is a data packet for accessing a network server via the router; and sending a second data packet to the terminal device, where the second data packet is a response data packet generated by the network server upon receiving the first data packet. In this way, the router and the terminal device can access the Internet via the established second Wi-Fi connection. For example, the router can forward the first data packet received from the terminal device to the network server based on the second Wi-Fi connection and return a second data packet in response to the terminal device.

[0011] In one possible implementation, after establishing the second WIFI connection, the method further includes: closing the first WIFI connection. In this way, when establishing the second WIFI connection, resource consumption between the router and the terminal device can be reduced by closing the first WIFI connection.

[0012] In one possible implementation, the second Wi-Fi SSID is changed to a third Wi-Fi SSID, and / or the second Wi-Fi password is changed to a third Wi-Fi password. The method further includes: establishing a first Wi-Fi connection with the terminal device based on the first Wi-Fi SSID and the first Wi-Fi password; sending attribute information of a third Wi-Fi to the terminal device based on the first Wi-Fi connection, the attribute information of the third Wi-Fi including the third Wi-Fi SSID and the third Wi-Fi password; and establishing a third Wi-Fi connection with the terminal device based on the attribute information of the third Wi-Fi. In this way, even if the second Wi-Fi password is changed, the router can still establish a first Wi-Fi connection with the terminal device using the first Wi-Fi SSID and the first Wi-Fi password, and return the third Wi-Fi SSID and the third Wi-Fi password to the terminal device based on the first Wi-Fi connection, thereby establishing a second Wi-Fi connection with the terminal device, thereby reducing the user's trouble in remembering Wi-Fi passwords.

[0013] In a possible implementation, the attribute parameters of the router include a serial number SN of the router, and the first WIFI SSID and the first WIFI password are determined based on the SN of the router.

[0014] It can be understood that the SN of the router is unique, and the first WIFI SSID and the first WIFI password resolved by the SN are also unique. Therefore, regardless of whether the user knows the WIFI password, the terminal device can use the SN in the attribute parameters of the router to resolve the first WIFI SSID and the first WIFI password, realize the LAN connection between the router and the terminal device, and obtain the WIFI connection information that can access the Internet when the LAN is connected.

[0015] In one possible implementation, sending the second Wi-Fi SSID and the second Wi-Fi password to the terminal device based on the first Wi-Fi connection includes: receiving a first request from the terminal device based on the first Wi-Fi connection; and sending a first message to the terminal device, the first message including the second Wi-Fi SSID and the second Wi-Fi password, the first message being a message generated by the router in response to the first request. In this way, when the router establishes a local area network connection with the terminal device, the router can send Wi-Fi connection information that enables internet access to the terminal device, thereby establishing a Wi-Fi connection between the terminal device and the router.

[0016] The first request may be the request for obtaining routing information described in S1310, and the first message may include the routing information described in S1311.

[0017] In one possible implementation, before receiving the first request from the terminal device, the method further includes: receiving a second request from the terminal device; and sending a second message to the terminal device, wherein the second message includes a symmetric key, the second message being generated by the router in response to the second request, and the first message being generated by the router encrypting the second Wi-Fi SSID and the second Wi-Fi password using the symmetric key. In this way, the router can return a symmetric key supported by the router to the terminal device via the second request and the second message, thereby enabling the communication link between the router and the terminal device to be encrypted based on the symmetric key to ensure data transmission security.

[0018] In one possible implementation, the first message also includes information indicating whether the router wizard configuration is complete. The method further includes: when the information indicating whether the router wizard configuration is complete indicates that the router wizard configuration is not complete, receiving a fourth request from the terminal device; and sending a fourth message to the terminal device, the fourth message generated by the router in response to the fourth request, the fourth message including the router's Internet access method, including Ethernet Point-to-Point Protocol (PPPOE) or Dynamic Host Configuration Protocol (DHCP). In this way, the router can return the obtained Internet access method to the terminal device via the fourth request and the fourth message, allowing the terminal device to display a configuration interface corresponding to a subsequent Internet access method.

[0019] In a second aspect, an embodiment of the present application provides a router connection method, comprising: receiving a first operation of a user scanning a target QR code, where the target QR code is a QR code corresponding to a router; in response to the first operation, obtaining a first Wi-Fi service set identifier (SSID) and a first Wi-Fi password based on the target QR code, where the first Wi-Fi SSID and the first Wi-Fi password are determined based on attribute parameters of the router; establishing a first Wi-Fi connection with the router based on the first Wi-Fi SSID and the first Wi-Fi password; obtaining a second Wi-Fi SSID and a second Wi-Fi password from the router based on the first Wi-Fi connection; and establishing a second Wi-Fi connection with the router based on the second Wi-Fi SSID and the second Wi-Fi password. In this way, a terminal device can first establish a local area network (LAN) connection with the router by directly scanning a target QR code preset in the router, then automatically obtain Wi-Fi connection information that allows Internet access through the LAN connection, and then establish a Wi-Fi connection that allows Internet access through the router. This allows the user to automatically connect to Wi-Fi by simply scanning the target QR code preset in the router, without having to actively enter information such as a Wi-Fi password, thereby providing the user with a better connection experience.

[0020] In one possible implementation, the first WIFI connection is a LAN connection. In this way, the terminal device can establish LAN communication with the router through the first WIFI connection, so that the terminal device can automatically obtain WIFI connection information that can access the Internet, such as the second WIFI SSID and the second WIFI password, through the LAN communication, and then establish a WIFI connection with the router that can access the Internet.

[0021] Among them, the target QR code can be the mini program code described in the embodiments of this application.

[0022] In one possible implementation, after establishing the second Wi-Fi connection, the method further includes: sending a first data packet to the router based on the second Wi-Fi connection, the first data packet being a data packet for accessing a network server via the router; and receiving a second data packet from the router, the second data packet being a response data packet generated by the network server upon receiving the first data packet. In this way, the terminal device and the router can access the Internet via the established second Wi-Fi connection. For example, the router can forward the first data packet received from the terminal device to the network server based on the second Wi-Fi connection and return a second data packet in response to the terminal device.

[0023] In a possible implementation, after establishing the second WIFI connection, the method further includes: closing the first WIFI connection. In this way, when establishing the second WIFI connection, resource consumption between the terminal device and the router can be reduced by closing the first WIFI connection.

[0024] In one possible implementation, the second Wi-Fi SSID is changed to a third Wi-Fi SSID, and / or the second Wi-Fi password is changed to a third Wi-Fi password. The method further includes: receiving a second operation of a user scanning a target QR code; in response to the second operation, obtaining the first Wi-Fi SSID and the first Wi-Fi password based on the target QR code; establishing a first Wi-Fi connection with a router based on the first Wi-Fi SSID and the first Wi-Fi password; obtaining attribute information of a third Wi-Fi from the router based on the first Wi-Fi connection, the attribute information of the third Wi-Fi including: a third Wi-Fi SSID and a third Wi-Fi password; and establishing a third Wi-Fi connection with the router based on the attribute information of the third Wi-Fi. In this way, even if the second Wi-Fi password is changed, the first Wi-Fi connection can be re-established with the router by scanning the target QR code, thereby obtaining the changed third Wi-Fi SSID and the third Wi-Fi password from the router, thereby reducing the user's trouble in remembering Wi-Fi passwords.

[0025] Among them, in the attribute information of the third WIFI: the third WIFI SSID is the same as the second WIFI SSID and the third WIFI password is different from the second WIFI password, or the third WIFI SSID is different from the second WIFI SSID and the third WIFI password is the same as the second WIFI password, or the third WIFI SSID is different from the second WIFI SSID and the third WIFI password is different from the second WIFI password.

[0026] In one possible implementation, after establishing the second Wi-Fi connection, the method further includes: receiving a third operation from the user; and in response to the third operation, sending attribute information of the third Wi-Fi to the router. The attribute information of the third Wi-Fi is obtained by adjusting the attribute information of the second Wi-Fi based on the third operation. The attribute information of the second Wi-Fi includes: a second Wi-Fi SSID and a second Wi-Fi password. In this way, the user can flexibly modify the second Wi-Fi SSID and the second Wi-Fi password, and the modified attribute information of the third Wi-Fi can be sent to the router for easy access by the terminal device.

[0027] In a possible implementation, the attribute parameters of the router include a serial number SN of the router, and the first WIFI SSID and the first WIFI password are determined based on the SN of the router.

[0028] It can be understood that the SN of the router is unique, and the first WIFI SSID and the first WIFI password resolved by the SN are also unique. Therefore, regardless of whether the user knows the WIFI password, the terminal device can use the SN in the attribute parameters of the router to resolve the first WIFI SSID and the first WIFI password, realize the LAN connection between the router and the terminal device, and obtain the WIFI connection information that can access the Internet when the LAN is connected.

[0029] In one possible implementation, obtaining a second Wi-Fi SSID and a second Wi-Fi password from a router based on a first Wi-Fi connection includes: sending a first request to the router based on the first Wi-Fi connection; and receiving a first message from the router, the first message including the second Wi-Fi SSID and the second Wi-Fi password, the first message being generated by the router in response to the first request. In this way, when a local area network connection is established between a terminal device and the router, the terminal device can obtain Wi-Fi connection information that allows internet access, such as the router's actual second Wi-Fi SSID and second Wi-Fi password, thereby establishing a Wi-Fi connection between the terminal device and the router.

[0030] The first request may be the request for obtaining routing information described in S1310, and the first message may include the routing information described in S1311.

[0031] In one possible implementation, before sending the first request, the method further includes: sending a second request to the router; and receiving a second message from the router, wherein the second message includes the symmetric key, the second message being generated by the router in response to the second request, and the first message being generated by the router encrypting the second Wi-Fi SSID and the second Wi-Fi password using the symmetric key. In this way, the terminal device can obtain the symmetric key supported by the router through the second request and the second message, and the communication link between the terminal device and the router can be encrypted based on the symmetric key to ensure data transmission security.

[0032] The second request may be the request for obtaining the symmetric key described in S1308, and the second message may include the symmetric key described in S1309.

[0033] In one possible implementation, before establishing the first Wi-Fi connection, the method further includes: obtaining a uniform resource locator (URL) from the target QR code; sending a third request to the first server, the third request including the URL; receiving a third message from the first server, and displaying a first prompt message on the first interface, the third message including at least one interface information corresponding to the URL, the at least one interface information including interface information corresponding to the first interface, the third message being a message generated by the server in response to the third request, and the first prompt message being used to prompt the terminal device to enter the scan code connection system. In this way, the terminal device can launch the mini program and display the first interface using the URL obtained from the target QR code, thereby enriching the user's experience using the scan code connection system.

[0034] Among them, the third request can be the request for obtaining the mini program page described in S1303, the third message can include the page information corresponding to the mini program described in S1304, the first interface can be the interface shown in b in Figure 5, and the first prompt information can be the prompt information described in the interface shown in b in Figure 5 for prompting the user to join the scan-to-connect system.

[0035] In one possible implementation, after displaying the first prompt information in the first interface, the method further includes: displaying second prompt information in the second interface, the second prompt information being used to prompt the terminal device that the first information is being synchronized, and the first information includes: a second WIFI SSID and a second WIFI password.

[0036] Among them, the second interface can be the interface shown in c in Figure 5, the first information can be the routing information described in the embodiment of the present application, and the second prompt information can be the prompt information shown in c in Figure 5 for prompting that the routing information is being synchronized.

[0037] In one possible implementation, after obtaining the second Wi-Fi SSID and second Wi-Fi password from the router, the method further includes: sequentially displaying a third prompt message and a fourth prompt message on the second interface, wherein the third prompt message indicates that the first information has been successfully synchronized with the terminal device, and the fourth prompt message indicates that the terminal device is connecting to the router Wi-Fi. In this way, the user can confirm the different stages of the terminal device's connection to the router Wi-Fi through the third and fourth prompt messages, thereby enriching the user's experience using the one-scan connection system.

[0038] The second interface can be the interface shown in d in Figure 5, or the interface shown in e in Figure 5, the third prompt information can be the prompt information in the interface shown in d in Figure 5 for prompting that the routing information synchronization is successful, and the fourth prompt information can be the prompt information in the interface shown in e in Figure 5 for prompting that the router WIFI is being connected.

[0039] In one possible implementation, the method further includes: when the first information is not detected, displaying a fifth prompt message and a sixth prompt message on the second interface, wherein the fifth prompt message is used to indicate that synchronization of the first information on the terminal device has failed, and the sixth prompt message includes at least one strategy for retrieving the first information. In this way, the user can determine that the first information was not detected using the fifth prompt message, and determine the possible cause of the synchronization failure using the sixth prompt message, allowing the user to promptly repair the connection between the terminal device and the router using the sixth prompt message, thereby enriching the user's experience using the one-scan-to-connect system.

[0040] Among them, the second interface can be the interface shown in a of Figure 10, the fifth prompt information can be the prompt information in the interface shown in a of Figure 10 for prompting the failure of routing configuration, and the sixth prompt information can be the prompt information for prompting the user to adjust the line.

[0041] In one possible implementation, after establishing the second Wi-Fi connection, the method further includes: displaying a seventh prompt message on the second interface, where the seventh prompt message is used to indicate that the terminal device has successfully connected to the router. In this way, the user can confirm the successful connection of the terminal device to the router Wi-Fi through the seventh prompt message, thereby enriching the user's experience of using the one-scan connection function.

[0042] Among them, the second interface can be the interface shown in f in Figure 5, and the seventh prompt information can be the prompt information in the interface shown in f in Figure 5 for prompting that the connection to the router WIFI has been completed.

[0043] In one possible implementation, the first information may further include information indicating whether the router wizard configuration is complete. The method further includes: when the information indicating whether the router wizard configuration is complete indicates that the router wizard configuration is not complete, sending a fourth request to the router; and receiving a fourth message from the router, the fourth message being generated by the router in response to the fourth request and including the router's Internet access method. The router's Internet access method may include Ethernet Point-to-Point Protocol (PPPOE) or Dynamic Host Configuration Protocol (DHCP). In this way, the terminal device may obtain the Internet access method from the router via the fourth request and the fourth message, thereby displaying a configuration interface corresponding to a subsequent Internet access method.

[0044] The fourth request may be the request for obtaining the Internet access method described in S1401, and the fourth message may include the Internet access method detection result described in S1402.

[0045] In one possible implementation, the target QR code is a mini-program code. This allows the terminal device to fully utilize the convenience of the mini-program, using it to connect to the router's Wi-Fi and / or use it to configure the routing wizard, making it easy for ordinary users to connect and configure the router.

[0046] In one possible implementation, after sending the fourth request to the router, the method further includes: displaying an eighth prompt message on the third interface, where the eighth prompt message is used to indicate that the terminal device is detecting the router's Internet access method. In this way, the user can understand the different stages of the router wizard configuration through the eighth prompt message.

[0047] Among them, the third interface can be the interface shown in a in Figure 6 or the interface shown in a in Figure 8, and the eighth prompt information can be the prompt information described in the interface shown in a in Figure 6 or the interface shown in a in Figure 8, which is used to prompt that the router's Internet access method is being detected.

[0048] In one possible implementation, after receiving the fourth message from the router, the method further includes: displaying a first control on a third interface, the first control being used to indicate completion of the router wizard configuration; and when the Internet access method is PPPOE, the third interface further includes: a text box for setting a second Wi-Fi SSID, a text box for setting a second Wi-Fi password, a text box for setting a broadband account, and a text box for setting a broadband password; or, when the Internet access method is DHCP, the third interface further includes: a text box for setting a second Wi-Fi SSID, and a text box for setting a second Wi-Fi password. In this way, the terminal device can implement router wizard configuration for different Internet access methods, making it convenient for ordinary users to connect to and configure the router without any barriers to entry.

[0049] Among them, the third interface can be any interface in b to d in Figure 6, or any interface in a to c in Figure 8, and the first control can be the completion configuration control 603 described in the embodiment corresponding to Figure 6, or the completion configuration control 805 described in the embodiment corresponding to Figure 8.

[0050] When the Internet access method is PPPOE, referring to the embodiment corresponding to FIG8 , the text box for setting the second WIFI SSID may be text box 803, the text box for setting the second WIFI password may be text box 804, the text box for setting the broadband account may be text box 801, and the text box for setting the broadband password may be text box 802. Alternatively, when the Internet access method is DHCP, referring to the embodiment corresponding to FIG6 , the text box for setting the second WIFI SSID may be text box 601, and the text box for setting the second WIFI password may be text box 602.

[0051] In a possible implementation, the Internet access method is PPPOE, the router wizard configuration includes the Internet access method configuration corresponding to PPPOE, and the WIFI configuration of the router, and the method further includes: receiving the user input of the second WIFI SSID in the text box for setting the second WIFI SSID, entering the second WIFI password in the text box for setting the second WIFI password, entering the broadband account corresponding to PPPOE in the text box for setting the broadband account, entering the broadband password corresponding to PPPOE in the text box for setting the broadband password, and receiving the user's fourth operation on the first control; in response to the fourth operation, sending a fifth message to the router and displaying a ninth prompt information in the third interface, the fifth message including: the second WIFI The SSID, the second WIFI password, the broadband account corresponding to PPPOE, and the broadband password corresponding to PPPOE are displayed. A ninth prompt message is used to prompt that the router is saving the router wizard configuration corresponding to the fourth operation. Upon receiving the sixth message from the router, a tenth prompt message is displayed on the third interface. The tenth prompt message is used to prompt that the router wizard configuration is successful. The sixth message is a message generated when the router receives the fifth message and determines that the router wizard configuration is successful. Alternatively, upon receiving the seventh message from the router, an eleventh prompt message is displayed on the third interface. The eleventh prompt message is used to prompt that the router wizard configuration failed. The seventh message is a message generated when the router receives the fifth message and determines that the router wizard configuration failed. The router wizard configuration failure includes: the PPPOE corresponding Internet access configuration and / or the router's WIFI configuration. In this way, the user can configure the PPPOE Internet access method in the third interface and can determine the router configuration status based on the tenth prompt message or the eleventh prompt message.

[0052] Among them, the fifth message can be a message containing the configuration information described in S1406, the sixth message can be a message described in S1413 for indicating successful configuration, the seventh message can be a message described in S1408 for indicating failure of Internet access configuration, and / or a message described in S1411 for indicating failure of WIFI configuration.

[0053] The tenth prompt information can be the prompt information in the interface shown in d in Figure 7 or the interface shown in d in Figure 9 for prompting the completion of router configuration; the eleventh prompt information can be any prompt information in the interface shown in a in Figure 11, or b in Figure 11, or c in Figure 11.

[0054] In one possible implementation, the method further includes: sending a fifth request to the router and displaying a twelfth prompt message on the third interface, wherein the fifth request is for requesting the restart of the router's second Wi-Fi network, and the twelfth prompt message is for indicating that the router is restarting the second Wi-Fi network; receiving an eighth message from the router, wherein the eighth message is a message generated by the router in response to the fifth request; and after receiving the eighth message from the router, displaying a thirteenth prompt message on the third interface, wherein the thirteenth prompt message is for indicating that the terminal device is connecting to the router's second Wi-Fi network. In this way, the user can determine the different stages of the terminal device's connection to the router based on the twelfth and thirteenth prompt messages, thereby improving the user's experience using the one-scan-to-connect system.

[0055] The fifth request may be the request for instructing to restart the second WIFI described in S1414, and the eighth message may be the message for indicating that the second WIFI has been successfully restarted described in S1415. The twelfth prompt information may be the prompt information for prompting to restart WIFI in the interface shown in b of FIG. 7 or b of FIG. 9, and the thirteenth prompt information may be the prompt information for prompting to reconnect WIFI in the interface shown in c of FIG. 7 or c of FIG. 9.

[0056] In one possible implementation, the method further includes: displaying a fourteenth prompt message on the first interface when it is detected that the model corresponding to the terminal device does not meet the preset model; and / or displaying a fifteenth prompt message on the first interface when it is detected that the system version corresponding to the terminal device does not meet the preset system version, wherein both the fourteenth prompt message and the fifteenth prompt message are used to prompt the user to download a preset application, and the preset application is used to implement the router wizard configuration. In this way, the user can perform the router wizard configuration in the preset application according to the guidance of the terminal device.

[0057] The fourteenth prompt information may be the prompt information shown in a or b in FIG12 , which is used to prompt that the one-scan connection system does not support the current model and to download the Smart Space APP. The fifteenth prompt information may be the prompt information shown in c in FIG12 , which is used to prompt that the system version is low and to download the Smart Space APP.

[0058] Among them, the preset application can be the smart space APP described in the embodiment of this application.

[0059] In a third aspect, an embodiment of the present application provides a connection device for a router, wherein a communication unit in the router is used to establish a first WIFI connection with a terminal device based on a first WIFI SSID and a first WIFI password, wherein the first WIFI SSID and the first WIFI password are determined based on attribute parameters of the router indicated in a target QR code, and the target QR code is a QR code corresponding to the router; the communication unit in the router is also used to send a second WIFI SSID and a second WIFI password to the terminal device based on the first WIFI connection; the communication unit in the router is also used to establish a second WIFI connection with the terminal device based on the second WIFI SSID and the second WIFI password.

[0060] In a possible implementation, the first WIFI connection is a local area network connection.

[0061] In one possible implementation, the communication unit in the router is further used to receive a first data packet from the terminal device based on the second WIFI connection, where the first data packet is a data packet for accessing the network server through the router; the communication unit in the router is further used to send a second data packet to the terminal device, where the second data packet is a response data packet generated by the network server when receiving the first data packet.

[0062] In a possible implementation, the communication unit in the router is further configured to close the first WIFI connection.

[0063] In one possible implementation, the communication unit in the router is further used to establish a first WIFI connection with the terminal device based on the first WIFI SSID and the first WIFI password; the communication unit in the router is further used to send attribute information of a third WIFI to the terminal device based on the first WIFI connection, where the attribute information of the third WIFI includes: the third WIFI SSID and the third WIFI password; the communication unit in the router is further used to establish a third WIFI connection with the terminal device based on the attribute information of the third WIFI.

[0064] In a possible implementation, the attribute parameters of the router include a serial number SN of the router, and the first WIFI SSID and the first WIFI password are determined based on the SN of the router.

[0065] In one possible implementation, the communication unit in the router is further configured to receive a first request from the terminal device based on the first WIFI connection; the communication unit in the router is further configured to send a first message to the terminal device, where the first message includes the second WIFI SSID and the second WIFI password, and the first message is generated by the router in response to the first request.

[0066] In one possible implementation, the communication unit in the router is further configured to receive a second request from the terminal device; the communication unit in the router is further configured to send a second message to the terminal device, where the second message includes a symmetric key, the second message is generated by the router in response to the second request, and the first message is generated by the router after encrypting the second WIFI SSID and the second WIFI password using the symmetric key.

[0067] In a possible implementation, the first message also includes: information for indicating whether the router wizard configuration is completed; when the information for indicating whether the router wizard configuration is completed indicates that the router has not completed the wizard configuration, the communication unit in the router is further used to receive a fourth request from the terminal device; the communication unit in the router is further used to send a fourth message to the terminal device, the fourth message being a message generated by the router in response to the fourth request, the fourth message including the Internet access method of the router, and the Internet access method of the router including: Ethernet Point-to-Point Communication Protocol PPPOE, or Dynamic Host Configuration Protocol DHCP.

[0068] In a fourth aspect, an embodiment of the present application provides a router connection device, which includes a processing unit in a terminal device and a communication unit in the terminal device, the processing unit in the terminal device being used to receive a first operation of a user scanning a target QR code, where the target QR code is a QR code corresponding to the router; in response to the first operation, the processing unit in the terminal device is further used to obtain a first WIFI service set identifier SSID and a first WIFI password based on the target QR code, where the first WIFI SSID and the first WIFI password are determined based on attribute parameters of the router; the communication unit in the terminal device is used to establish a first WIFI connection with the router based on the first WIFI SSID and the first WIFI password; the communication unit in the terminal device is further used to obtain a second WIFI SSID and a second WIFI password from the router based on the first WIFI connection; the communication unit in the terminal device is further used to establish a second WIFI connection with the router based on the second WIFI SSID and the second WIFI password.

[0069] In a possible implementation, the first WIFI connection is a local area network connection.

[0070] In one possible implementation, after establishing the second WIFI connection, the communication unit in the terminal device is further used to send a first data packet to the router based on the second WIFI connection, where the first data packet is a data packet for accessing the network server through the router; the communication unit in the terminal device is further used to receive a second data packet from the router, where the second data packet is a response data packet generated when the network server receives the first data packet.

[0071] After establishing the second WIFI connection, the communication unit in the terminal device is further configured to close the first WIFI connection.

[0072] In one possible implementation, the second WIFI SSID is changed to a third WIFI SSID, and / or the second WIFI password is changed to a third WIFI password. The processing unit in the terminal device is further used to receive a second operation of the user scanning a target QR code; in response to the second operation, the processing unit in the terminal device is further used to obtain the first WIFI SSID and the first WIFI password based on the target QR code; the communication unit in the terminal device is further used to establish a first WIFI connection with the router based on the first WIFI SSID and the first WIFI password; the communication unit in the terminal device is further used to obtain attribute information of a third WIFI from the router based on the first WIFI connection, the attribute information of the third WIFI including: a third WIFI SSID and a third WIFI password; the communication unit in the terminal device is further used to establish a third WIFI connection with the router based on the attribute information of the third WIFI.

[0073] In one possible implementation, the processing unit in the terminal device is further configured to receive a third operation from the user; in response to the third operation, the communication unit in the terminal device is further configured to send attribute information of a third Wi-Fi network to the router, where the attribute information of the third Wi-Fi network is obtained by adjusting attribute information of the second Wi-Fi network based on the third operation, and the attribute information of the second Wi-Fi network includes: a second Wi-Fi SSID and a second Wi-Fi password.

[0074] In a possible implementation, the attribute parameters of the router include a serial number SN of the router, and the first WIFI SSID and the first WIFI password are determined based on the SN of the router.

[0075] In one possible implementation, the communication unit in the terminal device is specifically used to send a first request to the router based on the first WIFI connection; the communication unit in the terminal device is also specifically used to receive a first message from the router, where the first message includes a second WIFI SSID and a second WIFI password, and the first message is a message generated by the router in response to the first request.

[0076] In one possible implementation, the communication unit in the terminal device is further used to send a second request to the router; the communication unit in the terminal device is further used to receive a second message from the router, the second message includes a symmetric key, the second message is a message generated by the router in response to the second request, and the first message is a message generated by the router after encrypting the second WIFI SSID and the second WIFI password using the symmetric key.

[0077] In one possible implementation, the processing unit in the terminal device is also used to obtain a uniform resource locator (URL) from the target QR code; the communication unit in the terminal device is also used to send a third request to the first server, and the third request includes a URL; the communication unit in the terminal device is also used to receive a third message from the first server, and the display unit in the terminal device is used to display a first prompt information in the first interface, the third message includes at least one interface information corresponding to the URL, and the at least one interface information includes interface information corresponding to the first interface, the third message is a message generated by the server in response to the third request, and the first prompt information is used to prompt the terminal device to enter the code scanning connection system.

[0078] In a possible implementation, the display unit in the terminal device is further used to display second prompt information in the second interface, and the second prompt information is used to prompt the terminal device that the first information is being synchronized, and the first information includes: a second WIFI SSID and a second WIFI password.

[0079] In one possible implementation, the display unit in the terminal device is also used to display a third prompt message and a fourth prompt message in sequence in the second interface. The third prompt message is used to prompt that the first information is successfully synchronized in the terminal device, and the fourth prompt message is used to prompt that the terminal device is connecting to the router WIFI.

[0080] In one possible implementation, when the first information is not detected, the display unit in the terminal device is also used to display a fifth prompt message and a sixth prompt message in the second interface, the fifth prompt message being used to prompt that the first information has failed to synchronize in the terminal device, and the sixth prompt message includes at least one strategy for reacquiring the first information.

[0081] In a possible implementation, the display unit in the terminal device is further configured to display seventh prompt information in the second interface, where the seventh prompt information is configured to prompt that the terminal device is successfully connected to the router.

[0082] In one possible implementation, the first information may also include: information for indicating whether the router wizard configuration is completed. When the information for indicating whether the router wizard configuration is completed indicates that the router has not completed the wizard configuration, the communication unit in the terminal device is further used to send a fourth request to the router; the communication unit in the terminal device is further used to receive a fourth message from the router, the fourth message being a message generated by the router in response to the fourth request. The fourth message includes the router's Internet access method, and the router's Internet access method includes: Ethernet point-to-point communication protocol PPPOE, or dynamic host configuration protocol DHCP.

[0083] In a possible implementation, the display unit in the terminal device is further configured to display an eighth prompt message in the third interface, where the eighth prompt message is configured to prompt the terminal device that it is detecting the Internet access mode of the router.

[0084] In one possible implementation, the display unit in the terminal device is further used to display a first control in the third interface, where the first control is used to indicate completion of the router wizard configuration. When the Internet access method is PPPOE, the third interface also includes: a text box for setting a second WIFI SSID, a text box for setting a second WIFI password, a text box for setting a broadband account, and a text box for setting a broadband password. Alternatively, when the Internet access method is DHCP, the third interface also includes: a text box for setting a second WIFI SSID, and a text box for setting a second WIFI password.

[0085] In one possible implementation, the Internet access method is PPPOE, the router wizard configuration includes the Internet access method configuration corresponding to PPPOE, and the WIFI configuration of the router, the processing unit in the terminal device is further used to receive the user input of the second WIFI SSID in the text box for setting the second WIFI SSID, the second WIFI password in the text box for setting the second WIFI password, the broadband account corresponding to PPPOE in the text box for setting the broadband account, the broadband password corresponding to PPPOE in the text box for setting the broadband password, and receive the user's fourth operation on the first control; in response to the fourth operation, the communication unit in the terminal device is further used to send a fifth message to the router, and the display unit in the terminal device is further used to display a ninth prompt information in the third interface, the fifth message including: the second WIFI SSID, second WIFI password, broadband account corresponding to PPPOE, and broadband password corresponding to PPPOE, the ninth prompt information is used to prompt that the router is saving the router wizard configuration corresponding to the fourth operation; when the communication unit in the terminal device receives the sixth message from the router, the display unit in the terminal device is also used to display the tenth prompt information in the third interface, the tenth prompt information is used to prompt that the router wizard configuration is successful, the sixth message is the message generated when the router receives the fifth message and determines that the router wizard configuration is successful; or, when the communication unit in the terminal device receives the seventh message from the router, the display unit in the terminal device is also used to display the eleventh prompt information in the third interface, the eleventh prompt information is used to prompt that the router wizard configuration failed, the seventh message is the message generated when the router receives the fifth message and determines that the router wizard configuration failed, and the router wizard configuration failure includes: the Internet access method configuration corresponding to PPPOE, and / or the WIFI configuration of the router.

[0086] In one possible implementation, the communication unit in the terminal device is further used to send a fifth request to the router, and the display unit in the terminal device is further used to display a twelfth prompt message in the third interface, where the fifth request is used to request to restart the second WIFI of the router, and the twelfth prompt message is used to prompt that the router is restarting the second WIFI; the communication unit in the terminal device is further used to receive an eighth message from the router, where the eighth message is a message generated by the router in response to the fifth request; the display unit in the terminal device is further used to display a thirteenth prompt message in the third interface, where the thirteenth prompt message is used to prompt that the terminal device is connecting to the second WIFI of the router.

[0087] In one possible implementation, when the processing unit in the terminal device detects that the model corresponding to the terminal device does not meet the preset model, the display unit in the terminal device is also used to display the fourteenth prompt information in the first interface; and / or, when the processing unit in the terminal device detects that the system version corresponding to the terminal device does not meet the preset system version, the display unit in the terminal device is also used to display the fifteenth prompt information in the first interface. The fourteenth prompt information and the fifteenth prompt information are both used to prompt the user to download a preset application, and the preset application is used to implement router wizard configuration.

[0088] In a fifth aspect, the present application provides a terminal device comprising a memory and one or more processors; wherein the memory is used to store computer program code, and the computer program code comprises computer instructions; when the computer instructions are executed by the processor, the terminal device executes the method in the second aspect and any possible design thereof.

[0089] In a sixth aspect, the present application provides a router comprising a memory and one or more processors; wherein the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the router executes the method in the first aspect and any possible design thereof.

[0090] In a seventh aspect, the present application provides a computer-readable storage medium comprising computer instructions. When the computer instructions are executed on a terminal device (such as a computer), the terminal device executes the method of the second aspect and any possible design thereof, or when the computer instructions are executed on a router, the router executes the method of the first aspect and any possible design thereof.

[0091] In an eighth aspect, the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method of the first aspect and any possible design thereof, or the method of the second aspect and any possible design thereof.

[0092] In a ninth aspect, the present application provides a chip system comprising one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via a circuit. The chip system can be applied to a terminal device comprising a communication module and a memory. The interface circuit is configured to receive a signal from the memory of the terminal device and send the received signal to the processor, the signal comprising a computer instruction stored in the memory. When the processor executes the computer instruction, the terminal device can execute the method of the second aspect and any possible design thereof.

[0093] It can be understood that the beneficial effects of the third to ninth aspects mentioned above can be referred to the beneficial effects in the first to second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] FIG1 is a schematic diagram of a scenario provided by an embodiment of the present application;

[0095] Figure 2 is a schematic diagram of an interface for connecting to a router WIFI;

[0096] Figure 3 is a schematic diagram of an interface for sharing a WIFI password;

[0097] FIG4 is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application;

[0098] FIG5 is a schematic diagram of an interface for connecting to a router provided in an embodiment of the present application;

[0099] FIG6 is a schematic diagram of a router configuration interface provided in an embodiment of the present application;

[0100] FIG7 is a second schematic diagram of an interface of a router configuration provided in an embodiment of the present application;

[0101] FIG8 is a first diagram of an interface of another router configuration provided in an embodiment of the present application;

[0102] FIG9 is a second schematic diagram of an interface of another router configuration provided in an embodiment of the present application;

[0103] FIG10 is a schematic diagram of an interface in which routing information is not detected according to an embodiment of the present application;

[0104] FIG11 is a schematic diagram of an interface showing a router configuration failure according to an embodiment of the present application;

[0105] FIG12 is a schematic diagram of an interface for prompting downloading the Smart Space APP provided in an embodiment of the present application;

[0106] FIG13 is a flow chart of a router connection method according to an embodiment of the present application;

[0107] FIG14 is a flow chart of a parameter configuration method for a router provided in an embodiment of the present application;

[0108] FIG15 is a structural diagram 1 of a router connection device provided in an embodiment of the present application;

[0109] FIG16 is a second structural diagram of a router connection device provided in an embodiment of the present application;

[0110] FIG17 is a schematic diagram of the hardware structure of another device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0111] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first value and the second value are merely used to distinguish different values ​​and do not limit their order. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit different values.

[0112] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0113] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.

[0114] To facilitate understanding of the embodiments of the present application, some of the terms involved in the present application are first briefly explained.

[0115] 1. Point-to-point protocol over Ethernet (PPPOE) Internet access

[0116] PPPOE is a dial-up Internet access method that uses the PPPOE protocol. Typically, after activating broadband, the operator will provide users with a broadband account and password. Users can enter these accounts and passwords into a terminal device configured with a router. Once these accounts and passwords are successfully verified, the terminal device can obtain an Internet Protocol (IP) address and access the Internet.

[0117] 2. Dynamic host configuration protocol (DHCP) Internet access

[0118] DHCP Internet access is a method of accessing the Internet using the DHCP protocol and a dynamic IP address assigned by a DHCP server. Typically, a terminal device automatically obtains an IP address when it needs to access the Internet, and then accesses the Internet using the obtained IP address.

[0119] The router connection method provided in the embodiments of the present application can be applied to the aforementioned PPPOE and / or DHCP internet access. Combining PPPOE and DHCP internet access, it can be understood that DHCP internet access does not require identity authentication; the terminal device only needs to wait for the DHCP server to randomly assign an IP address from multiple IP addresses. PPPOE internet access, on the other hand, requires identity authentication first. Only when the broadband account and broadband password are verified correctly can the terminal device be assigned a valid IP address.

[0120] For example, Figure 1 is a schematic diagram of a scenario provided by an embodiment of the present application. As shown in Figure 1 , the scenario may include: a terminal device 101 and a router 102, where the terminal device 101 may be a mobile phone.

[0121] Typically, after a user obtains the router 102, they may need to configure the router 102 using a wizard according to different Internet access methods. After the wizard configuration is completed, the terminal device can access the WIFI network by connecting to the router 102. For example, the terminal device 101 may open a setting function based on a user operation, search for WIFI signals when the user turns on a WIFI search button, establish a connection with the router 102 when the user triggers any WIFI and enters the password corresponding to the WIFI, and access the Internet wirelessly.

[0122] Specifically, Figure 2 is a schematic diagram of an interface for connecting to a router's WIFI. When a terminal device searches for a connectable network, it may display the interface shown in Figure 2a, which may include controls 201 corresponding to WIFI1 and controls corresponding to WIFI2. When the terminal device receives a user triggering a control corresponding to any WIFI, such as receiving a user triggering control 201 corresponding to WIFI1, the terminal device may display the interface shown in Figure 2b. The interface shown in Figure 2b may include a text box for entering the password corresponding to WIFI1, and the user can connect to WIFI1 by entering the password in this text box.

[0123] In the scenario corresponding to Figure 2 above, the user needs to manage the WIFI password entered when connecting to the router. When the user does not know the WIFI password, the terminal device 101 can also be connected to the WIFI of the router 102 based on the following two methods.

[0124] In one implementation, the terminal device 101 can connect to the router 102 by triggering a preset button in the router 102, and the preset button is used to achieve a quick connection between the terminal device 101 and the router 102. For example, the terminal device 101 can search for a router 102 with a preset button and display a password setting interface based on a user operation. When the terminal device 101 receives an operation from the user to set the WIFI password of the router 102, the terminal device 101 can send the WIFI password to the router 102. Furthermore, when the user triggers the logo corresponding to the router 102 in the interface displayed on the terminal device 101 and brings the terminal device 101 close to the router 102, the router 102 can discover the terminal device 101, and then the user can trigger the preset button in the router 102 to connect the terminal device 101 to the WIFI of the router 102.

[0125] In another implementation, when the user does not know the WIFI password, the terminal device 101 can also obtain the WIFI password by scanning the QR code shared by other devices that have been connected to the WIFI of the router 102 (as shown in the corresponding interface of Figure 3), and then access the WIFI of the router 102 based on the user's operation of entering the WIFI password in this device.

[0126] Figure 3 is a schematic diagram of an interface for sharing a WIFI password. Figure 3 shows an interface displayed by a device connected to the WIFI of router 102. The interface may include one or more of the following: a control 301 corresponding to WIFI1, a QR code 302 corresponding to WIFI1, and text information indicating the sharing of the WIFI password. The present embodiment of the application does not specifically limit the content displayed in the interface. Alternatively, terminal device 101 can obtain the password for WIFI1 by scanning QR code 302 and connect to the WIFI of router 102 upon receiving the password for WIFI1 input by the user.

[0127] However, regardless of whether the user knows the WIFI password or not, the steps for connecting the terminal device to the router WIFI are relatively cumbersome and affect the user's experience of using the WIFI function.

[0128] In view of this, an embodiment of the present application provides a router connection method. A terminal device can first establish a local area network connection with the router by directly scanning a target QR code preset on the router. Then, through the local area network connection, it automatically obtains Wi-Fi connection information that can access the Internet, and then establishes a Wi-Fi connection that can access the Internet through the router. This allows users to automatically connect to Wi-Fi by simply scanning the target QR code preset on the router, without having to actively enter information such as a Wi-Fi password, thereby providing users with a better connection experience.

[0129] The core of this solution is that the terminal device first establishes a local area network connection with the router through the first WIFI SSID and the first WIFI password parsed from the target QR code, thereby establishing a preliminary connection with the router. After the connection is established, the terminal device can obtain WIFI connection information that can access the Internet from the router through the local area network, such as the second WIFI SSID and the second WIFI password. Then, after connecting to the router using the WIFI connection information that can access the Internet, the terminal device can connect to the network server through the router to access the Internet.

[0130] Among them, since the first WIFI SSID and the first WIFI password are parameters generated based on the attribute parameters of the router, and the second WIFI SSID and the second WIFI password are parameters used to connect to the router and achieve Internet access, this solution can establish a local area network connection between the terminal device and the router through the first WIFI, and obtain WIFI connection information that can access the Internet, such as the second WIFI SSID and the second WIFI password, when the LAN connection is established, thereby reducing the trouble caused by users remembering WIFI passwords.

[0131] In a possible implementation, if the user has not performed wizard configuration on the router, the terminal device can open a browser (or download an application (APP) provided by the router manufacturer) based on the user's operation, and complete the wizard configuration of the router by automatically obtaining the IP address, changing the WIFI name, and setting the WIFI password in the browser interface, or complete the wizard configuration of the router by entering the broadband account and broadband password, changing the WIFI name, and setting the WIFI password in the browser interface.

[0132] In view of the fact that the configuration of router parameters is relatively complicated, the embodiment of the present application provides a router connection method that can also enable the terminal device to scan the mini-program code preset in the router to achieve extremely simple configuration of the router in the process of quickly connecting to the router WIFI.

[0133] The above-mentioned terminal devices can be called terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. For example, the terminal devices can be mobile phones, smart TVs, wearable devices, tablet computers (Pad), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc. The embodiments of the present application do not limit the specific technologies and specific device forms adopted by the terminal devices.

[0134] In order to better understand the embodiment of the present application, the structure of the terminal device of the embodiment of the present application is introduced below. For example, FIG4 is a schematic diagram of the hardware structure of a terminal device provided in the embodiment of the present application.

[0135] As shown in Figure 4, the terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, an indicator 192, a camera 193, and a display screen 194, etc.

[0136] The sensor module 180 may include one or more of the following, for example: a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, or a bone conduction sensor.

[0137] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0138] The processor 110 may include one or more processing units. The different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.

[0139] The USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the terminal device, or to transfer data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio. The interface can also be used to connect other devices, such as AR devices.

[0140] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110.

[0141] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160 and baseband processor.

[0142] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. The antennas in a terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0143] Mobile communication module 150 provides wireless communication solutions for terminal devices, including 2G / 3G / 4G / 5G. It can include at least one filter, switch, power amplifier, and low-noise amplifier (LNA). Mobile communication module 150 receives electromagnetic waves from antenna 1, filters and amplifies them, and transmits them to a modem for demodulation.

[0144] The wireless communication module 160 can provide wireless communication solutions applied to terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.

[0145] The modem may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker, a receiver, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem may be an independent device. In other embodiments, the modem may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0146] The terminal device implements display functions through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.

[0147] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0148] The terminal device can realize the shooting function through the ISP, camera 193, video codec, GPU, display 194 and application processor.

[0149] The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0150] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0151] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 can include a program storage area and a data storage area.

[0152] The terminal device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0153] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The terminal device can listen to music or listen to hands-free calls through the speaker 170A. The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be heard by placing the receiver 170B close to the human ear. The headphone jack 170D is used to connect a wired headset. The microphone 170C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. In an embodiment of the present application, the terminal device may have a microphone 170C.

[0154] Keys 190 include a power button, a volume button, and other buttons. Keys 190 can be mechanical or touch-sensitive. The terminal device can receive key inputs and generate key signal inputs related to user settings and function control of the terminal device. Indicator 192 can be an indicator light that can be used to indicate charging status, battery level changes, messages, missed calls, notifications, and the like.

[0155] In addition, on top of the above components, the device also runs an operating system, such as the iOS operating system, the Android operating system, or the Windows operating system. Applications can be installed and run on the operating system.

[0156] The software system of the terminal device can adopt a layered architecture, event-driven architecture, micro-kernel architecture, microservice architecture, or cloud architecture, etc., which will not be described here.

[0157] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other. For the same or similar concepts or processes, some embodiments may not be described in detail.

[0158] The embodiment of the present application provides a method for connecting to a router, so that a terminal device can scan the mini-program code pre-installed on the router body, pull up the mini-program page, and connect to the router WIFI and configure the router based on user operations on the mini-program page. The applet in the application can be understood that the embodiment of the present application can make full use of The social attributes of the application and the convenient attributes of the mini program make it possible for terminal devices to Scan the mini program code associated with the router to automatically and quickly connect to the router's WIFI and perform minimalist configuration of the router, making it convenient for ordinary users to connect and configure the router with zero threshold.

[0159] For example, the terminal device can quickly connect to the router WIFI based on the embodiment corresponding to Figure 5 if the router has been configured with the wizard; or, the terminal device can implement router configuration based on the embodiments corresponding to Figures 6-7 (or Figures 8-9) if the router has not been configured with the wizard.

[0160] 6-7 may be examples of configuring a router for a DHCP Internet access method, and FIG. 8-9 may be examples of configuring a router for a PPPOE Internet access method.

[0161] It can be understood that when the terminal device has not configured the router, the router configuration process can be completed as follows: the terminal device obtains routing information based on a scan connection system (or it can also be called a scan code connection system) described in the embodiment corresponding to Figure 5. When it is determined from the routing information that the router has not been configured with a wizard, the terminal device can implement router configuration based on the embodiments corresponding to Figures 6-7 (or Figures 8-9), and then connect to the router WIFI.

[0162] Among them, routing information (or first information) can be understood as information stored in the router, and the routing information may include one or more of the following: the second WIFI SSID, the second WIFI password, the gateway IP address corresponding to the bridge (bridge, abbreviated as br) br0, the Internet access status, or information used to indicate whether the router wizard configuration is completed, etc.

[0163] For example, FIG5 is a schematic diagram of an interface for connecting to a router provided in an embodiment of the present application.

[0164] Open on terminal device When you use the scan function of the application and point the camera in the terminal device at the mini program code on the router body, the terminal device can display the interface shown in a of Figure 5, which may include: the mini program code.

[0165] When a terminal device scans a mini-program code, the terminal device may open the mini-program page corresponding to the mini-program code and display the interface shown in Figure 5(b). This interface may be the mini-program homepage, which indicates that the user has opened the mini-program. This interface may include one or more of the following: a prompt welcoming the user to the XX Scan-to-Connect system, a control for exiting the mini-program, or a control for forwarding the mini-program.

[0166] The prompt message for welcoming the user to join the one-scan-connect system can be displayed as: Welcome to join the XX one-scan-connect system. One-scan-connect can be understood as scanning the mini program code to connect to the router WIFI.

[0167] The terminal device may stay in the interface shown in FIG5 b for a period of time such as 2 seconds and then automatically jump to the interface shown in FIG5 c. The interface shown in FIG5 c is used to indicate that routing information is being synchronized. The interface may include one or more of the following: a prompt message for indicating that routing information is being synchronized, a progress bar for indicating the status of routing information synchronization, or a graphic indicating that the terminal device and the router are synchronizing routing information.

[0168] After the terminal device obtains routing information from the router, the terminal device may switch from the interface shown in FIG5 c to the interface shown in FIG5 d. The interface shown in FIG5 d is used to indicate that the terminal device has obtained routing information. The interface may include one or more of the following: an indicator 501 indicating that the terminal device is connected to the router's WIFI, a prompt indicating that routing information synchronization is successful, a text indicator indicating that information synchronization between the terminal device and the router has been completed, a text indicator indicating that the router's WIFI is connected in the second step, or a graphic indicating that routing information synchronization between the terminal device and the router has been completed.

[0169] Among them, the mark 501 is used to indicate that the terminal device has been connected to the first WIFI of the router. The specific description of the first WIFI can be referred to the embodiment corresponding to Figure 13. In a possible implementation, the mark 501 can also be displayed in the interface shown in c in Figure 5, or it can be understood that the terminal device has been connected to the first WIFI of the router during the process of synchronizing the routing information.

[0170] Typically, the time it takes for a terminal device to synchronize routing information may be 6 seconds, that is, the time it takes for a terminal device to switch from the interface shown in c in FIG. 5 to the interface shown in d in FIG. 5 may be 6 seconds, etc.

[0171] Furthermore, when the terminal device determines that the router has been configured with a wizard based on the routing information, the terminal device can switch from the interface shown in d in Figure 5 to the interface shown in e in Figure 5, where the interface shown in e in Figure 5 is used to indicate that the terminal device is connecting to the router WIFI. For example, the interface can display a prompt message indicating that the router WIFI is being connected. After connecting to the router WIFI, the terminal device can display an interface shown in f in Figure 5, where the interface is used to indicate that the terminal device has been connected to the router WIFI. For example, the interface can display a prompt message indicating that the router WIFI has been connected. The router WIFI described in the interfaces shown in e to f in Figure 5 can be the second WIFI described in the embodiments of the present application. For a detailed description of the second WIFI, please refer to the embodiment corresponding to Figure 13.

[0172] Based on this, users can confirm the different stages of the process of connecting to the router WIFI according to the interface displayed by the terminal device after scanning the mini program code, simplifying the way the terminal device connects to the router WIFI and enriching the user experience of using the one-scan connection function.

[0173] For example, FIG6 is a schematic diagram of an interface of a router configuration provided in an embodiment of the present application.

[0174] As shown in the interface d in Figure 5, when the terminal device determines based on the routing information that the router has not been configured, the terminal device can display the interface as shown in Figure 6 a, where the interface shown in Figure 6 a is used to indicate that the terminal device is detecting the Internet environment. The interface shown in Figure 6 a includes: prompt information for prompting that the Internet access method of the router is being detected, a text mark for indicating that the terminal device has completed information synchronization with the router, a text mark for indicating that Internet access configuration is being performed in the second step, and a text mark for indicating that the settings are completed in the third step.

[0175] In the interface shown in a of FIG6 , the terminal device may display the interface shown in b of FIG6 when detecting that the Internet access method is DHCP. The interface shown in b of FIG6 may be an interface for configuring the router for the DHCP Internet access method. The interface may include one or more of the following, such as: an identifier for indicating Internet access status, a text box 601 for setting a WIFI name, a text box 602 for setting a WIFI password, a control for downloading the Smart Space APP (or a preset application), a control for agreeing to the privacy statement, a control for agreeing to join the User Experience Improvement Program, a control for agreeing to automatically upgrade the mini-program, or a complete configuration control 603, etc.

[0176] The words "Network connected" can be displayed around the icon used to indicate the Internet access status; the words "I have read and agreed to the End User License Agreement and are aware of the statement about the smart router and privacy" can be displayed around the control for agreeing to the privacy statement. The smart router is the router described in the embodiment of this application; the words "Go to download" can be displayed around the control for downloading the Smart Space APP; the words "Automatically upgrade the device's applications and services to provide a better user experience (3:00-5:00 am)" can be displayed around the control for agreeing to automatically upgrade the mini-program.

[0177] The first WIFI service set identifier (SSID) may be displayed by default in text box 601, and the password may not be displayed in text box 602, and only the words "Please enter the password" may be displayed to prompt the user to enter the second WIFI password. For example, mingcheng1234 may be displayed in text box 601. Alternatively, the first WIFI SSID may not be displayed in text box 601. In this scenario, the words "Please enter the WIFI name" may be displayed in text box 601 to prompt the user to enter the second WIFI SSID, which is not shown in the interface shown in b in Figure 6. Among them, the WIFI SSID is the name of the wireless signal sent by the router, which can also be called the WIFI name. The second WIFI SSID may be the same as or different from the first WIFI SSID.

[0178] It is understandable that the terminal device can also display a DHCP logo in the interface shown in b in Figure 6. The DHCP logo is used to indicate that the router's Internet access method is DHCP. The user can identify that the DHCP Internet access method is currently being configured through the DHCP logo.

[0179] In the interface shown in b in Figure 6, when the terminal device receives the user's operation of entering a second WIFI SSID in text box 601 and a second WIFI password in text box 602, the terminal device can display the interface shown in c in Figure 6. The other content displayed in the interface shown in c in Figure 6 is similar to the interface shown in b in Figure 6, and will not be repeated here.

[0180] As shown in the interface c of Figure 6 , the second WIFI password is not visible, so multiple *'s may be displayed in text box 602. When the terminal device receives a user operation on the control for displaying the second WIFI password to the right of text box 602, the terminal device may display the entered second WIFI password in text box 602.

[0181] In a possible implementation, when the terminal device receives a trigger operation from the user on the completion configuration control 603 in the interface shown in c in Figure 6, and the control for agreeing to the privacy statement in the interface shown in c in Figure 6 is not selected, the terminal device can display a prompt box for prompting the user to check the privacy statement. The prompt box prompting the user to check the privacy statement can display a text message of "Please check the End User License Agreement and Smart Router and Privacy Statement" (not shown in the interface shown in c in Figure 6).

[0182] In a possible implementation, when the terminal device detects that the first WIFI password is consistent with the second WIFI password entered by the user, the terminal device may display a prompt message 604 in the interface shown in d of FIG6 . This prompt message 604 is used to remind the user that the second WIFI password is consistent with the first WIFI password. The prompt message 604 may be displayed as "The router login password is consistent with the WIFI password. Please keep it safe." The router password described in the prompt message 604 may be the router's default first WIFI password. The WIFI password described in the prompt message 604 may be the second WIFI password described in the embodiment of the present application. It can be understood that when the second WIFI password set by the user is consistent with the router's default first WIFI password, it may affect the security of the WIFI connection, so the terminal device may initiate a prompt.

[0183] It can be understood that the dotted box displayed in any interface described in the embodiment corresponding to Figure 6 is only used to indicate the content displayed in the interface and is not actually displayed in the interface.

[0184] Furthermore, FIG7 is a second schematic diagram of an interface of a router configuration provided in an embodiment of the present application.

[0185] In the interface shown in c of Figure 6, when the terminal device receives a user trigger operation for completing the configuration control 603, the terminal device may display the interface shown in a of Figure 7, which may include prompt information 701 for prompting that the configuration in the interface shown in c of Figure 6 is being saved. Furthermore, the terminal device may sequentially display the interface shown in b of Figure 7 and the interface shown in c of Figure 7, and display the interface shown in d of Figure 7 after successfully connecting to the router's WIFI.

[0186] The WIFI described in the interface shown in FIG7b and the interface shown in FIG7c may be a second WIFI. The interface shown in FIG7b is used to indicate that the second WIFI is being restarted. For example, the interface shown in FIG7b includes a prompt for restarting the WIFI. The interface shown in FIG7c is used to indicate that the second WIFI is being connected. The interface shown in FIG7c includes a prompt for reconnecting to the WIFI. The interface shown in FIG7d is used to indicate that the router setup has been completed. The interface shown in FIG7d includes one or more of the following: an icon of the XX router, a prompt indicating that the router configuration is complete, or a control for downloading the Smart Space app.

[0187] Based on this, the terminal device can automatically detect the routing Internet access method in the mini program, and implement the settings of the router for any Internet access method in the mini program, simplifying the router settings and improving the user experience of the one-scan connection system.

[0188] Illustratively, FIG8 is a first diagram of an interface of another router configuration provided in an embodiment of the present application.

[0189] As shown in the interface d in Figure 5, when the terminal device determines based on the routing information that the router has not been configured with a wizard, the terminal device can display the interface shown in Figure 8 a. The interface shown in Figure 8 a is similar to the interface shown in Figure 6 a, and will not be repeated here.

[0190] In the interface shown in a of FIG8 , the terminal device may display an interface shown in b of FIG8 when detecting that the Internet access method is PPPOE. The interface shown in b of FIG8 may be an interface for configuring a router for PPPOE Internet access. The interface may include one or more of the following: a text box 801 for indicating input of a broadband account number, or a text box 802 for indicating input of a broadband password. Other content displayed in the interface may be similar to that shown in b of FIG6 and will not be described in detail here.

[0191] The text box 801 may display the words “Please enter your broadband account number” to prompt the user to enter the broadband account number provided by the operator when the user applies for PPPOE Internet access; the text box 802 may display the words “Please enter your broadband password” to prompt the user to enter the broadband password provided by the operator when the user applies for PPPOE Internet access, and PPPOE Internet access can only be achieved when the broadband account number and broadband password are entered correctly.

[0192] It is understandable that the terminal device can also display the PPPOE logo in the interface shown in b in Figure 8. The PPPOE logo is used to indicate that the router's Internet access method is PPPOE. The user can use the PPPOE logo to identify that the PPPOE Internet access method is currently being configured.

[0193] In the interface shown in FIG8(b), when the terminal device receives the user input of the broadband account number in text box 801, the broadband password in text box 802, the second WIFI SSID in text box 803, and the second WIFI password in text box 804, the terminal device may display the interface shown in FIG8(c). In the interface shown in FIG8(c), text box 801 may display "abc123", and the password in text box 802 is invisible, so multiple * may be displayed in text box 802. For other content displayed in this interface, refer to the interface shown in FIG6(c) and will not be repeated here.

[0194] Furthermore, FIG9 is a second schematic diagram of an interface of another router configuration provided in an embodiment of the present application.

[0195] In the interface shown in c in Figure 8, when the terminal device receives a trigger operation from the user to complete the configuration control 805, the terminal device can display the interface shown in a in Figure 9, which may include prompt information for prompting that the configuration in the interface shown in c in Figure 8 is being saved. Furthermore, the terminal device can sequentially display the interface shown in b in Figure 9 and the interface shown in c in Figure 9, and display the interface shown in d in Figure 9 after successfully connecting to the router WIFI. Among them, the prompt information in the interface shown in a in Figure 9 - the interface shown in d in Figure 9 can be found in the description of the interface shown in a in Figure 7 - the interface shown in d in Figure 7, and will not be repeated here.

[0196] It can be understood that the terminal device can complete the router configuration for PPPOE Internet access based on the embodiments corresponding to Figures 8-9. After the router receives the broadband account and broadband password and confirms that the broadband account and broadband password are successfully verified, the IP address obtained from the network side can be returned to the terminal device to realize the subsequent Internet access function of the terminal device.

[0197] Based on this, the terminal device can automatically detect the routing Internet access method in the mini program, and implement the settings of the router for any Internet access method in the mini program, simplifying the router settings and improving the user experience of the one-scan connection system.

[0198] On the basis of the embodiment corresponding to FIG. 5 , when the terminal device fails to detect the routing information, the terminal device may prompt the user to reacquire the routing information based on the embodiment corresponding to FIG. 10 .

[0199] For example, FIG10 is a schematic diagram of an interface in which routing information is not detected, provided in an embodiment of the present application.

[0200] As shown in the interface c in Figure 5, when the terminal device fails to detect routing information from the router, the terminal device can display the interface shown in a in Figure 10. As shown in the interface a in Figure 10, the interface may include one or more of the following: a graphic indicating that there is an abnormality in the line between the optical modem (or home network port) and the router, a prompt message for prompting a failure in routing configuration, a prompt message for prompting the user to adjust the line, a re-detection control 1001, a control for downloading the Smart Space APP, etc. Among them, the prompt message for prompting the user to adjust the line can be displayed as "1. Please confirm that the router is connected to the optical modem or home network port; 2. Please plug the network cable tightly, or try to replace the network cable; 3. After confirming all of the above, click Re-detect. If you still cannot connect, please contact the broadband operator to resolve the problem." The "broadband operator" in the prompt message is a triggerable control 1002.

[0201] As shown in the interface a of FIG10 , when the terminal device receives a user trigger operation for the re-detection control 1001, the terminal device may resynchronize the routing information and display the interface b of FIG10 . As shown in the interface b of FIG10 , the interface may include: a prompt message for prompting that the routing information is being resynchronized, and the prompt message may be displayed as “Routing information synchronization failed, routing information resynchronization…”.

[0202] In the interface shown in b of Figure 10, when the terminal device detects that the routing information synchronization fails again, the terminal device may display the interface shown in c of Figure 10. The interface shown in c of Figure 10 is used to prompt the user that the routing information synchronization has failed and to download the Smart Space app for configuration. The interface may include one or more of the following: a text message indicating the routing information synchronization failure, an icon indicating the routing information synchronization failure between the terminal device and the router, or a control for downloading the Smart Space app.

[0203] In a possible implementation, the terminal device may also display an interface as shown in c in FIG. 10 when detecting that the number of routing information synchronization failures is greater than a preset number threshold, such as 2 or 3 times. For example, when the number threshold is 2, the terminal device may continue to display the interface as shown in a in FIG. 10 when detecting that the number of routing information synchronization failures is 2, and continue to display the interface as shown in c in FIG. 10 when detecting that the number of routing information synchronization failures is 3. This is not limited in the embodiments of the present application.

[0204] It is understood that when a terminal device detects that multiple synchronization failures of routing information have occurred, the terminal device may display an interface as shown in Figure 10c to prompt the user to configure routing in the Smart Space app. The Smart Space app is an app that can implement router configuration. The Smart Space app is not affected by factors such as mini-programs, system versions, and device models, and can provide router configuration capabilities for various types of terminal devices.

[0205] In a possible implementation, as shown in the interface a of FIG10 , when the terminal device receives a user trigger operation on the triggerable control 1002, the terminal device may display the interface shown in FIG10 d. The interface shown in FIG10 d may display an operator communication list, which may include: at least one operator number and the name of the operator.

[0206] In the interface shown in Figure 10 (c), when the terminal device receives a trigger operation for downloading the Smart Space app, the terminal device may display the interface shown in Figure 10 (e). This interface may include one or more of the following: a text message prompting the user to download the Smart Space app, a QR code 1003 corresponding to the Smart Space app, a cancel control, or a save image control. The text message prompting the user to download the Smart Space app may be displayed as "Smart Space app, please save the image and scan the code to download." Therefore, the terminal device can save the image of QR code 1003 and scan QR code 1003 to download the Smart Space app and continue with router configuration.

[0207] In a possible implementation, based on the interface shown in a in Figure 6 or the interface shown in a in Figure 8, when the terminal device determines that no Internet access method is detected, the terminal device may also display the interface shown in a in Figure 10, so that the user can obtain the Internet access method by re-detection in the interface shown in a in Figure 10.

[0208] Based on this, when the terminal device fails to detect routing information or Internet access method, the terminal device can display a message to prompt the user to re-detect, so that the user can re-obtain routing information or Internet access method as needed, thereby improving the user experience of the one-scan-to-connect system.

[0209] On the basis of the embodiment corresponding to FIG. 6 or FIG. 8 , when the terminal device detects that the router configuration fails, the terminal device may prompt the user to reconfigure the router based on the embodiment corresponding to FIG. 11 .

[0210] For example, Figure 11 is a schematic diagram of a router configuration failure interface provided in an embodiment of the present application. In the embodiment corresponding to Figure 11, PPPOE Internet access configuration is used as an example for illustration, and this example does not constitute a limitation on the embodiment of the present application. The process of PPPOE router configuration failure may include one or more of the following: Internet access configuration failure (or understood as broadband account and broadband password configuration failure), or WIFI configuration failure.

[0211] The terminal device can display the interface shown in a in Figure 11 when it detects that the Internet access method configuration fails or the WIFI configuration fails; alternatively, the terminal device can also display the interface shown in b in Figure 11 when it detects that the Internet access method configuration fails, and display the interface shown in c in Figure 11 when it detects that the WIFI configuration fails.

[0212] In one implementation, as shown in the interface c in FIG8 , when the terminal device receives a user trigger operation for completing the configuration control 805 and determines based on the router that the Internet access method configuration has failed or the WIFI configuration has failed, the terminal device may display the interface shown in FIG11 a, wherein the interface shown in FIG11 a includes: a prompt message for prompting the failure of the routing configuration. Alternatively, as shown in the interface c in FIG8 , when the terminal device receives a user trigger operation for completing the configuration control 805 and determines based on the router that the Internet access method configuration has failed or the WIFI configuration has failed, the terminal device may also jump to the interface shown in FIG11 a after displaying the interface shown in FIG9 a.

[0213] In another implementation, as shown in the interface c in FIG8 , when the terminal device receives a user trigger operation for the completion configuration control 805 and the router determines that the Internet access method configuration has failed, the terminal device can display the interface shown in FIG11 b , wherein the interface shown in FIG11 b includes: a prompt message for prompting that the Internet access method configuration has failed. Alternatively, as shown in the interface c in FIG8 , when the terminal device receives a user trigger operation for the completion configuration control 805 and the router determines that the Internet access method configuration has failed or the WIFI configuration has failed, the terminal device can also jump to the interface shown in FIG11 b after displaying the interface shown in FIG9 a .

[0214] In another implementation, as shown in the interface c in FIG8 , when the terminal device receives a user trigger operation for the completion configuration control 805 and determines based on the router that the WIFI configuration has failed, the terminal device may display the interface shown in FIG11 c, wherein the interface shown in FIG11 c includes: a prompt message for indicating that the WIFI configuration has failed. Alternatively, as shown in the interface c in FIG8 , when the terminal device receives a user trigger operation for the completion configuration control 805 and determines based on the router that the Internet access method configuration has failed or the WIFI configuration has failed, the terminal device may also jump to the interface shown in FIG11 c after displaying the interface shown in FIG9 a.

[0215] It is understandable that when the Internet access mode is DHCP, the terminal device can display the prompt information in the interface shown in a of FIG. 11 or the prompt information in the interface shown in c of FIG. 11 when detecting that the WIFI configuration fails.

[0216] Among them, the specific reasons for the configuration failure described in the embodiment corresponding to Figure 11 can be found in the steps S1407 and S1410 shown in the embodiment corresponding to Figure 14, and will not be repeated here.

[0217] Based on this, the terminal device can display the same prompt information or different prompt information when detecting that the Internet access configuration fails or the WIFI configuration fails, so as to prompt the user to modify the router configuration and improve the accuracy of the connection between the terminal device and the router.

[0218] Based on the embodiment corresponding to FIG5 , when the terminal device detects that the current device does not support router settings, the terminal device may prompt the user to download the Smart Space APP to perform router settings.

[0219] For example, FIG12 is a schematic diagram of an interface prompting downloading of a smart space APP provided in an embodiment of the present application.

[0220] In one implementation, the terminal device can prompt the user to set up the router by downloading the Smart Space APP when it detects that the current device does not meet the preset model. For example, the terminal device can preset the model of at least one terminal device that allows the use of the one-scan connection system. After the terminal device scans the mini-program code, it can detect whether the device is a preset model. For example, when the terminal device determines that the current model is not a preset model, the terminal device can display the interface shown in a of Figure 12 or the interface shown in b of Figure 12. The interface shown in a of Figure 12 or the interface shown in b of Figure 12 both include prompt information that can be used to prompt that the one-scan connection system does not support the current model and to download the Smart Space APP.

[0221] As shown in the interface a of Figure 12, when the terminal device receives the user's triggering operation to save the image control, the terminal device can save the QR code image. Furthermore, when the terminal device receives the user scanning the QR code in a preset application, it can jump to the app store or browser to download the Smart Space app.

[0222] As shown in the interface b of Figure 12, when the terminal device receives the user's operation to trigger the download control, the terminal device can jump to the application store or browser to download the Smart Space APP. The specific method of downloading the Smart Space APP is not limited in the embodiments of this application.

[0223] In another implementation, the terminal device can prompt the user to download the Smart Space APP to set up the router when it detects that the current device does not meet the preset system version number. For example, the terminal device can preset the system version number of at least one terminal device that allows the use of the one-scan connection system. When the terminal device scans the mini-program code, it can detect whether the system version number corresponding to the device is the preset system version number. For example, when the terminal device determines that the current system version number is not the preset system version number, the terminal device can display the interface shown in Figure 12 c. The interface shown in Figure 12 c may include prompt information for indicating that the system version is low and downloading the Smart Space APP.

[0224] Based on this, the terminal device can scan the mini program code to detect whether the current device supports router settings in the one-scan system, and prompt when it is determined that the current device does not support router settings in the one-scan system, so that the user can use the Smart Space APP to set up the router.

[0225] It is understandable that the interfaces described in the embodiments corresponding to Figures 5 to 12 are merely examples and do not constitute a limitation on the router connection method provided in the embodiments of the present application.

[0226] Based on the description of the embodiments corresponding to Figures 5-12, the embodiments of the present application provide a router connection method, so that a terminal device can quickly connect to the router WIFI by scanning the mini-program code pre-installed in the router.

[0227] For example, FIG13 is a flowchart of a method for connecting a router according to an embodiment of the present application. As shown in FIG13 , the method for connecting a router may include the following steps:

[0228] S1301: The terminal device receives the user's operation of scanning the mini program code.

[0229] The mini program code can be affixed to the body of the router or to the corresponding instruction manual or other location of the router, which is not limited in the embodiments of the present application.

[0230] The mini-program code may be generated from the mini-program uniform resource locator (URL) and attribute parameters of the router, etc. The attribute parameters of the router may include parameters such as the router serial number (SN) that are used to uniquely identify the router.

[0231] It's understandable that because the router SN is unique, the mini-program code is also unique, meaning that one router corresponds to one mini-program code. The Wi-Fi information carried in the mini-program code can be non-hidden, meaning users can search for the router's corresponding Wi-Fi information through their terminal devices. If the Wi-Fi information carried in the mini-program is hidden, the terminal device will not be able to successfully connect to the router's Wi-Fi.

[0232] S1302. The terminal device obtains the mini-program URL and router SN from the mini-program code.

[0233] For example, the terminal device can obtain the mini-program URL and router SN by scanning the mini-program code and save them in the terminal device.

[0234] S1303. The terminal device uses the mini-program URL to pull the mini-program page from the server.

[0235] For example, the terminal device may send a request for obtaining a mini-program page to the server, and the request for obtaining the mini-program page may include the mini-program URL.

[0236] The server described in S1303 (or referred to as the first server) can be understood as Application public platform, used for terminal equipment The application provides various mini-program pages. For example, a terminal device can send a request to the server to obtain a mini-program page. The server can obtain the page information corresponding to the mini-program URL and return the page information corresponding to the mini-program to the terminal device, so that the terminal device can pull up the mini-program page from the server based on the mini-program URL parsed in the mini-program code.

[0237] S1304. The server returns the page information corresponding to the mini program to the terminal device.

[0238] Among them, the page information corresponding to the mini program may include: page information corresponding to any interface in the mini program described in the embodiments of the present application, such as page information corresponding to the homepage of the mini program. The homepage of the mini program can be the interface shown in b in Figure 5.

[0239] For example, after receiving the page information corresponding to the mini program, the terminal device can perform operations such as rendering on the page information, so that the terminal device can display different interface content in the mini program.

[0240] S1305. The terminal device displays the homepage of the mini-program and uses the SN to calculate the first WIFI SSID and the first WIFI password.

[0241] The first WIFI may be the initial WIFI of the router or called a fixed WIFI. The first WIFI SSID and the first WIFI password are both obtained based on SN resolution, so the first WIFI SSID and the first WIFI password are also unique.

[0242] It is understandable that the first WIFI SSID and the first WIFI password are determined based on attribute parameters of the router, such as the router SN. Therefore, the user is not allowed to modify the first WIFI SSID and the first WIFI password at will.

[0243] S1306: The terminal device sends a request to the router for connecting to the first WIFI of the router.

[0244] The request for connecting to the first WIFI of the router may include: a first WIFI SSID and a first WIFI password.

[0245] S1307: The router returns a message to the terminal device indicating that the first WIFI connection is successful.

[0246] It can be understood that since the first WIFI SSID and the first WIFI password are fixed, the terminal device can use the first WIFI to access the router to realize LAN communication between the terminal device and the router. In this scenario, the first WIFI SSID and the first WIFI can serve as a bridge to realize data interaction between the terminal device and the router.

[0247] After the first WIFI connection is successful, the terminal device can send a request to the router for obtaining an IP address, and the bridge in the router, such as br2, can assign a first IP address to the terminal device connected to the first WIFI of the router. Furthermore, when the terminal device sends a message to the router based on the first IP address and the gateway IP address corresponding to br2, br2 can forward the message; further, the forward checkpoint in the data link layer firewall can intercept the message reported by br2 to prevent the terminal device from connecting to the Internet through the first WIFI. It can be understood that the first WIFI is only used to realize the LAN communication between the terminal device and the router, and cannot realize the Internet access function. Among them, the gateway IP address corresponding to br2 can be set by default in the applet of the terminal device.

[0248] For example, the terminal device and the router may implement interaction of symmetric keys in S1308-S1309 and interaction of routing information in S1310-S1311 based on the first WIFI connection.

[0249] S1308. The terminal device sends a request to the router for obtaining a symmetric key.

[0250] The request for obtaining the symmetric key may include: a router SN and signature information, where the signature information is information obtained by the terminal device signing the router SN using a private key.

[0251] The private key of the RSA asymmetric encryption algorithm padded with 1024-bit public key cryptography standards (PKCS) #8 can be preset in the applet of the terminal device, and the public key of the RSA asymmetric encryption algorithm padded with 1024-bit PKCS #8 can be preset in the routing plug-in process of the router.

[0252] S1309. The router returns the symmetric key to the terminal device.

[0253] Suitably, after the router receives the router SN and signature information in the request for obtaining a symmetric key, the router can use the public key to decrypt the signature information and compare the decrypted information with the router SN for consistency. After successful signature verification, the router can determine that the request for obtaining a symmetric key is a message sent by the applet in the terminal device and then return the generated symmetric key to the terminal device. The symmetric key can be a 16-bit Advanced Encryption Standard (AES) symmetric encryption key.

[0254] Based on the steps shown in S1308-S1309, the communication link between the terminal device and the router can be encrypted using a symmetric key to ensure the security of data transmission. For example, the router can use the symmetric key to encrypt routing information and return the encrypted information to the terminal device through the step shown in S1311. The terminal device can then decrypt the message received in S1311.

[0255] S1310. The terminal device sends a request to the router for obtaining routing information.

[0256] The routing information (or first information) may be information obtained from the router, and the routing information may include one or more of the following: a second WIFI SSID, a second WIFI password, a gateway IP address corresponding to br0, Internet access status, or information indicating whether the router wizard configuration is completed.

[0257] The second WIFI can be understood as a router WIFI for realizing the Internet access function. The second WIFI SSID and / or the second WIFI password can be set by default in the router, or can also be set by the user in the embodiments corresponding to Figure 6 or Figure 8, which is not limited in the embodiments of the present application.

[0258] The online status may include: network connected, network disconnected, etc.

[0259] The router wizard configuration can be understood as configuring the Internet access method of the router. The process of the router wizard configuration can be referred to the description in the embodiments corresponding to Figures 6 and 7 (or the embodiments corresponding to Figures 8 and 9).

[0260] Exemplarily, the terminal device may display an interface as shown in c in FIG. 5 after sending a request for obtaining routing information to the router.

[0261] S1311. The router returns routing information to the terminal device.

[0262] Suitably, after the terminal device receives the routing information returned by the router, the terminal device may display the interface shown in d in Figure 5. Further, the terminal device may use the second WIFI SSID and the second WIFI password in the routing information to connect to the second WIFI of the router, for example, by executing the step shown in S1312.

[0263] In a possible implementation, when the terminal device determines that the user has performed the wizard configuration based on the information in the routing information indicating whether the router wizard configuration is completed, the terminal device can connect to the router WIFI based on the second WIFI SSID and the second WIFI password, for example, executing the steps shown in S1312.

[0264] Alternatively, when the terminal device determines that the user has not performed the wizard configuration based on the information in the routing information indicating whether the router wizard configuration is completed, the terminal device can detect the router's Internet access method and display the interface shown in a of Figure 6 or the interface shown in a of Figure 8.

[0265] It is understood that even if the information indicating whether the router wizard configuration is complete indicates that the user has not performed wizard configuration on the router, the routing information may also include the router's default second WIFI SSID and the router's default second WIFI password. The router's default second WIFI SSID and the router's default second WIFI password are stored in the router when it leaves the factory and can be modified by the user.

[0266] In a possible implementation, when the terminal device does not receive routing information returned by the router within a time threshold of sending a request for obtaining routing information, the terminal device may display an interface as shown in a of Figure 10. Further, when the terminal device detects a user triggering operation on the re-detection control 1001, the terminal device may re-execute the steps shown in S1310-S1311 to re-detect routing information.

[0267] S1312: The terminal device sends a request to the router for connecting to the second WIFI of the router.

[0268] The request for connecting to the second WIFI of the router may include: a second WIFI SSID and a second WIFI password.

[0269] S1313: The router returns a message to the terminal device indicating that the second WIFI connection is successful.

[0270] Suitably, when the terminal device receives a message indicating that the second WIFI connection is successful, the second device may determine that it has been successfully connected to the router WIFI.

[0271] After the second Wi-Fi connection is successful, the terminal device can send a request to the router to obtain an IP address. br0 in the router can assign a second IP address to the terminal device connected to the router's second Wi-Fi. When the terminal device sends a message to the router based on the second IP address and the gateway IP address corresponding to br0, br0 can forward the message. Furthermore, the forward checkpoint in the data link layer firewall can forward the message reported by br0 and forward it to the network server. The network server can respond to the message and return the generated response message to the terminal device through the router, allowing the terminal device to connect to the Internet via the second Wi-Fi.

[0272] For example, based on the second Wi-Fi connection, the terminal device sends a first data packet to the router, and the router can send the first data packet to the network server. Alternatively, the network server can respond to the received first data packet and generate a second data packet corresponding to the first data packet. The network server can then return the second data packet to the terminal device through the router, allowing the terminal device to access the Internet through the second Wi-Fi connection. It can be understood that the first data packet is the data packet that accesses the network server through the router, and the second data packet is the response data packet generated by the network server when it receives the first data packet.

[0273] In a possible implementation, the terminal device can close the first Wi-Fi connection after establishing the second Wi-Fi connection. For example, the terminal device sends a request to the router to close the first Wi-Fi connection, and the router returns a message to the terminal device indicating that the first Wi-Fi connection was successfully closed. In this way, when the second Wi-Fi connection is established, the terminal device and the router can reduce resource consumption by closing the first Wi-Fi connection.

[0274] In a possible implementation, the router can also store the device information brought by the terminal device when it connects to the second WIFI. When the terminal device connects to the first WIFI of the router again by scanning the mini-program code, the router can determine that the terminal device has been connected to the router based on the device information of the terminal device. Therefore, the router can directly return the routing information to the terminal device, so that the terminal device can connect to the second WIFI of the router after connecting to the first WIFI of the router without obtaining routing information again, thereby simplifying the method of the terminal device connecting to the router.

[0275] Based on the description of the embodiment corresponding to FIG13 , the terminal device can first establish a local area network connection with the router by directly scanning the target QR code preset in the router, then automatically obtain the WIFI connection information that can access the Internet through the LAN connection, and then establish the WIFI connection that can access the Internet through the router. This allows users to automatically connect to the WIFI by simply scanning the target QR code preset in the router, without having to actively enter information such as the WIFI password, providing users with a better connection experience.

[0276] Based on the embodiment corresponding to Figure 13, when the second WIFI SSID and / or the second WIFI SSID changes, the terminal device can also establish a LAN connection with the first WIFI of the router by scanning the mini-program code, and obtain the third WIFI SSID and the third WIFI password from the router when the LAN is connected, and use the third WIFI SSID and the third WIFI password to establish a connection with the router.

[0277] The third WIFI SSID is different from the second WIFI SSID, and / or the third WIFI password is different from the second WIFI password. The process of establishing a connection between the terminal device and the router using the third WIFI SSID and the third WIFI password can be seen in the embodiment corresponding to FIG. 13 and will not be repeated here.

[0278] It can be understood that when at least one parameter in the second WIFI SSID and the second WIFI password is modified, the terminal device can establish a local area network connection with the first WIFI of the router by scanning the mini program code, and when the first WIFI connection is successful, obtain the third WIFI SSID and third WIFI password required for reconnection from the router.

[0279] In this way, the advantage of using the first WIFI SSID and the first WIFI password to achieve LAN communication between the terminal device and the router is that no matter how the second WIFI SSID and / or the second WIFI password changes, the terminal device can use the fixed first WIFI to achieve LAN connection, and obtain WIFI connection information that can access the Internet from the router based on the LAN connection, so as to achieve the purpose of being able to access the router even if the WIFI password is modified.

[0280] It can be understood that compared to storing the router's WIFI SSID and WIFI password in the cloud under normal circumstances, the router connection method described in the embodiment of the present application does not need to obtain the WIFI SSID and WIFI password from the cloud, saving resource consumption.

[0281] Based on the embodiment corresponding to Figure 13, a router connection method provided in an embodiment of the present application can also realize the setting of Internet access mode and / or WIFI in the router.

[0282] For example, FIG14 is a flow chart of a parameter configuration method for a router provided in an embodiment of the present application.

[0283] S1401. The terminal device sends a request to the router for obtaining an Internet access method.

[0284] Exemplarily, when the terminal device determines that the router has not been configured with a wizard based on the information indicating whether the router wizard configuration is completed in the routing information obtained in S1311, the terminal device can display the interface shown in a in Figure 6 or the interface shown in a in Figure 8, and execute the steps shown in S1401 to send a request to the router for obtaining an Internet access method.

[0285] S1402: The router returns the Internet access method detection result to the terminal device.

[0286] The Internet access method detection result may include: DHCP Internet access, PPPOE Internet access, or no Internet access method is detected.

[0287] S1403: The terminal device determines whether the detection is successful.

[0288] When the terminal device detects the Internet access method, the terminal device may execute the step shown in S1404; or, when the terminal device does not detect the Internet access method, the terminal device may execute the step shown in S1405.

[0289] S1404. The terminal device displays an interface corresponding to detection failure.

[0290] The interface corresponding to detection failure may be the interface shown in a of FIG10 .

[0291] In a possible implementation, when the terminal device receives a trigger operation from the user for a re-detection control in the interface shown in a of FIG10 , the terminal device may execute the step shown in S1401 to re-detect the Internet access mode.

[0292] It is understandable that the Internet access detection may fail because the line between the optical modem (or home network port) and the router is not successfully connected. Therefore, the user can review the connection status of the line based on the prompt information displayed in the interface shown in a in Figure 10.

[0293] S1405. The terminal device displays an interface corresponding to successful detection.

[0294] When the detection result is DHCP Internet access, the interface corresponding to the successful detection may be the interface shown in b of FIG. 6 ; or, when the detection result is PPPOE Internet access, the interface corresponding to the successful detection may be the interface shown in b of FIG. 8 .

[0295] S1406: The terminal device detects that the user is configuring the Internet access method, and sends a message containing the configuration information to the router.

[0296] The configuration information may include: WIFI configuration information, and / or configuration information corresponding to the Internet access method. The configuration information may be understood as information input by the user in the embodiment corresponding to FIG. 6 (or FIG. 8 ).

[0297] The WIFI configuration information may include: a second WIFI SSID and a second WIFI password. When the Internet access method is PPPOE, the configuration information corresponding to the Internet access method may include: a broadband account and a broadband password. Or when the Internet access method is DHCP, the configuration information may not include configuration information corresponding to DHCP Internet access.

[0298] In a possible implementation, since DHCP internet access does not require the configuration of a broadband account and broadband password, the router may not confirm whether the DHCP internet access method is successfully configured. For example, when the router determines that the internet access method is DHCP, the terminal device may execute steps S1410-S1413 to determine the WIFI settings; or, when the router determines that the internet access method is PPPOE, the terminal device may execute steps S1407-S1409 to verify the broadband account and broadband password entered by the terminal device based on the PPPOE internet access method, and then execute steps S1410-S1413 to determine the WIFI settings.

[0299] Exemplarily, the terminal device can configure the Internet access method based on the user operation in the embodiments corresponding to Figures 6-7 (or Figures 8-9). After the configuration is completed, when the terminal device receives the user's trigger operation to complete the configuration control, the terminal device can send configuration information to the router.

[0300] It is understandable that the terminal device may display the interface shown in a of FIG. 7 or the interface shown in a of FIG. 9 after sending the configuration information to the router.

[0301] S1407: The router determines whether the Internet access method is configured successfully.

[0302] When the router determines that the Internet access method configuration is successful, the router may execute steps shown in S1410-S1413; or, when the router determines that the Internet access method configuration fails, the router may execute steps shown in S1408-S1409.

[0303] Exemplarily, the router can determine whether the Internet access method is successfully configured based on the broadband account and broadband password entered by the user in the interface shown in b in FIG. 6 (or b in FIG. 8 ). For example, the router can verify the broadband account and broadband password entered by the user. When it is determined that the broadband account entered by the user is consistent with the broadband account provided by the operator, and the broadband password entered by the user is consistent with the broadband password provided by the operator, the router can determine that the Internet access method is successfully configured. Alternatively, when it is determined that the broadband account entered by the user is inconsistent with the broadband account provided by the operator, and / or the broadband password entered by the user is inconsistent with the broadband password provided by the operator, the router can determine that the Internet access method configuration has failed and execute the steps shown in S1408.

[0304] S1408. The router returns a message to the terminal device indicating that the Internet access mode configuration has failed.

[0305] S1409. The terminal device displays the corresponding reconfiguration interface 1.

[0306] The corresponding reconfigured interface 1 may be the interface shown in a of FIG. 11 or the interface shown in b of FIG. 11 .

[0307] S1410: The router determines whether the WIFI configuration is successful.

[0308] When the router determines that the WIFI configuration is successful, the router may execute the steps shown in S1413; or, when the router determines that the WIFI configuration fails, the router may execute the steps shown in S1411-S1412.

[0309] For example, the router can determine whether the Internet access method is successfully configured based on the second WIFI SSID entered by the user in the interface shown in b in FIG. 6 (or b in FIG. 8 ) and the second WIFI password entered by the user. For example, the router can verify the second WIFI SSID entered by the user and the second WIFI password entered by the user. If it is determined that the second WIFI SSID entered by the user is inconsistent with the router's default second WIFI SSID, and the second WIFI password entered by the user is inconsistent with the router's default second WIFI password, the router can determine that the Internet access method is successfully configured. Alternatively, if it is determined that the second WIFI SSID entered by the user is consistent with the router's default second WIFI SSID, and / or the second WIFI password entered by the user is consistent with the router's default second WIFI password, the router can determine that the Internet access method configuration failed.

[0310] In a possible implementation, the terminal device can also determine whether the WIFI configuration is successful, that is, the terminal device can receive the routing information returned by the router based on the steps shown in S1311, and obtain the router's default second WIFI SSID and the router's default second WIFI password from the router, thereby determining whether the WIFI configuration is successful in the terminal device.

[0311] S1411. The router returns a message to the terminal device indicating that the WIFI configuration has failed.

[0312] S1412. The terminal device displays the corresponding reconfiguration interface 2.

[0313] The corresponding reconfigured interface 2 may also be the interface shown in a of FIG. 11 or the interface shown in c of FIG. 11 .

[0314] It is understandable that interface 1 and interface 2 may be the same or different, and this is not limited in the embodiments of the present application.

[0315] S1413. The router returns a message to the terminal device indicating that the configuration is successful.

[0316] S1414. The terminal device sends a request to the router to instruct it to restart the second WIFI.

[0317] Exemplarily, upon receiving the message returned by the router in S1413 indicating successful configuration, the terminal device may execute the step shown in S1414.

[0318] After the terminal device sends a request to the router to instruct it to restart the second WIFI, it can display an interface as shown in FIG7 b (or FIG9 b). In this way, after the router restarts the second WIFI configuration, the terminal device can use the second WIFI SSID and second WIFI password configured by the user to establish a connection with the second WIFI of the router.

[0319] S1415. The router returns a message to the terminal device indicating that the second WIFI is successfully restarted.

[0320] Furthermore, when the terminal device receives a message returned by the router indicating that the configuration is successful, the terminal device can execute steps S1312-S1313 based on the set second WIFI SSID and second WIFI password, reconnect to the second WIFI of the router, and display the interface shown in c in Figure 7 or c in Figure 9.

[0321] Based on this, the terminal device can not only realize one-scan connection, but also configure the router in one-scan connection, so as to simplify the method of user configuration of the router and facilitate ordinary users to configure the router with zero threshold.

[0322] 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 this application 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 relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0323] The method provided in the embodiment of the present application is described above in conjunction with Figures 5-14. The device for executing the above method provided in the embodiment of the present application is described below. As shown in Figure 15, Figure 15 is a structural schematic diagram of a router connection device provided in the embodiment of the present application. The router connection device can be a terminal device in the embodiment of the present application, or a chip or chip system within the terminal device.

[0324] As shown in Figure 15 , a router connection device 1500 can be used in a communication device, circuit, hardware component, or chip. The router connection device includes a display unit 1501, a processing unit 1502, and a communication unit 1503. Display unit 1501 supports the display steps performed by router connection device 1500; processing unit 1502 supports the information processing steps performed by router connection device 1500; and the communication unit supports the data transmission and reception steps performed by router connection device 1500. Communication unit 1503 can be an input or output interface, pin, circuit, or the like.

[0325] In a possible embodiment, the router connection device may further include a storage unit 1504. The processing unit 1502 and the storage unit 1504 are connected via a circuit. The storage unit 1504 may include one or more memories, which may be devices in one or more devices or circuits for storing programs or data. The storage unit 1504 may exist independently and be connected to the processing unit 1502 of the router connection device via a communication line. The storage unit 1504 may also be integrated with the processing unit 1502.

[0326] The storage unit 1504 can store computer-executable instructions for the method in the terminal device, so that the processing unit 1502 executes the method in the above embodiment. The storage unit 1504 can be a register, a cache, or a RAM, etc. The storage unit 1504 can be integrated with the processing unit 1502. The storage unit 1504 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions. The storage unit 1504 can be independent of the processing unit 1502.

[0327] FIG16 is a second structural diagram of a processing device in a router connection provided in an embodiment of the present application. The processing device in the router connection may be a router in an embodiment of the present application, or a chip or chip system in a router.

[0328] As shown in Figure 16 , a processing device 1600 in a router connection can be used in a communication device, circuit, hardware component, or chip. The processing device in the router connection includes a processing unit 1601 and a communication unit 1602. Processing unit 1601 is used to support the processing device 1600 in the router connection in performing information processing steps; the communication unit is used to support the processing device 1600 in the router connection in performing data transmission and data reception steps. Communication unit 1602 can be an input or output interface, pin, circuit, or the like.

[0329] In a possible embodiment, the processing device in the router connection may further include a storage unit 1603. The processing unit 1601 and the storage unit 1603 are connected via a circuit. The storage unit 1603 may include one or more memories, which may be devices in one or more devices or circuits used to store programs or data. The storage unit 1603 may exist independently and be connected to the processing unit 1601 in the processing device in the router connection via a communication line. The storage unit 1603 may also be integrated with the processing unit 1601.

[0330] Storage unit 1603 can store computer-executable instructions for the method in the router, so that processing unit 1601 can execute the method in the above embodiment. Storage unit 1603 can be a register, cache, or RAM, etc. Storage unit 1603 can be integrated with processing unit 1601. Storage unit 1603 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions. Storage unit 1603 can be independent of processing unit 1601.

[0331] FIG17 is a schematic diagram of the hardware structure of another device provided in an embodiment of the present application. The device described in the embodiment corresponding to FIG17 can be a terminal device or a router device.

[0332] As shown in FIG6 , the device includes a processor 1701 , a communication line 1704 and at least one communication interface (the communication interface 1703 is exemplarily used in FIG17 ).

[0333] The processor 1701 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.

[0334] Communications link 1704 may include circuitry that transmits information between the aforementioned components.

[0335] The communication interface 1703 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.

[0336] Possibly, the device may further include a memory 1702 .

[0337] The memory 1702 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be independent and connected to the processor via a communication line 1704. The memory may also be integrated with the processor.

[0338] The memory 1702 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1701. The processor 1701 is used to execute the computer-executable instructions stored in the memory 1702, thereby implementing the method provided by the embodiment of the present application.

[0339] Possibly, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not specifically limit this.

[0340] In a specific implementation, as an embodiment, the processor 1701 may include one or more CPUs, such as CPU0 and CPU1 in Figure 17.

[0341] In a specific implementation, as an example, a device may include multiple processors, such as processor 1701 and processor 1705 in FIG17 . Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0342] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, available media can include magnetic media (e.g., floppy disk, hard disk or tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid state disk (SSD)), etc.

[0343] The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part via software, hardware, firmware, or any combination thereof. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one location to another. The storage medium can be any target medium that can be accessed by a computer.

[0344] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; computer-readable media may include magnetic disk storage or other magnetic disk storage devices. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically, while discs reproduce data optically using lasers.

[0345] The above combinations are also included within the scope of computer-readable media. The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for connecting a router, characterized in that: Applied to a router, the method comprises: Establishing a first WIFI connection with a terminal device based on a first WIFI SSID and a first WIFI password, wherein the first WIFI SSID and the first WIFI password are determined based on attribute parameters of the router indicated in a target QR code, and the target QR code is a QR code corresponding to the router; Based on the first WIFI connection, sending a second WIFI SSID and a second WIFI password to the terminal device; Based on the second WIFI SSID and the second WIFI password, a second WIFI connection is established with the terminal device.

2. The method according to claim 1, characterized in that The first WIFI connection is a local area network connection.

3. The method according to claim 1 or 2, characterized in that: After establishing the second WIFI connection, the method further includes: Based on the second WIFI connection, receiving a first data packet from the terminal device, where the first data packet is a data packet for accessing a network server through the router; A second data packet is sent to the terminal device, where the second data packet is a response data packet generated when the network server receives the first data packet.

4. The method according to any one of claims 1 to 3, characterized in that: After establishing the second WIFI connection, the method further includes: Close the first WIFI connection.

5. The method according to any one of claims 1 to 4, characterized in that: The second WIFI SSID is changed to a third WIFI SSID, and / or the second WIFI password is changed to a third WIFI password, and the method further includes: Establishing a first WIFI connection with the terminal device based on the first WIFI SSID and the first WIFI password; Based on the first WIFI connection, sending attribute information of a third WIFI to the terminal device, the attribute information of the third WIFI including: the third WIFI SSID and the third WIFI password; Based on the attribute information of the third WIFI, a third WIFI connection is established with the terminal device.

6. The method according to any one of claims 1 to 5, characterized in that: The attribute parameters of the router include a serial number SN of the router, and the first WIFI SSID and the first WIFI password are determined based on the SN of the router.

7. The method according to any one of claims 1 to 6, characterized in that: The sending, based on the first WIFI connection, the second WIFI SSID and the second WIFI password to the terminal device includes: Based on the first WIFI connection, receiving a first request from the terminal device; A first message is sent to the terminal device, where the first message includes the second WIFI SSID and the second WIFI password, and the first message is a message generated by the router in response to the first request.

8. The method according to claim 7, characterized in that Before receiving the first request from the terminal device, the method further includes: receiving a second request from the terminal device; Send a second message to the terminal device, wherein the second message includes a symmetric key. The router generates a message in response to the second request, and the first message is a message generated by the router after encrypting the second WIFI SSID and the second WIFI password by using the symmetric key.

9. The method according to claim 7 or 8, characterized in that: The first message also includes: information for indicating whether the router wizard configuration is completed, and the method further includes: When the information for indicating whether the wizard configuration of the router is completed indicates that the wizard configuration of the router is not completed, receiving a fourth request from the terminal device; A fourth message is sent to the terminal device, where the fourth message is a message generated by the router in response to the fourth request, and the fourth message includes an Internet access method of the router, where the Internet access method of the router includes: Ethernet point-to-point communication protocol PPPOE, or dynamic host configuration protocol DHCP.

10. A router connection method, characterized in that: Applied to a terminal device, the method comprises: Receiving a first operation of a user scanning a target QR code, where the target QR code is a QR code corresponding to the router; In response to the first operation, acquiring a first WIFI SSID and a first WIFI password based on the target QR code, where the first WIFI SSID and the first WIFI password are determined based on attribute parameters of the router; Establishing a first WIFI connection with the router based on the first WIFI SSID and the first WIFI password; Based on the first WIFI connection, obtaining a second WIFI SSID and a second WIFI password from the router; A second WIFI connection is established with the router based on the second WIFI SSID and the second WIFI password.

11. The method according to claim 10, characterized in that The first WIFI connection is a local area network connection.

12. The method according to claim 10 or 11, characterized in that: After establishing the second WIFI connection, the method further includes: Based on the second WIFI connection, sending a first data packet to the router, where the first data packet is a data packet for accessing a network server through the router; A second data packet is received from the router, where the second data packet is a response data packet generated when the network server receives the first data packet.

13. The method according to any one of claims 10 to 12, characterized in that: After establishing the second WIFI connection, the method further includes: Close the first WIFI connection.

14. The method according to any one of claims 10 to 13, characterized in that: The second WIFI SSID is changed to a third WIFI SSID, and / or the second WIFI password is changed to a third WIFI password, and the method further includes: Receiving a second operation of the user scanning the target QR code; In response to the second operation, acquiring the first WIFI SSID and the first WIFI password based on the target QR code; Establishing a first WIFI connection with the router based on the first WIFI SSID and the first WIFI password; Based on the first WIFI connection, acquiring attribute information of a third WIFI from the router, wherein the attribute information of the third WIFI includes: the third WIFI SSID and the third WIFI password; Based on the attribute information of the third WIFI, a third WIFI connection is established with the router.

15. The method according to claim 14, characterized in that After establishing the second WIFI connection, the method further includes: receiving a third operation of the user; In response to the third operation, the attribute information of the third WIFI is sent to the router, where the attribute information of the third WIFI is obtained by adjusting the attribute information of the second WIFI based on the third operation, and the attribute information of the second WIFI includes: the second WIFI SSID and the second WIFI password.

16. The method according to any one of claims 10 to 15, characterized in that: The attribute parameters of the router include a serial number SN of the router, and the first WIFI SSID and the first WIFI password are determined based on the SN of the router.

17. The method according to any one of claims 10 to 16, characterized in that: The acquiring a second WIFI SSID and a second WIFI password from the router based on the first WIFI connection includes: Based on the first WIFI connection, sending a first request to the router; A first message is received from the router, where the first message includes the second WIFI SSID and the second WIFI password, and the first message is a message generated by the router in response to the first request.

18. The method according to claim 17, characterized in that Before sending the first request, the method further includes: sending a second request to the router; A second message is received from the router, wherein the second message includes a symmetric key, the second message is a message generated by the router in response to the second request, and the first message is a message generated by the router after encrypting the second WIFI SSID and the second WIFI password by using the symmetric key.

19. The method according to any one of claims 10 to 18, characterized in that: Before establishing the first WIFI connection, the method further includes: Obtaining a uniform resource locator URL from the target QR code; Sending a third request to the first server, wherein the third request includes the URL; Receive a third message from the first server and display a first prompt information in the first interface, the third message includes at least one interface information corresponding to the URL, the at least one interface information includes interface information corresponding to the first interface, the third message is a message generated by the server in response to the third request, and the first prompt information is used to prompt the terminal device to enter the code scanning connection system.

20. The method according to claim 19, characterized in that After the first prompt information is displayed in the first interface, the method further includes: The second prompt information is displayed in the second interface, and the second prompt information is used to prompt that the terminal device is synchronizing the first information, and the first information includes: the second WIFI SSID and the second WIFI password.

21. The method according to claim 20, characterized in that After acquiring the second WIFI SSID and the second WIFI password from the router, the method further includes: The third prompt information and the fourth prompt information are displayed in sequence in the second interface, the third prompt information is used to prompt that the first information is successfully synchronized in the terminal device, and the fourth prompt information is used to prompt that the The terminal device is connecting to the router WIFI.

22. The method according to claim 20, characterized in that The method further comprises: When the first information is not detected, fifth and sixth prompt messages are displayed in the second interface, the fifth prompt message is used to prompt that the first information fails to be synchronized in the terminal device, and the sixth prompt message includes at least one strategy for reacquiring the first information.

23. The method according to any one of claims 20 to 22, characterized in that: After establishing the second WIFI connection, the method further includes: The seventh prompt information is displayed in the second interface, and the seventh prompt information is used to prompt that the terminal device is successfully connected to the router.

24. The method according to any one of claims 20 to 23, characterized in that: The first information may further include: information for indicating whether the router wizard configuration is completed, and the method further includes: When the information for indicating whether the wizard configuration of the router is completed indicates that the wizard configuration of the router is not completed, sending a fourth request to the router; Receive a fourth message from the router, the fourth message is a message generated by the router in response to the fourth request, the fourth message includes the Internet access method of the router, and the Internet access method of the router includes: Ethernet point-to-point communication protocol PPPOE, or dynamic host configuration protocol DHCP.

25. The method according to any one of claims 10 to 24, characterized in that: The target QR code is a mini program code.

26. A terminal device, characterized in that: include: processor and memory, wherein The memory is used to store computer programs; The processor is configured to call and execute the computer program so that the terminal device executes the method according to any one of claims 10 to 25.

27. A computer-readable storage medium, characterized in that: Used to store a computer program, when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 9, or execute the method according to any one of claims 10 to 25.