Network connection method and apparatus

By scanning the router's QR code to launch the mini-program, users can obtain WiFi information and automatically connect to the router. This solves the problem of inconvenient connection for terminal devices, improves connection efficiency and convenience, and enhances user experience and network management capabilities.

CN122120884APending Publication Date: 2026-05-29HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-11-27
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, when terminal devices connect to wireless routers, they are prone to connection failures due to entering incorrect WiFi passwords, which reduces connection efficiency and convenience.

Method used

By scanning the router's QR code to launch the mini-program, users can obtain the WiFi name and password, and establish a connection with the router through the mini-program, achieving automatic and quick connection. It also supports binding user accounts to the router, obtaining management permissions, and displaying QR codes, improving connection efficiency and convenience.

Benefits of technology

It enables automatic and quick connection between terminal devices and routers, improving connection efficiency and convenience, enhancing user experience and network connection security, and supporting visualized management of permissions and reasonable allocation of network speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120884A_ABST
    Figure CN122120884A_ABST
Patent Text Reader

Abstract

The application discloses a network connection method and device, and relates to the technical field of terminals. In the method, a terminal device scans a two-dimensional code corresponding to a router through a first interface of a first application, starts a target program under the first application, and acquires a first parameter value corresponding to the router. Then, the target program sends a first request to a first server, the first request is used for requesting a WiFi name and a WiFi password corresponding to the router, and the first request comprises the first parameter value. Next, the target program receives a first response message from the first server in response to the first request, the first response message comprises the WiFi name and the WiFi password corresponding to the router. Finally, the target program calls a first interface provided by the first application, so as to establish a connection with the router based on the WiFi name and the WiFi password corresponding to the router through the first interface. Through the application, the efficiency and convenience of connecting the router are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to network connection methods and devices. Background Technology

[0002] With the rapid development of network technology, connecting terminals to the network has become increasingly easy. Taking Wireless Fidelity (WiFi) technology as an example, more and more terminals can connect to wireless routers via WiFi, thereby enabling functions such as shopping, consumption, information retrieval, and video communication through the network.

[0003] When connecting a device to a router, you first need to know the router's Wi-Fi name and password. Then, you locate the Wi-Fi name in the list of wireless local area networks (WLANs) scanned by the device and enter the corresponding password to connect. However, connection failures often occur due to incorrect input, or the Wi-Fi password may be forgotten or incorrectly entered when setting a new password, preventing the device from connecting to the router and requiring a factory reset. This reduces the efficiency and convenience of connecting to the router. Summary of the Invention

[0004] This application provides a network connection method and apparatus. Based on the method described in this application, it is beneficial to improve the efficiency and convenience of connecting to a router.

[0005] In a first aspect, this application provides a network connection method applied to a terminal device, the method comprising:

[0006] Scan the QR code corresponding to the router through the first interface of the first application, launch the target program under the first application, and obtain the first parameter value corresponding to the router.

[0007] The target program sends a first request to the first server. The first request is used to request the wireless fidelity (WiFi) name and WiFi password corresponding to the router. The first request includes a first parameter value.

[0008] The target program receives a first response message from the first server in response to the first request. The first response message includes the WiFi name and WiFi password corresponding to the router.

[0009] The target program calls the first interface provided by the first application to establish a connection with the router based on the router's corresponding WiFi name and WiFi password.

[0010] In this embodiment, the terminal device can launch the target program (i.e., mini-program) under the first application by scanning the QR code corresponding to the router. The target program can obtain the WiFi name and WiFi password corresponding to the router from the first server, and call the first interface provided by the first application through the target program to establish a connection with the router based on the WiFi name and WiFi password corresponding to the router. This enables the terminal device to automatically and quickly connect to the router without having to manage the WiFi name and WiFi password corresponding to the router locally, which helps to improve the efficiency and convenience of connecting to the router.

[0011] In one possible implementation, after establishing a connection with the router via the first interface based on the router's corresponding WiFi name and WiFi password, the method further includes: obtaining the router's identifier; sending a second request to the first server through the target program, the second request being used to request the establishment of a binding relationship between the user account corresponding to the terminal device and the router, the second request including the router's identifier and the user account; and receiving a second response message from the first server in response to the second request, the second response message being used to indicate that the binding relationship has been successfully established, thereby enabling the terminal device to have router management privileges.

[0012] In this embodiment of the application, the terminal device requests the first server through the target program (mini-program) to establish a binding relationship between the user account corresponding to the terminal device and the router, so that the terminal device has the management authority of the router, so as to implement the router information acquisition or retrieval solution in the future.

[0013] In one possible implementation, the management permission includes obtaining the WiFi password corresponding to the router. The method further includes: entering a first keyword in a second interface of a first application; sending a third request to a second server through the first application, the third request being used to request the WiFi password corresponding to the router, the third request including the first keyword and a user account; receiving a third response message from the first server forwarded by the second server in response to the third request, the third response message including the WiFi password corresponding to the router; and displaying the WiFi password corresponding to the router in the second interface.

[0014] This method improves the ease with which users can retrieve or obtain their WiFi passwords, enhancing the user experience. Optionally, the second interface can also display the WiFi name corresponding to the router.

[0015] In one possible implementation, the management permission includes obtaining an image of the QR code corresponding to the router. The method further includes: entering a second keyword in a second interface of a first application; sending a fourth request to a second server through the first application, the fourth request being used to request an image of the QR code corresponding to the router, the fourth request including the second keyword and a user account; receiving a fourth response message from the first server forwarded by the second server in response to the fourth request, the fourth response message including an image of the QR code corresponding to the router; and displaying the image of the QR code corresponding to the router and the router's identifier in the second interface.

[0016] This method improves the ease with which users can find or obtain the QR code corresponding to their router. At the same time, because of the router's identification, it also makes it easier to distinguish which router the displayed QR code corresponds to.

[0017] In one possible implementation, the image of the QR code corresponding to the router included in the fourth response message is either the original image of the QR code corresponding to the router, or an updated image of the QR code corresponding to the router.

[0018] This method helps reduce the chances of devices maliciously connecting to the router. Users can change the QR code as needed to improve the security of the router connection.

[0019] In one possible implementation, the method further includes sending a user account to the router via the target program, so that the router records the binding relationship between the user account and the router.

[0020] This can be understood as follows: after the user account corresponding to the terminal device establishes a binding relationship with the router, the terminal device also needs to inform the router so that the router can know the current binding relationship in order to ensure the security of network connection management.

[0021] In one possible implementation, obtaining the router's identifier includes: displaying a second interface of a first application, the second interface including a router management button; in response to a trigger operation on the router management button, sending a fifth request to the router via a target program, the fifth request requesting the router's identifier; and receiving a fifth response message from the router in response to the fifth request, the fifth response message including the router's identifier. This provides a visual operation for managing the router, improving the user experience and making it more convenient.

[0022] In one possible implementation, the method further includes: receiving a seventh request from a router, the seventh request requesting permission for a first device to connect to the router, the first device being a device that restricts connections to the router for terminal devices; displaying a prompt based on the seventh request, the prompt prompting whether to allow the first device to connect to the router; and, in response to a triggering operation that allows the first device to connect to the router, sending a seventh response message to the router corresponding to the seventh request, the seventh response message indicating permission for the first device to connect to the router. This improves network connection security and also provides better supervision for children's devices.

[0023] In one possible implementation, the method further includes: receiving an eighth request from a router, the eighth request requesting a network rate corresponding to a second device, the second device being a device for limiting the network rate of the terminal device; displaying a selection box based on the eighth request, the selection box including multiple network rate options; and, in response to a triggering operation of a first network rate option, sending an eighth response message to the router corresponding to the eighth request, the eighth response message including the first network rate, which is one of multiple network rates. This is more conducive to ensuring the rationality of network rates for different types of devices and can better play a management role.

[0024] In one possible implementation, the QR code corresponding to the router corresponds to the first parameter value.

[0025] Secondly, this application provides a network connection method applied to a first server, the method comprising:

[0026] Receive a first request from a terminal device, the first request being used to request the WiFi name and WiFi password corresponding to the router, the first request including a first parameter value corresponding to the router;

[0027] Based on the first parameter value, find the WiFi name and WiFi password corresponding to the router;

[0028] Send a first response message to the terminal device in response to the first request. The first response message includes the WiFi name and WiFi password corresponding to the router.

[0029] In the embodiments of this application, the beneficial effects of possible implementations of the second aspect can be referred to the beneficial effects of possible implementations of the first aspect, and will not be repeated here.

[0030] In one possible implementation, the method further includes: receiving a second request from a terminal device, the second request being used to request the establishment of a binding relationship between a user account corresponding to the terminal device and a router, the second request including the router's identifier and the user account; establishing a binding relationship between the user account and the router based on the router's identifier and the user account; and sending a second response message to the terminal device in response to the second request, the second response message being used to indicate that the binding relationship has been successfully established.

[0031] In one possible implementation, the method further includes: receiving a third request from a terminal device forwarded by a second server, the third request being for requesting the WiFi password corresponding to the router, the third request including a first keyword and a user account; searching for the WiFi password corresponding to the router based on the first keyword and the user account; and sending a third response message to the second server in response to the third request, the third response message including the WiFi password corresponding to the router.

[0032] In one possible implementation, the method further includes: receiving a fourth request forwarded by a second server from a terminal device, the fourth request being for requesting an image of a QR code corresponding to a router, the fourth request including a second keyword and a user account; searching for a first parameter value corresponding to the router based on the second keyword and the user account; sending a sixth request to the second server, the sixth request being for requesting an image of a QR code corresponding to the router, the sixth request including the first parameter value; receiving a sixth response message from the second server in response to the sixth request, the sixth response message including an image of a QR code corresponding to the router; and sending a fourth response message to the second server in response to the fourth request, the fourth response message including an image of a QR code corresponding to the router.

[0033] In one possible implementation, the image of the QR code corresponding to the router included in the fourth response message is either the original image of the QR code corresponding to the router, or an updated image of the QR code corresponding to the router.

[0034] In one possible implementation, the QR code corresponding to the router corresponds to the first parameter value.

[0035] In one possible implementation, the method further includes: receiving first information from the router upon successful power-on and network connection, or upon the user modifying the router's corresponding WiFi name and / or WiFi password. This first information includes the router's identifier, first parameter values ​​corresponding to the router, and the router's corresponding WiFi name and / or WiFi password; and storing this first information. This approach facilitates subsequent assistance from the first server in connecting the terminal device to the router using the stored first information.

[0036] Thirdly, this application provides a network connection method applied to a router, the method comprising:

[0037] Receive the user account corresponding to the terminal device from the terminal device;

[0038] Record the binding relationship between user accounts and routers, enabling terminal devices to have management permissions for the router, including obtaining the WiFi password and the QR code image corresponding to the router.

[0039] In the embodiments of this application, the beneficial effects of possible implementations of the third aspect can be referred to the beneficial effects of possible implementations of the first aspect, and will not be repeated here.

[0040] In one possible implementation, the method further includes: receiving a fifth request from a terminal device, the fifth request being for requesting the identifier of a router; and sending a fifth response message to the terminal device in response to the fifth request, the fifth response message including the identifier of the router.

[0041] In one possible implementation, the method further includes: when the router is powered on and successfully connected to the network, or when the user modifies the WiFi name and / or WiFi password corresponding to the router, sending first information to a first server, the first information including the router's identifier, the router's corresponding first parameter value, and the router's corresponding WiFi name and / or WiFi password.

[0042] In one possible implementation, the method further includes: when the first device connects to the router by scanning the QR code corresponding to the router, sending a seventh request to the terminal device, the seventh request being used to request whether the first device is allowed to connect to the router, the first device restricting devices from connecting to the router for the terminal device; receiving a seventh response message from the terminal device corresponding to the seventh request, the seventh response message indicating that the first device is allowed to connect to the router, so that the first device establishes a connection with the router.

[0043] In one possible implementation, the method further includes: when the second device connects to the router by scanning the QR code corresponding to the router, sending an eighth request to the terminal device, the eighth request being used to request the network rate corresponding to the second device, the second device being a device for limiting the network rate of the terminal device; receiving an eighth response message from the terminal device corresponding to the eighth request, the eighth response message including the first network rate; and determining the first network rate as the network rate corresponding to the second device.

[0044] Fourthly, embodiments of this application provide a network connection device, which may be a terminal device, a device within a terminal device, or a device compatible with a terminal device. The network connection device may also be a chip system, capable of executing the methods performed by the terminal device in the first aspect. The functions of the network connection device can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the aforementioned functions. These units may be software and / or hardware. The operations performed by the network connection device and its beneficial effects can be found in the methods and beneficial effects described in the first aspect above; repetitions will not be repeated.

[0045] Fifthly, embodiments of this application provide a network connection device, which may be a first server, a device within the first server, or a device compatible with the first server. The network connection device may also be a chip system, capable of executing the methods performed by the first server in the second aspect. The functions of the network connection device can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the aforementioned functions. These units may be software and / or hardware. The operations performed by the network connection device and its beneficial effects can be found in the methods and beneficial effects described in the second aspect above; repetitions will not be repeated.

[0046] Sixthly, embodiments of this application provide a network connection device, which may be a router, a device within a router, or a device compatible with a router; wherein, the network connection device may also be a chip system, and the network connection device can execute the methods performed by the router in the third aspect. The functions of the network connection device can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions. The unit may be software and / or hardware. The operations performed by the network connection device and its beneficial effects can be found in the methods and beneficial effects described in the third aspect above, and will not be repeated here.

[0047] In a seventh aspect, embodiments of this application provide a network connectivity device, including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, the memories being used to store a computer program, and the processors being used to invoke the computer program, causing the network connectivity device to perform the method described in any one of the first to third aspects.

[0048] Eighthly, this application provides a chip system for use in a terminal device. The chip system includes at least one processor and an interface for receiving instructions and transmitting them to the at least one processor. The at least one processor executes the instructions to cause the terminal device to perform the method described in the first aspect.

[0049] In a ninth aspect, this application provides a chip system applied to a first server, the chip system including at least one processor and an interface for receiving instructions and transmitting them to the at least one processor; the at least one processor executes the instructions to cause the first server to perform the method described in the second aspect.

[0050] In a tenth aspect, this application provides a chip system for use in a router, the chip system including at least one processor and an interface for receiving instructions and transmitting them to the at least one processor; the at least one processor executes the instructions to cause the router to perform the method described in the third aspect.

[0051] In one aspect, this application provides a network connection system, which includes a terminal device, a first server, and a router; wherein the terminal device is used to perform the method as described in the first aspect, the first server is used to perform the method as described in the second aspect, and the router is used to perform the method as described in the third aspect.

[0052] In a twelfth aspect, this application provides a network connection device including functions or units for performing the methods described in any one of the first to third aspects.

[0053] In a thirteenth aspect, this application provides a computer storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the methods and steps described in any one of the first to third aspects.

[0054] In a fourteenth aspect, this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the methods and steps described in any one of the first to third aspects. Attached Figure Description

[0055] Figure 1 This is a schematic diagram of a system architecture provided in an embodiment of this application;

[0056] Figure 2 This is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of this application;

[0057] Figure 3 This is a software structure block diagram of a terminal device provided in an embodiment of this application;

[0058] Figure 4 This is a schematic diagram of the hardware structure of a first device 20 provided in an embodiment of this application;

[0059] Figure 5 This is a flowchart illustrating a method for binding a router to a QR code, as provided in an embodiment of this application.

[0060] Figure 6 This is a schematic diagram of a mini-program QR code and barcode provided in an embodiment of this application;

[0061] Figure 7 This is a flowchart illustrating a network connection method provided in an embodiment of this application;

[0062] Figure 8A This is a visual interface diagram of a terminal device connecting to a router provided in an embodiment of this application;

[0063] Figure 8B This is a visual interface diagram of another terminal device connecting to a router provided in an embodiment of this application;

[0064] Figure 9 This is a flowchart illustrating a method for binding a user account corresponding to a terminal device to a router, as provided in an embodiment of this application.

[0065] Figure 10 This is a visual interface diagram of binding a user account and a router provided in an embodiment of this application;

[0066] Figure 11 This is a flowchart illustrating a method for obtaining the WiFi password of a router according to an embodiment of this application;

[0067] Figure 12 This is a visual interface diagram of WiFi password acquisition provided in an embodiment of this application;

[0068] Figure 13 This is a flowchart illustrating a method for obtaining an image of a QR code corresponding to a router, as provided in an embodiment of this application.

[0069] Figure 14 This is a visual interface diagram of obtaining an image of a QR code corresponding to a router, provided in an embodiment of this application;

[0070] Figure 15 This is a schematic diagram illustrating a process for restricting a device's connection to a router, provided in an embodiment of this application.

[0071] Figure 16 This is a visual interface diagram of a device connection restriction mechanism provided in an embodiment of this application.

[0072] Figure 17This is a flowchart illustrating a method for limiting the network speed corresponding to a router, as provided in an embodiment of this application.

[0073] Figure 18 This is a visual interface diagram of limiting the network speed corresponding to a router, provided in an embodiment of this application;

[0074] Figure 19 This is a schematic diagram of the structure of a network connection device provided in an embodiment of this application;

[0075] Figure 20 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation

[0076] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0077] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0078] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with a user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visual interface elements such as time, date, text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.

[0079] To better understand the embodiments of this application, the communication system involved in the embodiments of this application will first be introduced below. The method provided in the embodiments of this application can be applied to wireless local area network (WLAN) systems, such as wireless fidelity (Wi-Fi). A WiFi system is a technology that uses wireless technology to achieve fast access to Ethernet. It replaces the traditional wired transmission medium with a wireless channel to build a local area network. The main design of a WiFi system is to provide convenient wireless network connectivity, enabling devices to transmit data without physical cables. The method provided in the embodiments of this application can be applied to the Institute of Electrical and Electronics Engineers (IEEE) 802.11 series protocols, such as the 802.11be protocol, the 802.11bn protocol, or next-generation protocols of the 802.11bn protocol, etc., which will not be listed here again.

[0080] Figure 1 This is a schematic diagram of a system architecture applicable to embodiments of this application. The system architecture includes a terminal device 100, a router 200, a first server 300, and a second server 400. Of course, Figure 1 The number of terminal devices, routers, and servers mentioned in this embodiment is merely an example and is not limited thereto. The method mentioned in this application can be jointly executed by terminal device 100, router 200, first server 300, and second server 400. Terminal device 100 can communicate with router 200, first server 300, and second server 400; router 200 can communicate with terminal device 100 and first server 300; first server 300 can communicate with terminal device 100, router 200, and second server 400; second server 400 can communicate with terminal device 100 and first server 300. The following describes the methods for using terminal devices and routers in this application. Figure 1 The system architecture involves detailed explanations of terminal devices, routers, the first server, and the second server.

[0081] I. Terminal Equipment

[0082] Terminal device 100, also known as electronic device, user equipment (UE), mobile station, mobile terminal, etc., is a device with wireless transceiver capabilities. Terminal device 100 can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, ultra-mobile personal computer (UMPC), wearable terminal device with wireless communication capabilities (such as a smartwatch), personal digital assistant (PDA), etc., but is not limited to these. Additionally, terminal device 100 is equipped with a display screen and can have pre-installed applications (APPs), etc., which are not limited here. It should be noted that all or part of the functions of the terminal device in this application can also be implemented through software functions running on hardware, or through virtualization functions instantiated on a platform (e.g., a cloud platform). In the embodiments of this application, the device used to implement the functions of the terminal device can be the terminal device itself, or a device capable of supporting the terminal device in implementing the functions, such as a chip system or a combination of devices or components capable of implementing the functions of the terminal device, which can be installed in the terminal device. It should be noted that the terminal device can also be referred to as a network connection device.

[0083] The hardware structure of terminal device 100 is described below. Please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram of the hardware structure of the terminal device 100 provided in the embodiments of this application.

[0084] Terminal device 100 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, a battery 142, 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0085] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0086] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0087] The controller can serve as the central nervous system and command center of the terminal device 100. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0088] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. The processor 110 retrieves the instructions or data stored in the memory, causing the terminal device 100 to execute the network connection method executed by the terminal device in the following method embodiments.

[0089] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0090] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.

[0091] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc. In some other embodiments, the power management module 141 may also be located in the processor 110.

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

[0093] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0094] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0095] A modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor.

[0096] The wireless communication module 160 can provide solutions for wireless communication applications on the terminal device 100, including wireless local area networks (WLAN) (such as Wi-Fi), Bluetooth (BT), BLE broadcasting, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0097] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology.

[0098] Terminal device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0099] 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 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0100] Terminal device 100 can perform shooting functions through an ISP, camera 193, video codec, GPU, display 194, and application processor. The ISP processes data fed back from the camera 193. The camera 193 captures still images or video. The digital signal processor processes digital signals, including digital image signals and other digital signals. The video codec compresses or decompresses digital video. Terminal device 100 can support one or more video codecs.

[0101] NPU stands for Neural-Network (NN) Computing Processor. By drawing inspiration from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can quickly process input information and continuously learn on its own.

[0102] 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 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.

[0103] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of terminal device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as a sound playback function), etc. The data storage area may store data created during the use of terminal device 100 (such as audio data), etc. Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as flash memory devices.

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

[0105] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0106] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The receiver 170B, also known as a "handpiece," is used to convert audio electrical signals into sound signals. The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. The headphone jack 170D is used to connect wired headphones. The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals.

[0107] In some embodiments, pressure sensor 180A may be disposed on display screen 194. Gyroscope sensor 180B may be used to determine the motion posture of terminal device 100. Barometric pressure sensor 180C is used to measure barometric pressure. Magnetic sensor 180D includes a Hall sensor. Accelerometer sensor 180E can detect the magnitude of acceleration of terminal device 100 in various directions (generally triaxial). Distance sensor 180F is used to measure distance. Proximity sensor 180G may include, for example, a light-emitting diode (LED) and a photosensor.

[0108] An ambient light sensor 180L is used to sense ambient light intensity. A fingerprint sensor 180H is used to collect fingerprints. A temperature sensor 180J is used to detect temperature. A touch sensor 180K, also known as a "touch panel," can be placed on the display screen 194. The touch sensor 180K and the display screen 194 together form a touchscreen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near it. A bone conduction sensor 180M can acquire vibration signals. Buttons 190 include power buttons, volume buttons, etc. A motor 191 can generate vibration prompts. An indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. A SIM card interface 195 is used to connect a SIM card.

[0109] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0110] In addition, an operating system runs on top of the aforementioned components. Examples include iOS and Android. The operating system of the terminal device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of the terminal device 100. It should be noted that although this application embodiment uses the Android system as an example for illustration, its basic principles are equally applicable to terminal devices with other operating systems.

[0111] Figure 3This is a software structure block diagram of the terminal device 100 according to an embodiment of this application. The software structure adopts a layered architecture, which divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In this embodiment, the operating system (taking the Android system, which runs on the AP as an example) can be divided into six layers, from top to bottom: application layer (APP), application framework layer (FWK), Android runtime and system library, hardware abstraction layer (HAL), kernel layer, and hardware layer.

[0112] The application layer can include a series of application packages. For example... Figure 3 As shown, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, and a primary application. The primary application here has a QR code scanning function. The application layer can also include a system UI, which is used to display the terminal device's interface, such as the scanning interface.

[0113] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, camera service, etc., and this application embodiment does not impose any limitations on this.

[0114] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0115] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0116] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0117] The phone manager is used to provide communication functions for terminal device 100. For example, it manages call status (including connection, hang-up, etc.).

[0118] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0119] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the device, and flashing indicator lights.

[0120] The camera service is the core process module of the camera framework. It mainly provides API interface functions to the application layer and calls the camera hardware abstraction layer through HIDL (hardware interface definition language).

[0121] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0122] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0123] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0124] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0125] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0126] The media library supports playback and recording of various common audio and video formats, as well as still image files. It also supports multiple audio and video encoding formats.

[0127] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0128] A 2D graphics engine is a graphics engine for 2D drawing.

[0129] The Hardware Abstraction Layer (HAL) is an interface layer located between the operating system kernel and the hardware circuitry, its purpose being to abstract the hardware. It hides the platform-specific hardware interface details, providing the operating system with a virtual hardware platform. For example, the HAL encapsulates Linux kernel drivers, providing an interface to the upper layers and shielding them from the implementation details of the lower-level hardware. Figure 3 As shown, the hardware abstraction layer can include Wi-Fi HAL, audio HAL, camera HAL, etc.

[0130] The kernel layer is the layer between hardware and software. It is the core of an operating system, the first layer of software extension based on the hardware, providing the most basic functions of the operating system. It is the foundation for the operating system's operation, responsible for managing system processes, memory, device drivers, files, and network systems, and determining the system's performance and stability. The kernel layer can include display drivers, audio drivers, camera drivers, sensor drivers, etc. Among them, the camera driver is the driver layer for camera devices, mainly responsible for interaction with the hardware.

[0131] The hardware layer includes displays, cameras, sensors, etc.

[0132] II. Router

[0133] A router is a hardware device that connects two or more networks, acting as a gateway between them. It's a dedicated, intelligent network device that reads the address in each data packet and determines how to transmit it. It can understand different protocols, such as Ethernet used by a local area network (LAN) and TCP / IP used by the Internet. Thus, a router can analyze the destination address of data packets from various types of networks, converting non-TCP / IP addresses to TCP / IP addresses, or vice versa; then, according to the selected routing algorithm, it transmits each data packet to the designated location along the optimal route. In this embodiment, terminal device 100 can connect to router 200 via WiFi, thereby enabling functions such as shopping, making purchases, querying information, and video communication through the network.

[0134] III. Servers (Server 1, Server 2)

[0135] A server is a high-performance computer specifically designed to provide computing power and run software applications in a network environment. Servers provide computing or application services to other terminal devices on a network, typically possessing the ability to respond to service requests and ensure service continuity. Compared to ordinary computers, servers have higher central processing unit (CPU) computing power, stronger I / O data throughput, and greater reliability and scalability.

[0136] The server here can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.

[0137] The hardware architecture of routers and servers is described below. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a schematic diagram of the hardware structure of the first device 20 provided in this application embodiment. The first device 20 can be the router 200 mentioned above, the first server 300 mentioned above, or the second server 400 mentioned above. The first device 20 may include a processor 201, a memory 202, a wireless communication module 203, a mobile communication module 204, an antenna 203A, an antenna 204A, etc. The wireless communication module 203 may include a WLAN communication module, a Bluetooth communication module, etc. The above-mentioned components can transmit data via a bus.

[0138] Processor 201 may include one or more processing units, such as a modem processor, a controller, a digital signal processor, a baseband processor, and / or a neural network processor. These different processing units may be independent devices or integrated into one or more processors.

[0139] The memory 202 can be used to store computer executable program code, which may include instructions. The processor 201 executes various functional applications and data processing of the first device 20 by running the instructions stored in the memory 202, such as performing various methods provided in the embodiments of this application.

[0140] The wireless communication function of the first device 20 can be implemented through antennas 203A and 204A, a mobile communication module 204, a wireless communication module 203, a modem processor, and a baseband processor. Antennas 203A and 204A can be used to transmit and receive electromagnetic wave signals. Each antenna in the first device 20 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 203A can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0141] The mobile communication module 204 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the first device 20. The mobile communication module 204 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 204 can receive electromagnetic waves via antenna 204A, and perform filtering and amplification on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 204 can also amplify the signal modulated by the modem processor, and the amplified signal is converted into electromagnetic waves and radiated out via antenna 204A. In some embodiments, at least some functional modules of the mobile communication module 204 may be housed in the processor 201. In some embodiments, at least some functional modules of the mobile communication module 204 and at least some modules of the processor 201 may be housed in the same device.

[0142] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 201 and may be housed in the same device as the mobile communication module 204 or other functional modules.

[0143] The wireless communication module 203 can provide solutions for wireless communication applications on the first device 20, including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 203 can be one or more devices integrating at least one communication processing module. The wireless communication module 203 receives electromagnetic waves via antenna 203A, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 201. The wireless communication module 203 can also receive signals to be transmitted from processor 201, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 203A.

[0144] In some embodiments, the antenna 204A of the first device 20 is coupled to the mobile communication module 204, and the antenna 203A of the first device 20 is coupled to the wireless communication module 203, so that the first device 20 can communicate with the network and other devices through wireless communication technology.

[0145] It is understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the first device 20. In other embodiments of this application, the first device 20 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0146] In this embodiment, the wireless communication module 203 can be used for WiFi connection between electronic devices, data transmission, or command transmission. The operations performed by each device in the first apparatus 20 are detailed in the preceding method embodiments and will not be elaborated upon here.

[0147] It should be noted that the terminal devices, routers, and servers mentioned in the embodiments of this application can also be collectively referred to as network connection devices. Furthermore, the system architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. Those skilled in the art will understand that, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0148] To facilitate understanding of the solutions provided in the embodiments of this application, the relevant concepts involved in the embodiments of this application are introduced below:

[0149] 1. Barcodes and QR codes

[0150] A barcode is a graphic identifier that uses multiple black bars and spaces of varying widths arranged according to certain encoding rules to represent a set of information. Common barcodes consist of a pattern of parallel lines made up of black bars (simply called bars) and white bars (simply called spaces) with significantly different reflectivities.

[0151] A QR code (quick response code) is a rectangular pattern composed of a square matrix and black and white pixels, representing a piece of encoded information. It is a rectangular barcode widely used on mobile phones, characterized by high-density encoding and large storage capacity. QR codes can store various information such as numbers, text, website addresses, SMS messages, and phone numbers. By scanning a QR code with a mobile phone, users can easily obtain relevant information or perform specific operations.

[0152] The advantages of QR codes lie primarily in their large information capacity, fast scanning speed, and ease of use. Compared to traditional barcodes, QR codes can store more information, scan faster, and offer a better user experience. Furthermore, QR code generation and recognition technologies are highly mature and can be implemented on various devices, making their application more widespread.

[0153] With the widespread use of smartphones, QR codes have become an indispensable part of modern life. They can be used on various products, whether for advertising and product management in commercial activities or for personal social sharing, enabling more convenient operations and information transmission.

[0154] 2. Mini Program

[0155] Mini-programs, also known as micro-applications, are applications that can be used without downloading or installation. They simplify the traditional steps of downloading, installing, and opening software (apps), allowing users to use them instantly without cumbersome download and installation processes. To facilitate quick access and sharing of mini-programs, a specific QR code is generated—the mini-program QR code (also called a sunflower code, sunflower code, or mini-program code). This code contains the mini-program's unique identifier, along with possible page paths and parameters. Users can directly open the mini-program or access its designated page by scanning the QR code.

[0156] Based on the above, when connecting a terminal device to a router, you first need to know the router's Wi-Fi name and password. Then, the terminal device needs to find the Wi-Fi name in the list of wireless local area networks (WLANs) it scans, and enter the corresponding Wi-Fi password to connect. However, connection failures often occur due to incorrect input, or the Wi-Fi password may be forgotten or incorrectly entered when setting a new password, preventing the device from connecting to the router and requiring a factory reset. This reduces the efficiency and convenience of connecting to the router.

[0157] Therefore, in order to improve the efficiency and convenience of connecting to routers, embodiments of this application provide a network connection method and apparatus. The network connection method and apparatus provided in the embodiments of this application will be further described in detail below.

[0158] I. Router and QR code binding scheme

[0159] Before the terminal device connects to the router, a binding relationship needs to be established between the router and the QR code. For example... Figure 5 As shown, Figure 5 This application provides a method for binding a router to a QR code, which includes the following steps S501 to S506. The embodiment of this application uses a mini-program QR code as an example for illustration.

[0160] S501. During the router manufacturing process, production line workers will receive a barcode and a corresponding mini-program QR code.

[0161] like Figure 6 As shown, Figure 6 This includes a WeChat Mini Program QR code 601 and a barcode 602. The QR code 601 carries a 14-digit parameter value corresponding to the barcode 602, and the barcode 602 also carries a 14-digit parameter value. The parameter value carried by the barcode 602 can consist of uppercase letters and numbers, such as PFMHWS8UQFTF1V. This parameter value can be called "wechatcode," but other names are also acceptable and are not limited here.

[0162] S502. Production line workers use a barcode scanner to scan the barcode, enabling computer equipment to obtain the parameter values ​​carried by the barcode.

[0163] S503. The computer device searches the system database to see if the parameter value carried by the barcode is unique.

[0164] S504. If the parameter value carried by the barcode is unique, the production line staff shall write the parameter value into the router using router equipment command 1.

[0165] For example, equipment command 1 could be "diag set wechatcodePFMHWS8UQFTF1V".

[0166] S505, production line staff further read the parameter values ​​written in the router through router equipment command 2 to verify the accuracy of the parameter values ​​written.

[0167] For example, equipment command 2 could be "diag display wechatcode".

[0168] S506. If the verification is successful, the production line staff will tear off the barcode, leaving only the mini-program QR code, and then stick the mini-program QR code on the router.

[0169] Through the above steps S501 to S506, the binding relationship between the router and the mini-program QR code is established, so that subsequent terminal devices can connect to the router more conveniently and quickly.

[0170] II. Network Connection Scheme between Terminal Devices and Routers

[0171] After establishing the binding relationship between the router and the QR code, as follows Figure 7 As shown in the figure, this application embodiment provides a network connection method, which includes the following steps S701 to S705. Figure 7 The method shown can be implemented by the aforementioned terminal device, router, and first server. Alternatively, Figure 7 The device that performs the method shown can be a chip in a terminal device, a chip in a router, or a chip in a first server; however, this application does not limit the specific implementation of the method. Figure 7 The method will be illustrated using a terminal device, a router, and a first server as the implementing entities. It should be noted that the first server here can be a server providing router-related services.

[0172] S701. The terminal device scans the QR code corresponding to the router through the first interface of the first application, starts the target program under the first application, and obtains the first parameter value corresponding to the router.

[0173] In this embodiment, the first application has a QR code scanning function, and the target program can be considered a mini-program. Taking a mini-program QR code as an example, the router has a corresponding mini-program QR code affixed to its body. The user can open the first interface of the first application on the terminal device and use the first interface to scan the mini-program QR code corresponding to the router to enter the corresponding "One Scan Connect" mini-program (i.e., the target program; of course, other names can also be used, this is just an example and is not limited here). Furthermore, the terminal device will also obtain the first parameter value carried by the mini-program QR code (e.g., PFMHWS8UQFTF1V).

[0174] S702, the terminal device sends a first request to the first server through the target program. The first request is used to request the WiFi name and WiFi password corresponding to the router, and the first request includes the first parameter value. Accordingly, the first server receives the first request from the terminal device.

[0175] In this embodiment of the application, after the terminal device launches the target program under the first application, the terminal device will automatically request the WiFi name and WiFi password corresponding to the router from the first server through the target program (i.e., the first request), and will carry the first parameter value corresponding to the QR code of the mini program in the first request.

[0176] S703. The first server uses the first parameter value to find the WiFi name and WiFi password corresponding to the router.

[0177] In this embodiment of the application, after receiving the first request from the terminal device, the first server will look up the WiFi name and WiFi password corresponding to the router in the database list according to the first parameter value.

[0178] The database list stored on the first server may include the router's identifier (such as serial number (SN)), the router's corresponding first parameter value (such as the 14-bit parameter value corresponding to the barcode mentioned above), the router's corresponding WiFi name (such as service set identifier (SSID)), and the router's corresponding WiFi password (password, pwd), etc.

[0179] As shown in Table 1 below, Table 1 is a database list provided in an embodiment of this application. In Table 1, for router 1, the SN of router 1 is AXJHR84402000166, the first parameter value of router 1 is PFMHWS8UQFTF1V, the WiFi name of router 1 is 237UHS, and the WiFi password of router 1 is 11111111; for router 2, the SN of router 2 is AXJHR84617000260, the first parameter value of router 2 is Y2P4YCAQ5TNIQY, the WiFi name of router 2 is APL897, and the WiFi password of router 2 is 22222222.

[0180] Table 1

[0181] SN First parameter value WiFi Name (SSID) WiFi password (pwd) AXJHR84402000166 PFMHWS8UQFTF1V 237UHS 11111111 AXJHR84617000260 Y2P4YCAQ5TNIQY APL897 22222222

[0182] For example, assuming the first parameter value carried in the first request is PFMHWS8UQFTF1V, the first server can find the WiFi name (SSID) of the router as 237UHS and the WiFi password of the router as 11111111 based on the first parameter value (PFMHWS8UQFTF1V) in Table 1 above.

[0183] Regarding the method of creating the database list, in one possible implementation, the method further includes steps s11 and s12:

[0184] s11. When the router is powered on and successfully connected to the network, or when the user changes the WiFi name and / or WiFi password corresponding to the router, the router sends first information to the first server. This first information includes the router's identifier, the first parameter value corresponding to the router, and the WiFi name and / or WiFi password corresponding to the router. Accordingly, the first server receives the first information from the router.

[0185] s12. The first server stores the first information and uses the first information to create a database list.

[0186] This can be understood as follows: when the router successfully connects to the network after powering on, or when the user changes the router's Wi-Fi name and / or password, the router will proactively upload information such as its identifier (e.g., SN), its first parameter value, its Wi-Fi name (SSID), and / or Wi-Fi password (PWD). The first server will then store this information and generate a database list (as shown in Table 1 above). For subsequently uploaded information, the first server can query based on the router's identifier. If the router's identifier already exists in the database list, the corresponding information can be updated; if the router's identifier does not exist, the content of the database list can be added. Based on this method, it is beneficial for the first server to subsequently assist terminal devices in connecting to the router using the established database list.

[0187] S704. The first server sends a first response message to the terminal device in response to the first request. The first response message includes the WiFi name and WiFi password corresponding to the router. Accordingly, the terminal device receives the first response message from the first server in response to the first request.

[0188] In this embodiment of the application, after the first server finds the WiFi name and WiFi password corresponding to the router based on the first parameter value, it can send the WiFi name and WiFi password corresponding to the router to the terminal device through the first response message.

[0189] S705. The terminal device calls the first interface provided by the first application through the target program to establish a connection with the router based on the WiFi name and WiFi password corresponding to the router through the first interface.

[0190] In this embodiment of the application, after the terminal device receives the first response message from the first server, it can call the first interface (i.e., application programming interface, API) provided by the first application through the target program, and use the WiFi name and WiFi password corresponding to the router to help the terminal device automatically connect to the router.

[0191] The network connection method described below for steps S701 to S704 above. Figure 8A and Figure 8B This illustration shows a visual interface diagram of a terminal device connecting to a router, according to an embodiment of this application. Figure 8A As shown, taking a mobile phone as an example, users can use the QR code scanning function in the first application on their mobile phone to scan the QR code corresponding to the router (such as the mini-program QR code) through the first interface to enter the target mini-program (such as the YiSaoLian mini-program).

[0192] Furthermore, such as Figure 8B As shown, by scanning a QR code, the mobile phone can obtain the first parameter value corresponding to the router. The target mini-program then uses this first parameter value to request the router's WiFi name (such as SSID) and WiFi password from the first server, thus synchronizing the router information. After successful synchronization, the mobile phone uses the target mini-program to call the first interface provided by the first application to establish a connection with the router based on its WiFi name and password. Once the mobile phone successfully connects to the router's WiFi, it displays a third interface, which includes a first notification message. This first notification message indicates a successful connection to the router; for example, it could be "Successfully connected to router WiFi".

[0193] It can be seen that, based on Figure 7 The described method allows a terminal device to launch a target program (i.e., a mini-program) under the first application by scanning the QR code corresponding to the router. Through this target program, the device can obtain the WiFi name and WiFi password corresponding to the router from the first server. Furthermore, the target program calls the first interface provided by the first application to establish a connection with the router based on the WiFi name and WiFi password. This enables the terminal device to automatically and quickly connect to the router without having to manage the WiFi name and WiFi password locally, thus improving the efficiency and convenience of connecting to the router.

[0194] III. Binding scheme between user accounts on terminal devices and routers

[0195] After the terminal device establishes a connection with the router, the network connection method may further include establishing a binding relationship between the user account corresponding to the terminal device and the router (that is, after step S705 above, the following steps S901 to S904 may also be included).

[0196] like Figure 9 As shown, this application embodiment provides a method for binding a user account corresponding to a terminal device to a router, the binding method including the following steps S901 to S904. Figure 9 The method shown can be implemented by the aforementioned terminal device, router, and first server. Alternatively, Figure 9 The device that performs the method shown can be a chip in a terminal device, a chip in a router, or a chip in a first server; however, this application does not limit the specific implementation of the method. Figure 9 The method will be illustrated using a terminal device, a router, and a first server as the implementing entities. It should be noted that the first server here can be a server providing router-related services.

[0197] S901, The terminal device obtains the router's identifier.

[0198] In this embodiment, since the terminal device has established a connection with the router, the terminal device can obtain the router's identifier (such as SN) from the router. Of course, the terminal device can also obtain the router's identifier from other devices, which is not limited here.

[0199] In one possible implementation, taking the terminal device obtaining the router's identifier from the router as an example, the specific implementation may include the following steps s21 to s23.

[0200] s21. The terminal device displays a second interface of the first application, which includes a router management button.

[0201] s22. In response to triggering the management router button, the terminal device sends a fifth request to the router via the target program. This fifth request requests the router's identifier. Accordingly, the router receives the fifth request from the terminal device.

[0202] s23. The router sends a fifth response message to the terminal device in response to the fifth request. The fifth response message includes the router's identifier. Accordingly, the terminal device receives the fifth response message from the router in response to the fifth request through the target program.

[0203] For example, such as Figure 10 As shown, to better manage the router, users first need to establish a binding relationship between the user account corresponding to the terminal device and the router, making the user the router's administrator. At this point, the user can open the second interface of the first application and click the "Manage Router" button on that interface to enter the "One-Scan Connection" mini-program (i.e., the target program). The "One-Scan Connection" mini-program can send a fifth request to the router in the background to request the router's identifier; after receiving the fifth request, the router will return the router's identifier to the terminal device, which can then receive the router's identifier through the "One-Scan Connection" mini-program.

[0204] S902, the terminal device sends a second request to the first server through the target program. This second request requests the establishment of a binding relationship between the user account corresponding to the terminal device and the router. The second request includes the router's identifier and the user account. Correspondingly, the first server receives the second request from the terminal device.

[0205] S903. The first server establishes a binding relationship between the user account and the router based on the router's identifier and the user account.

[0206] In this embodiment of the application, after the terminal device obtains the router's identifier, the OneScan Connect mini program will further send a second request to the first server to request the establishment of a binding relationship between the user account corresponding to the terminal device and the router, and will carry the router's identifier and the user account in the second request.

[0207] After receiving the second request, the first server locates the router's identifier in the aforementioned database list and writes the user account (openid) bound to the router's identifier into the corresponding information. As shown in Table 2 below, based on Table 1 above, the first server further stores the user account (openid) bound to the router's identifier in the database list.

[0208] Table 2

[0209]

[0210] S904. The first server sends a second response message to the terminal device in response to the second request. This second response message indicates that the binding relationship has been successfully established. Accordingly, the terminal device receives the second response message from the first server in response to the second request, thereby granting the terminal device management privileges over the router.

[0211] In this embodiment, after the first server establishes the binding relationship between the user account and the router, the first server will notify the terminal device of the successful establishment of the binding relationship through a second response message. This makes the user account the administrator of the router, and the terminal device then has management privileges over the router. For example... Figure 10 As shown, once the binding relationship between the user account corresponding to the terminal device and the router is successfully established, a second prompt message will be displayed on the fourth screen. This second prompt message indicates that the current user account has been successfully bound to the router.

[0212] The management permissions here include, but are not limited to: obtaining (retrieving) the WiFi password of the router, obtaining (retrieving) the QR code image of the router, restricting the connected devices of the router, restricting the network speed of the router, modifying the WiFi password of the router, and modifying the WiFi name of the router.

[0213] In one possible implementation, the method further includes: the terminal device sending the user account to the router via a target program, so that the router records the binding relationship between the user account and the router. Accordingly, the router receives the user account from the terminal device.

[0214] This can be understood as follows: after the user account corresponding to the terminal device establishes a binding relationship with the router, the terminal device also needs to inform the router so that the router can know the current binding relationship in order to ensure the security of network connection management.

[0215] In one possible implementation, the QR code corresponding to the router corresponds to the first parameter value. That is, there is a direct correspondence between the QR code and the first parameter value. There can be one or more QR codes for the router, but each corresponds to only one first parameter value. The QR code for the router can be updated periodically as needed by the user to prevent unauthorized access and ensure network connection security.

[0216] It is evident. Based on Figure 9 The described method involves a terminal device requesting a binding relationship between its user account and the router from a first server via a target program (app), thereby granting the terminal device management privileges over the router and enabling subsequent router information retrieval or recovery solutions.

[0217] IV. Router Information Retrieval Solution

[0218] After the user account corresponding to the terminal device is bound to the router, this network connection method can further utilize this binding relationship to perform relevant router management, such as obtaining (retrieving) the router's WiFi password, obtaining (retrieving) the router's QR code image, restricting connected devices, limiting the router's network speed, modifying the router's WiFi password, and modifying the router's WiFi name. (That is, after step S904 above, the following steps S1101 to S1107, or steps S1301 to S1310, or steps S1501 to S1503, or steps S1701 to S1704 may also be included). The following provides a detailed explanation of four scenarios.

[0219] Scenario 1: Methods for obtaining (retrieving) the WiFi password corresponding to the router.

[0220] like Figure 11 As shown in the figure, this application embodiment provides a method for obtaining the WiFi password corresponding to a router, which includes the following steps S1101 to S1107. Figure 11 The method shown can be implemented by the aforementioned terminal device, router, first server, and second server. Alternatively, Figure 11 The device that performs the method shown can be a chip in a terminal device, a chip in a router, a chip in a first server, or a chip in a second server. This application does not limit the implementation of the method. Figure 11The method will be illustrated using a terminal device, a router, a first server, and a second server as the execution entities. It should be noted that the first server here can be a server for router-related services, and the second server can be a server corresponding to the first application.

[0221] S1101, The terminal device inputs the first keyword in the second interface of the first application.

[0222] S1102, the terminal device sends a third request to the second server through the first application. This third request is used to request the WiFi password corresponding to the router, and includes the first keyword and the user account corresponding to the terminal device. Accordingly, the second server receives the third request from the terminal device.

[0223] S1103. The second server forwards the third request from the terminal device to the first server. Accordingly, the first server receives the third request from the terminal device forwarded by the second server.

[0224] S1104. The first server uses the first keyword and the user account to find the WiFi password corresponding to the router.

[0225] S1105, the first server sends a third response message to the second server in response to the third request. The third response message includes the WiFi password corresponding to the router. Accordingly, the second server receives the third response message from the first server in response to the third request.

[0226] S1106. The second server forwards the third response message from the first server in response to the third request to the terminal device. Accordingly, the terminal device receives the third response message from the first server in response to the third request forwarded by the second server through the first application.

[0227] S1107. The terminal device displays the WiFi password corresponding to the router on the second interface.

[0228] Optionally, the terminal device may also display the WiFi name corresponding to the router on the second interface.

[0229] For example, such as Figure 12As shown in Table 2 above, to retrieve the WiFi password for a router, a user can open the second interface of the first application (e.g., a public account interface) and enter a first keyword, such as "WiFi password". The first application will then automatically send a third request to the second server in the background, requesting the WiFi password for the router, and including the first keyword and the user account corresponding to the terminal device in the third request. After receiving the third request, the second server will forward it to the first server. The first server recognizes the first keyword as "WiFi password" and will then query the database list using the user account corresponding to the terminal device to find the corresponding WiFi name and password. As shown in Table 2 above, assuming the user account is Aaaaaaa, the corresponding WiFi name found in the database list is "237UHS", and the WiFi password is "11111111".

[0230] Furthermore, the first server sends a third response message to the second server in response to the third request, including the WiFi name (“237UHS”) and the corresponding WiFi password (“11111111”). Upon receiving this third response message, the second server forwards it to the terminal device, enabling the terminal device to obtain the WiFi name (“237UHS”) and the corresponding WiFi password (“11111111”). Figure 12 As shown, the terminal device will display the WiFi name and WiFi password corresponding to the router in the second interface of the first application, namely "237UHS" and "11111111", so that users can view it directly, which improves the convenience of users to find or obtain WiFi password. At the same time, because of the WiFi name, it is also easier to distinguish which WiFi name the displayed WiFi password corresponds to.

[0231] Scenario 2: Method for obtaining (retrieving) the QR code image corresponding to the router.

[0232] like Figure 13 As shown in the figure, this application embodiment provides a method for obtaining an image of a QR code corresponding to a router. The method includes the following steps S1301 to S1310. Figure 13 The method shown can be implemented by the aforementioned terminal device, router, first server, and second server. Alternatively, Figure 13 The device that performs the method shown can be a chip in a terminal device, a chip in a router, a chip in a first server, or a chip in a second server. This application does not limit the implementation of the method. Figure 13The method will be illustrated using a terminal device, a router, a first server, and a second server as the execution entities. It should be noted that the first server here can be a server for router-related services, and the second server can be a server corresponding to the first application.

[0233] S1301, The terminal device enters the second keyword in the second interface of the first application.

[0234] S1302, the terminal device sends a fourth request to the second server through the first application. This fourth request requests an image of the QR code corresponding to the router. The fourth request includes the second keyword and the user account. Accordingly, the second server receives the fourth request from the terminal device.

[0235] S1303, the second server forwards the fourth request from the terminal device to the first server. Accordingly, the first server receives the fourth request from the terminal device forwarded by the second server.

[0236] S1304. The first server uses the second keyword and the user account to find the first parameter value corresponding to the router.

[0237] S1305, the first server sends a sixth request to the second server. This sixth request requests an image of the QR code corresponding to the router, and includes the first parameter value. Correspondingly, the second server receives the sixth request from the first server.

[0238] S1306. The second server determines the image of the QR code corresponding to the router based on the first parameter value corresponding to the router.

[0239] S1307, the second server sends a sixth response message to the first server in response to the sixth request. This sixth response message includes an image of the QR code corresponding to the router. Correspondingly, the first server receives the sixth response message from the second server in response to the sixth request.

[0240] S1308, the first server sends a fourth response message to the second server in response to the fourth request. This fourth response message includes an image of the QR code corresponding to the router. Correspondingly, the second server receives the fourth response message from the first server in response to the fourth request.

[0241] S1309, the second server forwards the fourth response message from the first server in response to the fourth request to the terminal device. Accordingly, the terminal device receives the fourth response message from the first server in response to the fourth request forwarded by the second server through the first application.

[0242] S1310 The terminal device displays an image of the QR code corresponding to the router and the router's logo on the second interface.

[0243] For example, such as Figure 14 As shown in Table 2 above, when the QR code for the mini-program on the router is worn or lost and becomes unusable, the user can open the second interface of the first application (such as the official account interface) to retrieve the image of the QR code corresponding to the router. In the second interface, the user enters a second keyword, such as "scan to connect to the mini-program QR code". The first application will then automatically send a fourth request to the second server in the background to request the image of the QR code corresponding to the router, carrying the second keyword and the user account corresponding to the terminal device in the fourth request. After receiving the fourth request, the second server will forward it to the first server. The first server recognizes the second keyword as "scan to connect to the mini-program QR code" and will then query the database list for the first parameter value corresponding to the router using the user account corresponding to the terminal device. As shown in Table 2 above, assuming the user account is Aaaaaaa, the first parameter value corresponding to the router found in the database list is "PFMHWS8UQFTF1V".

[0244] Furthermore, the first server sends a sixth request to the second server to request an image of the QR code corresponding to the router, and includes the first parameter value (“PFMHWS8UQFTF1V”) in the sixth request. The second server retrieves a corresponding QR code image from its database based on the first parameter value and returns it to the first server via a sixth response message.

[0245] Furthermore, after the first server obtains the image of the QR code corresponding to the router from the second server, it sends a fourth response message to the second server in response to the fourth request. This fourth response message includes the image of the QR code corresponding to the router and the router's identifier. Upon receiving this fourth response message, the second server forwards it to the terminal device, enabling the terminal device to obtain the image of the QR code corresponding to the router and the router's identifier. Figure 14 As shown, the terminal device will then display the QR code image corresponding to the router and the router's identifier (SN: "AXJHR94402000166") on the second interface of the first application, allowing users to save, print, and paste it for later use. Users can find the router's identifier on the nameplate on the router itself and then paste the QR code image corresponding to that router onto the device. This improves the convenience for users to retrieve the QR code corresponding to the router, and the router's identifier also makes it easier to distinguish which router the displayed QR code corresponds to.

[0246] Optionally, the image of the QR code corresponding to the router included in the fourth response message may be the original image of the QR code corresponding to the router, or an updated image of the QR code corresponding to the router.

[0247] This can be understood as the terminal device retrieving the QR code image corresponding to the router. This image can be the same as the original, or it can be an updated and optimized version of the QR code for that router. The key is that all QR code images correspond to the same first parameter value. Users can scan the QR code to access the target program (such as the "One Scan Connect" mini-program) and obtain the router's first parameter value. This helps reduce malicious connections to the router, and users can change the QR code as needed to improve router connection security.

[0248] Scenario 3: Restrictions on the connected devices associated with the router.

[0249] like Figure 15 As shown in the figure, this application embodiment provides a method for restricting a device from connecting to a router. The retrieval method includes the following steps S1501 to S1503. Figure 15 The method shown can be implemented by the aforementioned terminal devices and routers. Alternatively, Figure 15 The device that performs the method shown can be a chip in a terminal device or a chip in a router; however, this application does not limit the implementation of such a method. Figure 15 The method will be explained using terminal devices and routers as examples.

[0250] S1501, If ​​the first device connects to the router by scanning the QR code corresponding to the router, the router sends a seventh request to the terminal device. This seventh request requests permission for the first device to connect to the router, whereby the first device restricts devices from connecting to the router for the terminal device. Accordingly, the terminal device receives the seventh request from the router.

[0251] S1502. The terminal device displays a prompt box based on the seventh request, which prompts whether the first device is allowed to connect to the router.

[0252] S1503. In response to the triggering operation that allows the first device to connect to the router, the terminal device sends a seventh response message to the router corresponding to the seventh request. The seventh response message indicates that the first device is allowed to connect to the router. Accordingly, the router receives the seventh response message from the terminal device corresponding to the seventh request, thereby enabling the first device to establish a connection with the router.

[0253] For example, such as Figure 16As shown, since the terminal device has management privileges over the router, the user can restrict unfamiliar devices, maliciously connected devices, or children's devices from connecting to the router. In other words, the user must obtain permission from the terminal device before connecting. Taking the first device as an example, this first device is the one the terminal device restricts from connecting to the router. Assuming the first device is a children's device, when it connects to the router by scanning the router's QR code, the router will automatically send a seventh request to the terminal device. This seventh request asks whether the first device is allowed to connect. After receiving the seventh request from the router, the terminal device will display a prompt in the first application, asking the user whether to allow the first device to connect to the router.

[0254] The prompt also includes "Agree" and "Deny" buttons. If the user clicks the "Agree" button, it indicates that the first device is allowed to connect to the router. The terminal device will then send a seventh response message to the router corresponding to the seventh request. This seventh response message indicates that the first device is allowed to connect to the router, thus establishing a connection between the first device and the router. This improves network connection security and also provides better supervision for children's devices.

[0255] If the user clicks the deny button, it means that the first device is not allowed to connect to the router. At this time, the terminal device will send a ninth response message to the router in response to the seventh request. The ninth response message indicates that the first device is not allowed to connect to the router, so that the router cannot establish a connection with the first device.

[0256] Scenario 4: Network speed limitations associated with the router.

[0257] like Figure 17 As shown in the figure, this application embodiment provides a method for limiting the network speed corresponding to a router. The retrieval method includes the following steps S1701 to S1704. Figure 17 The method shown can be implemented by the aforementioned terminal devices and routers. Alternatively, Figure 17 The device that performs the method shown can be a chip in a terminal device or a chip in a router; however, this application does not limit the implementation of such a method. Figure 17 The method will be explained using terminal devices and routers as examples.

[0258] S1701, when the second device connects to the router by scanning the QR code corresponding to the router, the router sends an eighth request to the terminal device. This eighth request requests the network speed corresponding to the second device, which is the device that limits the network speed for the terminal device. Accordingly, the terminal device receives the eighth request from the router.

[0259] S1702, The terminal device displays a selection box based on the eighth request, the selection box including multiple network speed options.

[0260] S1703. In response to the triggering operation of the option for the first network rate, the terminal device sends an eighth response message to the router corresponding to the eighth request. The eighth response message includes the first network rate, which is one of the plurality of network rates. Accordingly, the router receives the eighth response message from the terminal device corresponding to the eighth request.

[0261] S1704. The router determines the first network speed as the network speed corresponding to the second device.

[0262] For example, such as Figure 18 As shown, since the terminal device has management permissions for the router, users can limit the network speed of devices such as those used by the elderly or children. This requires user settings on the terminal device to configure the network speed. Taking the second device as an example, this second device is the one the terminal device is limiting the network speed for. Assuming the second device is a child's device, when it connects to the router by scanning the router's QR code, the router automatically sends an eighth request to the terminal device. This eighth request requests the network speed corresponding to the second device. After receiving the eighth request from the router, the terminal device displays a selection box in the first application. This selection box includes multiple network speed options, such as a first network speed option, a second network speed option, and a third network speed option.

[0263] Assuming the user selects the first network speed option, the terminal device will send an eighth response message to the router corresponding to this eighth request. This eighth response message includes the first network speed. Upon receiving this eighth response message, the router will determine this first network speed as the network speed corresponding to the second device. For example, a higher network speed can be selected for office devices and gaming devices, while a lower network speed can be selected for children's devices, devices for the elderly, or less frequently used devices. This better ensures the appropriate network speed for different types of devices and facilitates better management.

[0264] The apparatus provided in the embodiments of this application will be described below.

[0265] This application divides the device into functional modules according to the above method embodiments. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application is illustrative and only represents one logical functional division; other division methods may be used in actual implementation. The following will combine... Figure 19 and Figure 20 The apparatus of the embodiments of this application is described in detail.

[0266] Please see Figure 19 , Figure 19 A schematic diagram of the structure of a network connection device 1900 according to an embodiment of this application is shown. Figure 19 The network connection device shown can be a terminal device, a device within a terminal device, or a device that can be used in conjunction with a terminal device. Figure 19 The network connection device shown may include a processing unit 1901 and a communication unit 1902. Wherein:

[0267] The processing unit 1901 is used to scan the QR code corresponding to the router through the first interface of the first application, start the target program under the first application, and obtain the first parameter value corresponding to the router.

[0268] The communication unit 1902 is used to send a first request to the first server through the target program. The first request is used to request the WiFi name and WiFi password corresponding to the router. The first request includes a first parameter value.

[0269] The communication unit 1902 is also configured to receive a first response message from the first server in response to the first request through the target program, the first response message including the WiFi name and WiFi password corresponding to the router;

[0270] The processing unit 1901 is also used to call the first interface provided by the first application through the target program, so as to establish a connection with the router based on the WiFi name and WiFi password corresponding to the router through the first interface.

[0271] In one possible implementation, after establishing a connection with the router via the first interface based on the router's corresponding WiFi name and WiFi password, the processing unit 1901 is further configured to: obtain the router's identifier; send a second request to the first server through the target program, the second request being used to request the establishment of a binding relationship between the user account corresponding to the terminal device and the router, the second request including the router's identifier and the user account; and receive a second response message from the first server in response to the second request, the second response message being used to indicate that the binding relationship has been successfully established, thereby enabling the terminal device to have router management privileges.

[0272] In one possible implementation, the management authority includes obtaining the WiFi password corresponding to the router. The processing unit 1901 is further configured to: input a first keyword in the second interface of the first application; send a third request to the second server through the first application, the third request being used to request the WiFi password corresponding to the router, the third request including the first keyword and the user account; receive a third response message from the first server forwarded by the second server in response to the third request, the third response message including the WiFi password corresponding to the router; and display the WiFi password corresponding to the router in the second interface.

[0273] In one possible implementation, the management authority includes acquiring an image of the QR code corresponding to the router. The processing unit 1901 is further configured to: input a second keyword in the second interface of the first application; send a fourth request to the second server through the first application, the fourth request being used to request an image of the QR code corresponding to the router, the fourth request including the second keyword and the user account; receive a fourth response message forwarded by the second server from the first server in response to the fourth request, the fourth response message including an image of the QR code corresponding to the router; and display the image of the QR code corresponding to the router and the router's identifier in the second interface.

[0274] In one possible implementation, the image of the QR code corresponding to the router included in the fourth response message is either the original image of the QR code corresponding to the router, or an updated image of the QR code corresponding to the router.

[0275] In one possible implementation, the communication unit 1902 is further configured to: send a user account to the router via the target program, so that the router records the binding relationship between the user account and the router.

[0276] In one possible implementation, when obtaining the router's identifier, the processing unit 1901 is specifically configured to: display a second interface of a first application, the second interface including a router management button; in response to a trigger operation on the router management button, send a fifth request to the router through a target program, the fifth request being used to request the router's identifier; and receive a fifth response message from the router in response to the fifth request, the fifth response message including the router's identifier.

[0277] In one possible implementation, the communication unit 1902 is further configured to: receive a seventh request from the router, the seventh request being for requesting whether to allow a first device to connect to the router, the first device being a device that restricts devices from connecting to the router for terminal devices; the processing unit 1901 is further configured to: display a prompt box based on the seventh request, the prompt box being for prompting whether to allow the first device to connect to the router; the communication unit 1902 is further configured to: in response to a triggering operation that allows the first device to connect to the router, send a seventh response message corresponding to the seventh request to the router, the seventh response message indicating that the first device is allowed to connect to the router.

[0278] In one possible implementation, the communication unit 1902 is further configured to: receive an eighth request from the router, the eighth request being for requesting a network rate corresponding to a second device, the second device being a device for limiting the network rate of the terminal device; the processing unit 1901 is further configured to: display a selection box based on the eighth request, the selection box including multiple network rate options; and the communication unit 1902 is further configured to: in response to a triggering operation of the first network rate option, send an eighth response message to the router corresponding to the eighth request, the eighth response message including the first network rate, the first network rate being one of multiple network rates.

[0279] In one possible implementation, the QR code corresponding to the router corresponds to the first parameter value.

[0280] Reuse Figure 19 , Figure 19 The network connection device shown can be the first server, a device within the first server, or a device that can be used in conjunction with the first server. Figure 19 The network connection device shown may include a processing unit 1901 and a communication unit 1902. Wherein:

[0281] The communication unit 1902 is configured to receive a first request from a terminal device, the first request being used to request the WiFi name and WiFi password corresponding to the router, the first request including a first parameter value corresponding to the router;

[0282] Processing unit 1901 is used to find the WiFi name and WiFi password corresponding to the router based on the first parameter value;

[0283] The communication unit 1902 is used to send a first response message to the terminal device in response to the first request. The first response message includes the WiFi name and WiFi password corresponding to the router.

[0284] In one possible implementation, the communication unit 1902 is further configured to: receive a second request from a terminal device, the second request being for requesting the establishment of a binding relationship between a user account corresponding to the terminal device and a router, the second request including the router's identifier and the user account; the processing unit 1901 is further configured to: establish a binding relationship between the user account and the router based on the router's identifier and the user account; the communication unit 1902 is further configured to: send a second response message to the terminal device in response to the second request, the second response message being for indicating that the binding relationship has been successfully established.

[0285] In one possible implementation, the communication unit 1902 is further configured to: receive a third request from a terminal device forwarded by a second server, the third request being for requesting the WiFi password corresponding to the router, the third request including a first keyword and a user account; the processing unit 1901 is further configured to: search for the WiFi password corresponding to the router based on the first keyword and the user account; the communication unit 1902 is further configured to: send a third response message to the second server in response to the third request, the third response message including the WiFi password corresponding to the router.

[0286] In one possible implementation, the communication unit 1902 is further configured to: receive a fourth request forwarded by the second server from the terminal device, the fourth request being for requesting an image of the QR code corresponding to the router, the fourth request including a second keyword and a user account; the processing unit 1901 is further configured to: search for a first parameter value corresponding to the router based on the second keyword and the user account; the communication unit 1902 is further configured to: send a sixth request to the second server, the sixth request being for requesting an image of the QR code corresponding to the router, the sixth request including the first parameter value; receive a sixth response message from the second server in response to the sixth request, the sixth response message including an image of the QR code corresponding to the router; and send a fourth response message to the second server in response to the fourth request, the fourth response message including an image of the QR code corresponding to the router.

[0287] In one possible implementation, the image of the QR code corresponding to the router included in the fourth response message is either the original image of the QR code corresponding to the router, or an updated image of the QR code corresponding to the router.

[0288] In one possible implementation, the QR code corresponding to the router corresponds to the first parameter value.

[0289] In one possible implementation, the communication unit 1902 is further configured to: receive first information from the router when the router is powered on and connected to the network successfully, or when the user modifies the WiFi name and / or WiFi password corresponding to the router, the first information including the router's identifier, the router's first parameter value, and the router's WiFi name and / or WiFi password; the processing unit 1901 is further configured to: store the first information.

[0290] Reuse Figure 19 , Figure 19 The network connection device shown can be a router, a device within a router, or a device compatible with a router. Figure 19 The network connection device shown may include a processing unit 1901 and a communication unit 1902. Wherein:

[0291] The communication unit 1902 is used to receive the user account corresponding to the terminal device sent from the terminal device;

[0292] The processing unit 1901 is used to record the binding relationship between the user account and the router, so that the terminal device has the management authority of the router. This management authority includes obtaining the WiFi password corresponding to the router and obtaining the image of the QR code corresponding to the router.

[0293] In one possible implementation, the communication unit 1902 is further configured to: receive a fifth request from a terminal device, the fifth request being for requesting the identifier of a router; and send a fifth response message to the terminal device in response to the fifth request, the fifth response message including the identifier of the router.

[0294] In one possible implementation, the communication unit 1902 is further configured to: send first information to the first server when the router is powered on and connected to the network successfully, or when the user modifies the WiFi name and / or WiFi password corresponding to the router. The first information includes the router's identifier, the router's first parameter value, and the router's WiFi name and / or WiFi password.

[0295] In one possible implementation, the communication unit 1902 is further configured to: send a seventh request to the terminal device when the first device connects to the router by scanning the QR code corresponding to the router, the seventh request being used to request whether the first device is allowed to connect to the router, the first device being a device that restricts devices from connecting to the router for the terminal device; and receive a seventh response message from the terminal device corresponding to the seventh request, the seventh response message indicating that the first device is allowed to connect to the router, thereby enabling the first device to establish a connection with the router.

[0296] In one possible implementation, the communication unit 1902 is further configured to: send an eighth request to the terminal device when the second device connects to the router by scanning the QR code corresponding to the router, the eighth request being used to request the network rate corresponding to the second device, the second device being a device for limiting the network rate of the terminal device; receive an eighth response message from the terminal device corresponding to the eighth request, the eighth response message including the first network rate; the processing unit 1901 is further configured to: determine the first network rate as the network rate corresponding to the second device.

[0297] In one possible implementation, in the above embodiments, the network connection device may further include a storage unit, which can be used to store instructions and / or data. The processing unit 1901 can read the instructions and / or data from the storage unit to enable the device to implement the aforementioned method embodiments. For example, the storage unit may also store the WiFi name, WiFi password, first parameter value, router identifier, user account, etc., corresponding to the router shown above.

[0298] For detailed descriptions of terms or steps related to routers, servers, barcodes, QR codes, and mini-programs in the various embodiments described above, please refer to the descriptions in the method embodiments above; they will not be detailed here. In the embodiments of this application, a unit may also be referred to as a "module".

[0299] The specific descriptions of the units shown in the above embodiments are merely examples. For the specific functions or execution steps of each unit, please refer to the above method embodiments, which will not be described in detail here.

[0300] The apparatus of the embodiments of this application has been described above. The possible product forms of the described apparatus are described below. Any device possessing the above-described features... Figures 10 to 12 Any form of product that incorporates the functionality of the described device falls within the protection scope of the embodiments of this application. The following description is merely illustrative and does not limit the product form of the device in the embodiments of this application to this specific example.

[0301] For cases where the network connectivity device can be a chip or a chip system, please refer to [link / reference]. Figure 20 The diagram shows the structure of the chip. Figure 20 The chip 2000 shown includes a processor 2001 and an interface 2002. Optionally, it may also include a memory 2003. The number of processors 2001 can be one or more, and the number of interfaces 2002 can be multiple.

[0302] For cases where the chip is used to implement the terminal device, the first server, or the router in the embodiments of this application:

[0303] The interface 2002 is used to receive or output signals;

[0304] The processor 2001 is used to perform data processing operations on the terminal device, the first server, or the router.

[0305] In this embodiment, the processor and the interface can also be coupled to each other. The specific connection method between the processor and the interface is not limited in this embodiment. Furthermore, the network connection device can also be a logic circuit, processing circuit, integrated circuit, or system-on-chip (SoC) chip, etc., and the interface can be a communication interface, input / output interface, pins, etc.

[0306] It is understood that some optional features in the embodiments of this application can be implemented independently in certain scenarios without relying on other features, such as the current solution on which they are based, to solve the corresponding technical problems and achieve the corresponding effects. Alternatively, they can be combined with other features as needed in certain scenarios. Accordingly, the network connection device given in the embodiments of this application can also implement these features or functions, which will not be elaborated here.

[0307] It should be understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0308] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0309] The apparatus shown in the embodiments of this application can be implemented in hardware or software, and the embodiments of this application do not limit this.

[0310] This application also provides a network connection system, which includes a terminal device, a first server, and a router; wherein the terminal device is used to execute the method executed by the terminal device in any of the above method embodiments, the first server is used to execute the method executed by the first server in any of the above method embodiments, and the router is used to execute the method executed by the router in any of the above method embodiments. Optionally, the network connection system further includes a second server, which is used to execute the method executed by the second server in any of the above method embodiments.

[0311] This application also provides a computer storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the methods and steps as described in any of the above method embodiments.

[0312] This application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the methods and steps as described in any of the above method embodiments.

[0313] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.

[0314] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the technical effects of the solutions provided in the embodiments of this application.

[0315] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0316] As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the listed items. As used in the above embodiments, depending on the context, the term “when” can be interpreted as meaning “if…” or “after…” or “in response to determining…” or “in response to detecting…”. Similarly, depending on the context, the phrase “when…” or “if (the stated condition or event) is interpreted as meaning “if…” or “in response to determining…” or “when (the stated condition or event) is detected” or “in response to detecting (the stated condition or event)”.

[0317] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. 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. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., high-density digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)). Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be accomplished by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0318] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A network connection method, characterized in that, Applied to a terminal device, the method includes: Scan the QR code corresponding to the router through the first interface of the first application, launch the target program under the first application, and obtain the first parameter value corresponding to the router; The target program sends a first request to the first server. The first request is used to request the Wi-Fi name and Wi-Fi password corresponding to the router. The first request includes the first parameter value. The target program receives a first response message from the first server in response to the first request. The first response message includes the WiFi name and WiFi password corresponding to the router. The target program calls the first interface provided by the first application to establish a connection with the router based on the WiFi name and WiFi password corresponding to the router.

2. The method according to claim 1, characterized in that, After establishing a connection with the router via the first interface based on the router's corresponding WiFi name and WiFi password, the method further includes: Obtain the identifier of the router; The target program sends a second request to the first server. The second request is used to request the establishment of a binding relationship between the user account corresponding to the terminal device and the router. The second request includes the router's identifier and the user account. The terminal device receives a second response message from the first server in response to the second request. The second response message indicates that the binding relationship has been successfully established, thereby granting the terminal device management privileges over the router.

3. The method according to claim 2, characterized in that, The management permissions include obtaining the WiFi password corresponding to the router, and the method further includes: Enter the first keyword in the second interface of the first application; The first application sends a third request to the second server. The third request is used to request the WiFi password corresponding to the router. The third request includes the first keyword and the user account. The first application receives a third response message from the second server in response to the third request, which is forwarded by the second server. The third response message includes the WiFi password corresponding to the router. The WiFi password corresponding to the router is displayed on the second interface.

4. The method according to claim 2, characterized in that, The management permissions include obtaining the image of the QR code corresponding to the router, and the method further includes: Enter the second keyword on the second interface of the first application; The first application sends a fourth request to the second server. The fourth request is used to request an image of the QR code corresponding to the router. The fourth request includes the second keyword and the user account. The first application receives a fourth response message from the second server in response to the fourth request, which is forwarded by the second server. The fourth response message includes an image of the QR code corresponding to the router. The second interface displays an image of the QR code corresponding to the router and the router's logo.

5. The method according to claim 4, characterized in that, The QR code image included in the fourth response message is either the original image of the QR code corresponding to the router, or an updated image of the QR code corresponding to the router.

6. The method according to any one of claims 2-5, characterized in that, The method further includes: The target program sends the user account to the router so that the router records the binding relationship between the user account and the router.

7. The method according to any one of claims 2-6, characterized in that, Obtaining the router's identifier includes: The second interface of the first application is displayed, and the second interface includes a router management button; In response to the triggering operation of the management router button, the target program sends a fifth request to the router, the fifth request being used to request the router's identifier; Receive a fifth response message from the router in response to the fifth request, the fifth response message including the identifier of the router.

8. The method according to any one of claims 2-7, characterized in that, The method further includes: A seventh request is received from the router, the seventh request being used to request whether a first device is allowed to connect to the router, the first device being a device that the terminal device is restricting from connecting to the router; A prompt box is displayed based on the seventh request, and the prompt box is used to ask whether the first device is allowed to connect to the router; In response to a triggering operation that allows the first device to connect to the router, a seventh response message corresponding to the seventh request is sent to the router, the seventh response message indicating that the first device is allowed to connect to the router.

9. The method according to any one of claims 2-8, characterized in that, The method further includes: The system receives an eighth request from the router, the eighth request being used to request the network speed corresponding to the second device, the second device being the device that limits the network speed of the terminal device; The selection box is displayed based on the eighth request, and the selection box includes multiple network speed options; In response to a triggering operation for an option of a first network rate, an eighth response message corresponding to the eighth request is sent to the router, the eighth response message including the first network rate, which is one of the plurality of network rates.

10. The method according to any one of claims 1-9, characterized in that, The QR code corresponding to the router corresponds to the first parameter value.

11. A network connection method, characterized in that, Applied to a first server, the method includes: Receive a first request from a terminal device, the first request being used to request the Wi-Fi name and Wi-Fi password corresponding to the router, the first request including a first parameter value corresponding to the router; Based on the first parameter value, find the WiFi name and WiFi password corresponding to the router; Send a first response message to the terminal device in response to the first request. The first response message includes the WiFi name and WiFi password corresponding to the router.

12. The method according to claim 11, characterized in that, The method further includes: A second request is received from the terminal device, the second request being used to request the establishment of a binding relationship between the user account corresponding to the terminal device and the router, the second request including the router's identifier and the user account; Based on the router's identifier and the user account, establish a binding relationship between the user account and the router; A second response message is sent to the terminal device in response to the second request, the second response message indicating that the binding relationship has been successfully established.

13. The method according to claim 12, characterized in that, The method further includes: The system receives a third request forwarded by a second server from the terminal device. The third request is used to request the WiFi password corresponding to the router. The third request includes a first keyword and the user account. Based on the first keyword and the user account, find the WiFi password corresponding to the router; A third response message is sent to the second server in response to the third request, the third response message including the WiFi password corresponding to the router.

14. The method according to claim 12, characterized in that, The method further includes: The system receives a fourth request forwarded by the second server from the terminal device. The fourth request is used to request an image of the QR code corresponding to the router. The fourth request includes the second keyword and the user account. Based on the second keyword and the user account, find the first parameter value corresponding to the router; A sixth request is sent to the second server, the sixth request being used to request an image of the QR code corresponding to the router, the sixth request including the first parameter value; Receive a sixth response message from the second server in response to the sixth request, the sixth response message including an image of the QR code corresponding to the router; A fourth response message in response to the fourth request is sent to the second server, the fourth response message including an image of the QR code corresponding to the router.

15. The method according to claim 14, characterized in that, The QR code image included in the fourth response message is either the original image of the QR code corresponding to the router, or an updated image of the QR code corresponding to the router.

16. The method according to any one of claims 11-15, characterized in that, The QR code corresponding to the router corresponds to the first parameter value.

17. The method according to any one of claims 11-16, characterized in that, The method further includes: When the router is powered on and connected to the network successfully, or when the user changes the WiFi name and / or WiFi password corresponding to the router, the system receives first information from the router. The first information includes the router's identifier, the first parameter value corresponding to the router, and the WiFi name and / or WiFi password corresponding to the router. Store the first information.

18. A network connection method, characterized in that, Applied to a router, the method includes: Receive the user account corresponding to the terminal device sent from the terminal device; The binding relationship between the user account and the router is recorded, enabling the terminal device to have management permissions for the router. These management permissions include obtaining the WiFi password and the QR code image corresponding to the router.

19. The method according to claim 18, characterized in that, The method further includes: Receive a fifth request from the terminal device, the fifth request being used to request the identifier of the router; A fifth response message in response to the fifth request is sent to the terminal device, the fifth response message including the identifier of the router.

20. The method according to claim 18 or 19, characterized in that, The method further includes: When the router is powered on and connected to the network successfully, or when the user changes the WiFi name and / or WiFi password corresponding to the router, the first information is sent to the first server. The first information includes the router's identifier, the first parameter value corresponding to the router, and the WiFi name and / or WiFi password corresponding to the router.

21. The method according to any one of claims 18-20, characterized in that, The method further includes: When the first device connects to the router by scanning the QR code corresponding to the router, a seventh request is sent to the terminal device. The seventh request is used to request whether the first device is allowed to connect to the router. The first device restricts the devices that can connect to the router for the terminal device. The terminal device receives a seventh response message corresponding to the seventh request, the seventh response message indicating that the first device is allowed to connect to the router, thereby enabling the first device to establish a connection with the router.

22. The method according to any one of claims 18-21, characterized in that, The method further includes: When the second device connects to the router by scanning the QR code corresponding to the router, it sends an eighth request to the terminal device. The eighth request is used to request the network speed corresponding to the second device, and the second device is the device that limits the network speed of the terminal device. Receive an eighth response message from the terminal device corresponding to the eighth request, the eighth response message including a first network rate; The first network rate is determined as the network rate corresponding to the second device.

23. A network connection device, characterized in that, It includes a module for performing the method as described in any one of claims 1-10, or a module for performing the method as described in any one of claims 11-17, or a module for performing the method as described in any one of claims 18-22.

24. A network connection device, characterized in that, include: One or more processors, one or more memories; wherein the one or more memories are coupled to one or more processors, the one or more memories being used to store computer program code, the computer program code including computer instructions that, when the one or more processors execute the computer instructions, cause the apparatus to perform the method as claimed in any one of claims 1-10, or cause the apparatus to perform the method as claimed in any one of claims 11-17, or cause the apparatus to perform the method as claimed in any one of claims 18-22.

25. A network connection system, characterized in that, The system includes a terminal device, a first server, and a router; wherein the terminal device is used to perform the method as described in any one of claims 1-10, the first server is used to perform the method as described in any one of claims 11-17, and the router is used to perform the method as described in any one of claims 18-22.

26. A computer storage medium, characterized in that, The computer storage medium stores a computer program, the computer program including program instructions that, when executed on the network connection device, cause the network connection device to perform the method as described in any one of claims 1-10, or cause the network connection device to perform the method as described in any one of claims 11-17, or cause the network connection device to perform the method as described in any one of claims 18-22.

27. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-10, or causes the computer to perform the method as described in any one of claims 11-17, or causes the computer to perform the method as described in any one of claims 18-22.