Network connection method and device, terminal equipment and storage medium

By receiving connection instructions sent by the server, the smart terminal device automatically searches and connects to the matching wireless network, solving the problem of users needing to manually find and enter passwords, realizing automatic connection of wireless networks, and improving connection efficiency and user experience.

CN119629768APending Publication Date: 2025-03-14GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311172134.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

When connecting to wireless networks, smart terminal devices need to manually find and enter passwords, resulting in complex operations, especially inconvenient for elderly and children.

Method used

By receiving the connection instructions sent by the server, the first terminal device automatically searches and connects to the matching wireless network, simplifying the connection process. The method includes receiving connection instructions, searching for wireless networks, matching network information and establishing a connection, and supporting priority sorting and key usage of multiple target wireless networks.

Benefits of technology

It realizes automatic wireless network connection of smart terminal devices, reduces user manual operations, and improves connection efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629768A_ABST
    Figure CN119629768A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a network connection method and device, terminal equipment and a storage medium, the method is applied to first terminal equipment, and the method comprises the following steps: receiving a connection instruction sent by a server; the connection instruction is uploaded to the server by the second terminal device, and the connection instruction comprises network information of one or more target wireless networks; searching a wireless network in a connection range according to the connection instruction; and if the candidate wireless network matched with any network information is searched, establishing network connection with the candidate wireless network according to the matched network information. By adopting the embodiment of the invention, the first terminal equipment can automatically search the wireless network and establish the connection with the matched wireless network under the assistance of the second terminal equipment, so that the manual operation required in the wireless network connection process is simplified, the wireless network automatic connection of the first terminal equipment is realized, and the connection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intelligent terminals, and in particular to a network connection method, apparatus, terminal equipment and storage medium. Background Art

[0002] With the rapid development of smart terminal devices, smart terminal devices have played an important role in the lives of users such as the elderly and children. However, most of the functions of smart terminal devices require a connection to a wireless network to be realized. To establish a connection to a wireless network, it is necessary to manually search for the wireless network and manually enter the corresponding password to establish a connection, which is difficult for users such as the elderly and children. Summary of the invention

[0003] The embodiments of the present application disclose a network connection method, apparatus, terminal device and storage medium, which can realize automatic connection of a wireless network and simplify the operations required for establishing a connection between an intelligent terminal device and a wireless network.

[0004] A first aspect of an embodiment of the present application discloses a network connection method, which is applied to a first terminal device, and the method includes:

[0005] Receiving a connection instruction sent by a server; the connection instruction is uploaded to the server by the second terminal device, and the connection instruction includes network information of one or more target wireless networks;

[0006] Searching for wireless networks within a connection range according to the connection instruction;

[0007] If a candidate wireless network matching any of the network information is found, a network connection is established with the candidate wireless network according to the matching network information.

[0008] As an optional implementation manner, in the first aspect of the embodiment of the present application, the connection instruction carries network information of multiple target wireless networks, and the network information includes a network identifier, a key, and a priority;

[0009] If a candidate wireless network matching any of the network information is found, establishing a network connection with the candidate wireless network according to the matching network information includes:

[0010] If at least two candidate wireless networks matching the target wireless network are searched for based on the network identifiers of the multiple target wireless networks, connections are established with the candidate wireless networks in sequence according to the priorities corresponding to the target wireless networks matching the candidate wireless networks from high to low and according to the keys corresponding to the target wireless networks matching the candidate wireless networks.

[0011] As an optional implementation, in the first aspect of the embodiment of the present application, the establishing connections with the candidate wireless networks in sequence according to the priorities corresponding to the target wireless networks matched by the candidate wireless networks from high to low, according to the keys corresponding to the target wireless networks matched by the candidate wireless networks, includes:

[0012] Determine the ranking of each of the candidate wireless networks according to the order of priorities corresponding to the target wireless networks matched by each of the candidate wireless networks from high to low;

[0013] Establishing a connection with the current candidate wireless network according to a key corresponding to a target wireless network that matches the current candidate wireless network;

[0014] If a connection is not successfully established with the current candidate wireless network within the first time period, the next candidate wireless network is used as the new current candidate wireless network, and the step of establishing a connection with the current candidate wireless network by matching the key corresponding to the target wireless network with the current candidate wireless network is re-executed until the first terminal device successfully establishes a connection with the current candidate wireless network, or the first terminal device fails to successfully establish a connection with each of the candidate wireless networks.

[0015] As an optional implementation manner, in the first aspect of the embodiment of the present application, searching for a wireless network within a connection range according to the connection instruction includes:

[0016] If it is detected that the network connection function of the first terminal device is in a closed state, the network connection function is turned on according to the connection instruction, and a search is performed for wireless networks within a connection range.

[0017] As an optional implementation manner, in the first aspect of the embodiment of the present application, after the search for a candidate wireless network matching any of the network information is found, a network connection is established with the candidate wireless network according to the matching network information, the method further includes:

[0018] If the first terminal device successfully establishes a connection with the candidate wireless network, the connection settings of the candidate wireless network are saved, and connection success information is generated, and the successful connection information is uploaded to the server, so that the server forwards the successful connection information to the second terminal device.

[0019] As an optional implementation manner, in the first aspect of the embodiment of the present application, the method further includes:

[0020] If no candidate wireless network matching any of the network information is found, or the first terminal device fails to successfully establish a connection with the candidate wireless network, a connection failure message is generated, wherein the connection failure message carries failure reason information;

[0021] The connection failure information is uploaded to the server, so that the server forwards the connection failure information to the second terminal device.

[0022] A second aspect of an embodiment of the present application discloses a network connection method, which is applied to a second terminal device. The method includes:

[0023] Obtaining network information of one or more target wireless networks;

[0024] generating a connection instruction according to network information of the one or more target wireless networks;

[0025] The connection instruction is uploaded to a server so that the server forwards the connection instruction to the first terminal device, so that the first terminal device searches for wireless networks within a connection range according to the connection instruction, and upon searching for a candidate wireless network that matches any of the network information, establishes a network connection with the candidate wireless network according to the matching network information.

[0026] As an optional implementation, in the second aspect of the embodiment of the present application, the obtaining of network information of one or more target wireless networks includes:

[0027] Obtaining network identifiers, keys, and network parameters of the one or more target wireless networks;

[0028] Determining the priority corresponding to each of the target wireless networks according to the network identifier and / or network parameter of each of the target wireless networks;

[0029] The generating a connection instruction according to the network information of the one or more target wireless networks includes:

[0030] A connection instruction is generated according to the network identification, key and corresponding priority of each of the target wireless networks.

[0031] A connection instruction is generated according to the network identification, key and corresponding priority of each of the target wireless networks.

[0032] As an optional implementation manner, in the first aspect of the embodiment of the present application, before uploading the connection instruction to the server, the method further includes:

[0033] Obtaining a device identification code corresponding to the first terminal device;

[0034] Binding with the first terminal device according to the device identification code;

[0035] The step of uploading the connection instruction to the server includes:

[0036] The connection instruction and the device identification code are uploaded to the server, so that the server forwards the connection instruction to the first terminal device according to the device identification code.

[0037] A third aspect of the embodiments of the present application discloses a network connection device, which is applied to a first terminal device, and the device includes:

[0038] An instruction receiving module, used to receive a connection instruction sent by a server; the connection instruction is uploaded to the server by a second terminal device, and the connection instruction includes network information of one or more target wireless networks;

[0039] A network search module, used to search for wireless networks within a connection range according to the connection instruction;

[0040] The network connection module is used to establish a network connection with the candidate wireless network according to the matching network information if a candidate wireless network matching any of the network information is searched.

[0041] The fourth aspect of an embodiment of the present application discloses a terminal device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor implements a network connection method disclosed in the first aspect or the second aspect of the embodiment of the present application.

[0042] A fifth aspect of an embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, a network connection method disclosed in the first aspect or the second aspect of the embodiment of the present application is implemented.

[0043] Compared with the related art, the embodiments of the present application have the following beneficial effects:

[0044] The first terminal device receives a connection instruction uploaded by the second terminal to the server and sent by the server, wherein the connection instruction includes network information of one or more target wireless networks; the first terminal device searches for wireless networks within a connection range according to the connection instruction, and when any candidate wireless network whose network information matches is found, a network connection is established with the candidate wireless network according to the matched network information, so that the first terminal device can automatically search for wireless networks and establish connections with matched wireless networks with the assistance of the second terminal device, thereby simplifying the manual operations required in the wireless network connection process, realizing automatic connection of the wireless network of the first terminal device, and improving connection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 It is an application scenario diagram of the network connection method disclosed in the embodiment of the present application;

[0047] Figure 2 It is a flowchart of a network connection method disclosed in an embodiment of the present application;

[0048] Figure 3 It is a method flow diagram of a network connection method disclosed in an embodiment of the present application;

[0049] Figure 4 It is a method flow diagram of another network connection method disclosed in an embodiment of the present application;

[0050] Figure 5 It is a method flow diagram of another network connection method disclosed in an embodiment of the present application;

[0051] Figure 6 It is a method flow diagram of a network connection method applied to a second terminal device disclosed in an embodiment of the present application;

[0052] Figure 7 is a method flow diagram of another network connection method applied to a second terminal device disclosed in an embodiment of the present application;

[0053] Figure 8 It is a structural schematic diagram of a network connection device disclosed in an embodiment of the present application;

[0054] Fig. 9 It is a structural schematic diagram of another network connection device disclosed in an embodiment of the present application;

[0055] Fig.10 is a schematic diagram of the structure of a network connection device applied to a second terminal device disclosed in an embodiment of the present application;

[0056] Fig.11 It is a structural diagram of a terminal device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0059] The embodiment of the present application discloses a network connection method, apparatus, terminal device and storage medium, which simplifies the manual operation required in the wireless network connection process, realizes the automatic connection of the wireless network of the first terminal device, and improves the user experience. Detailed description is given below in conjunction with the accompanying drawings.

[0060] See also Figure 1 , Figure 1 : is an application scenario diagram of the network connection method disclosed in the embodiment of the present application. Figure 1 As shown, it may include a first terminal device 10, a second terminal device 20 and a server 30. The first terminal device 10 may include but is not limited to a desktop computer, a tablet computer, a laptop computer, a mobile phone, a wearable device, etc.; the second terminal device 20 may include but is not limited to a desktop computer, a tablet computer, a laptop computer, a mobile phone, a wearable device, etc.; the server 30 may be a computer or a computer cluster. The first terminal device 10, the second terminal device 20 and the server 30 may include at least a central processing unit. The computer system in the first terminal device 10, the second terminal device 20 and the server 30 may include but is not limited to Windows, Linux, IOS or Unix, which is not specifically limited here.

[0061] The first terminal device 10 can be connected to the server 30 for communication, and the second terminal device 20 can be connected to the server 30 for communication. The second terminal device 20 uploads the connection instruction to the server 30, and the server 30 sends the connection instruction to the first terminal device 10, wherein the connection instruction includes the network information of one or more target wireless networks. The first terminal device 10 searches for wireless networks within the connection range according to the received connection instruction; if the first terminal device 10 searches for a candidate wireless network that matches any network information, it establishes a network connection with the candidate wireless network according to the matching network information, so that the first terminal device 10 automatically connects to the wireless network. Please refer to Figure 2 , Figure 2 It is a timing diagram of the network connection method disclosed in the embodiment of the present application.

[0062] See also Figure 3 , Figure 3 This is a flow chart of a network connection method disclosed in an embodiment of the present application. The network connection method can be applied to Figure 1 The first terminal device 10 shown. Figure 3 As shown, the method may include the following steps:

[0063] 310. Receive a connection instruction sent by a server; the connection instruction is uploaded to the server by the second terminal device, and the connection instruction includes network information of one or more target wireless networks.

[0064] In the embodiment of the present application, the second terminal device uploads the connection instruction to the server, and the server receives the connection instruction and then sends it to the first terminal device, so that the first terminal device receives the connection instruction sent by the server. Among them, the first terminal device is a terminal device that needs to connect to the network; the second terminal device is a terminal device that assists the first terminal device in connecting to the network; the server is a terminal device or a terminal device cluster that assists the first terminal device and the second terminal device in forwarding information.

[0065] In specific implementation, the second terminal device first obtains the device identification code uniquely corresponding to the first terminal device, such as the serial number of a mobile phone, and the second terminal device is bound to the first terminal device according to the device identification code of the first terminal device. Then the second terminal device obtains the network information of one or more target wireless networks through automatic query or user input, and the second terminal device generates a connection instruction based on the obtained network information and uploads the connection instruction to the server. The server forwards the received connection instruction to the first terminal device bound to the second terminal device, and the first terminal device receives the connection instruction sent by the server.

[0066] The connection instruction received by the first terminal device includes network information of one or more target wireless networks; wherein the connection instruction is an instruction instructing the first terminal device to establish a network connection with a specific wireless network; the target wireless network is a network to which the first terminal device is to connect that can interconnect various communication devices without wiring, such as a WiFi network; the network information is information that can assist the first terminal device in determining the target wireless network and establishing a network connection with the target wireless network, and the network information may include but is not limited to network signal strength, network name, network key, network connected devices, and network operator.

[0067] In some embodiments, the connection instruction also includes a device identification code corresponding to the first terminal device.

[0068] In an embodiment of the present application, the second terminal device obtains the device identification code corresponding to the first terminal device, generates a connection instruction based on the device identification code and network information of one or more target wireless networks, and sends the connection instruction to the server. The server determines the sending object of the connection instruction, that is, the first terminal device, based on the device identification code in the connection instruction, and then sends the connection instruction to the first terminal device. Among them, the device identification code is information used to uniquely identify the first terminal device.

[0069] By adopting the above embodiment, the server can send the connection instruction to the first terminal device more accurately, thereby avoiding the network connection failure of the first terminal device caused by the sending error of the connection instruction.

[0070] 320. Search for wireless networks within a connection range according to the connection instruction.

[0071] In an embodiment of the present application, the first terminal device searches for each wireless network within the connection range according to the network information of one or more target wireless networks in the connection instruction. In specific implementation, the first terminal device matches the network information of each target wireless network in the connection instruction with the network information of each wireless network within the connection range; if the network information of the wireless network matches the network information of any target wireless network, the wireless network is confirmed as a candidate wireless network. Among them, the candidate wireless network is the wireless network that the first terminal device searches for to establish a network connection with.

[0072] 330. If a candidate wireless network matching any network information is found, a network connection is established with the candidate wireless network according to the matching network information.

[0073] In the embodiment of the present application, if the first terminal device does not search for a candidate wireless network that matches the network information of any target wireless network, it is confirmed that the connection has failed, and the reason for the connection failure is that the target wireless network has not been searched. If the first terminal device searches for a candidate wireless network that matches the network information of any target wireless network, a network connection is established with the candidate wireless network according to the network information of the matching target wireless network.

[0074] If the first terminal device searches for multiple candidate wireless networks, that is, searches for multiple wireless networks, and each wireless network matches the network information of any target wireless network, then the first terminal device can establish a network connection with any candidate wireless network. If the connection is successful, there is no need to establish a network connection with other candidate wireless networks; if the connection fails, a network connection is established with another candidate wireless network.

[0075] By adopting the above embodiment, the first terminal device can automatically search for wireless networks and establish connections with matching wireless networks with the assistance of the second terminal device, thereby simplifying the manual operations required during the wireless network connection process, realizing automatic wireless network connection of the first terminal device, and improving connection efficiency.

[0076] In one embodiment, see Figure 4 , Figure 4 is a method flow diagram of another network connection method disclosed in an embodiment of the present application, which can be applied to Figure 1 The first terminal device 10 shown. Figure 4 As shown, the method may include the following steps:

[0077] 410. Receive a connection instruction sent by the server; the connection instruction is uploaded to the server by the second terminal device, and the connection instruction carries network information of multiple target wireless networks; the network information includes a network identifier, a key, and a priority.

[0078] 420. Search for wireless networks within a connection range according to the connection instruction.

[0079] 430. If at least two candidate wireless networks matching the target wireless network are searched for based on the network identifiers of the multiple target wireless networks, connections are established with the candidate wireless networks in order from high to low priority corresponding to the target wireless networks matching the candidate wireless networks and based on the keys corresponding to the target wireless networks matching the candidate wireless networks.

[0080] In the embodiment of the present application, the connection instruction received by the first terminal device carries network information of multiple target wireless networks, and the network information includes the network identification, key and priority of the corresponding target wireless network. Among them, the network identification is information used to determine the target wireless network; the key is a parameter used to verify the target wireless network during the process of establishing a network connection with the target wireless network; the priority is the priority level or order of establishing a network connection with the target wireless network.

[0081] The first terminal device searches for each wireless network within the connection range according to the network identifiers of the multiple target wireless networks carried in the connection instruction. If no candidate wireless network matching the target wireless network is found, it is confirmed that the network connection has failed, and the reason for the failure is that the target wireless network cannot be found. If only one candidate wireless network matching the target wireless network is found, a network connection is established with the candidate wireless network according to the key corresponding to the target wireless network matching the candidate wireless network.

[0082] If at least two candidate wireless networks matching the target wireless network are searched, the first terminal device establishes a connection with each candidate wireless network in sequence according to the key corresponding to the target wireless network matching each candidate wireless network in descending order of priority.

[0083] For example, the connection instruction carries the network information of three target wireless networks, namely, target wireless network 1, target wireless network 2 and target wireless network 3. The network identifier of target wireless network 1 is WiFi-1, the key is 12345, and the priority is 1; the network identifier of target wireless network 2 is WiFi-2, the key is 1234, and the priority is 2; the network identifier of target wireless network 3 is WiFi-3, the key is 123, and the priority is 3; wherein, the larger the priority number, the higher the priority, that is, the priority of target wireless network 3 is greater than the priority of target wireless network 2, and the priority of target wireless network 2 is greater than the priority of target wireless network 1.

[0084] The first terminal device matches the network identifiers of the above three target wireless networks with the network identifiers of each wireless network within the connection range. If the network identifier of the target wireless network is the same as the network identifier of a wireless network within the connection range, it is confirmed that the wireless network matches the target wireless network; otherwise, it is considered that there is no match.

[0085] If the first terminal device cannot find a wireless network matching any of the three target wireless networks within the connection range, the connection is confirmed to have failed. If the first terminal device finds a candidate wireless network a within the connection range, and the candidate wireless network a matches the target wireless network 1, the first terminal device actively initiates a connection request with the candidate wireless network a according to the key 12345 of the target wireless network 1, so as to establish a network connection with the candidate wireless network a.

[0086] If the first terminal device searches for candidate wireless network a, candidate wireless network b, and candidate wireless network c within the connection range, wherein candidate wireless network a matches target wireless network 1, candidate wireless network b matches target wireless network 2, and candidate wireless network c matches target wireless network 3. Then the first terminal device establishes connections in order of priority of the three target wireless networks from high to low, that is, the order of target wireless network 3, target wireless network 2, and target wireless network 1. Specifically, the first terminal device first establishes a connection with candidate wireless network c according to key 123 corresponding to target wireless network 3, then establishes a connection with candidate wireless network b according to key 1234 corresponding to target wireless network 2, and finally establishes a connection with candidate wireless network a according to key 12345 corresponding to target wireless network 1.

[0087] In some embodiments, the first terminal device performs the process of establishing connections with the candidate wireless networks in sequence according to the priorities of the target wireless networks matched by the candidate wireless networks in descending order according to the keys corresponding to the target wireless networks matched by the candidate wireless networks in step 330, which may specifically include the following steps:

[0088] Determine the ranking of each candidate wireless network according to the order of priorities corresponding to the target wireless networks matched by each candidate wireless network from high to low;

[0089] Establishing a connection with the current candidate wireless network according to the key corresponding to the target wireless network that matches the current candidate wireless network;

[0090] If a connection is not successfully established with the current candidate wireless network within the first time period, the next candidate wireless network is used as the new current candidate wireless network, and the step of establishing a connection with the current candidate wireless network is re-executed according to the key corresponding to the target wireless network matched with the current candidate wireless network, until the first terminal device successfully establishes a connection with the current candidate wireless network, or the first terminal device fails to successfully establish a connection with each candidate wireless network.

[0091] In an embodiment of the present application, if the first terminal device searches for at least two candidate wireless networks that match the target wireless network within the connection range, the first terminal device sorts the candidate wireless networks in descending order according to the priority corresponding to the target wireless network that matches each candidate wireless network, so as to determine the order in which the first terminal device establishes network connections with each candidate wireless network.

[0092] Then the first terminal device establishes a network connection with each candidate wireless network in sequence. That is to say, the first terminal device first establishes a network connection with the first candidate wireless network according to the key corresponding to the target wireless network matched by the first candidate wireless network. At this time, the first candidate wireless network is the current candidate wireless network.

[0093] If the connection with the current candidate wireless network, that is, the first candidate wireless network, is not successfully established within the first time period, the first terminal device determines the next candidate wireless network as the new current candidate wireless network, that is, determines the second candidate wireless network as the new current candidate wireless network. Then, the first terminal device establishes a network connection with the second candidate wireless network according to the key corresponding to the target wireless network matched by the second candidate wireless network.

[0094] If the connection with the current candidate wireless network, that is, the second candidate wireless network, is not successfully established within the first time period, the first terminal device determines the next candidate wireless network as the new current candidate wireless network, that is, determines the third candidate wireless network as the new current candidate wireless network. According to the key corresponding to the target wireless network matched by the third candidate wireless network, a network connection is established with the third candidate wireless network.

[0095] The first terminal device continuously repeats the above process until the first terminal device successfully establishes a connection with the current candidate wireless network, or the first terminal device fails to successfully establish a connection with each candidate wireless network.

[0096] By adopting the above embodiment, when the connection instruction carries multiple target wireless networks, connections are established with each matching candidate wireless network in sequence according to the priority of each target wireless network, and when the connection with the previous candidate wireless network fails, a connection is established with the next candidate wireless network. This can ensure that the connected wireless network is a high-priority wireless network while assisting the first terminal device to automatically connect to the network as much as possible, thereby ensuring the effect of the network connection.

[0097] In one embodiment, see Figure 5 , Figure 5 is a method flow diagram of another network connection method disclosed in the embodiment of the present application, which can be applied to Figure 1 The first terminal device 10 shown. Figure 5 As shown, the method may include the following steps:

[0098] 510. Receive a connection instruction sent by a server; the connection instruction is uploaded to the server by the second terminal device, and the connection instruction includes network information of one or more target wireless networks.

[0099] 520. If it is detected that the network connection function of the first terminal device is in a closed state, the network connection function is turned on according to the connection instruction, and a wireless network within a connection range is searched.

[0100] In an embodiment of the present application, after receiving the connection instruction sent by the server, the first terminal device detects the state of the network connection function in the first terminal device, for example, detects whether the wireless local area network connection function in the first terminal device is turned on. If it is detected that the network connection function of the first terminal device is in the turned-on state, the wireless network within the connection range is searched directly according to the connection instruction. If it is detected that the network connection function of the first terminal device is in the turned-off state, the network connection function is turned on, that is, the network connection function is switched from the turned-off state to the turned-on state, and after the network connection function is in the turned-on state, the wireless network within the connection range is searched according to the connection instruction.

[0101] By adopting the above embodiment, the first terminal device can be assisted to start the network connection function through the connection instruction, and the first terminal device can be further assisted to automatically connect to the network, thereby improving the effect of assisting the first terminal device to connect to the network.

[0102] 530. If a candidate wireless network matching any network information is found, a network connection is established with the candidate wireless network according to the matching network information.

[0103] 540. If the first terminal device successfully establishes a connection with the candidate wireless network, the connection settings of the candidate wireless network are saved, and connection success information is generated, and the successful connection information is uploaded to the server, so that the server forwards the successful connection information to the second terminal device.

[0104] In an embodiment of the present application, if the first terminal device successfully establishes a connection with a candidate wireless network, the first terminal device automatically saves the connection settings of the candidate wireless network, such as the network identifier and key of the candidate wireless network, so that after the first terminal device actively or passively disconnects from the candidate wireless network, it can automatically and quickly re-establish a connection with the candidate wireless network based on the stored connection settings of the candidate wireless network.

[0105] After the first terminal device successfully establishes a connection with the candidate wireless network, it also generates a successful connection message and uploads the successful connection message to the server. The successful connection message may carry the device identification code of the first terminal device. After receiving the successful connection message, the server may query the second terminal device bound to the device identification code according to the device identification code in the successful connection message, and then forward the successful connection message to the second terminal device. The successful connection message is information used to feedback the successful connection status of the first terminal device to the second terminal device; in addition to carrying the device identification code of the first terminal device, the successful connection message may also include the network information of the successfully connected candidate wireless network.

[0106] By adopting the above embodiment, the first terminal device can provide real-time feedback of the successful connection to the second terminal device, so that the second terminal device that assists the first terminal device in connecting to the network can be informed of the successful connection of the first terminal device, thereby avoiding sending connection instructions multiple times to affect the connection status of the first terminal device, and ensuring the connection effect of the first terminal device.

[0107] 550. If no candidate wireless network matching any network information is found, or the first terminal device fails to successfully establish a connection with the candidate wireless network, a connection failure message is generated, and the connection failure message carries failure reason information.

[0108] 560. Upload the connection failure information to the server, so that the server forwards the connection failure information to the second terminal device.

[0109] In the embodiment of the present application, if the first terminal device fails to search for a wireless network that matches any network information in various wireless networks within the connection range, the first terminal device determines that the connection has failed and generates connection failure information, which may carry failure reason information. The connection failure information is information used to feedback the connection failure status of the first terminal device to the second terminal device; the failure reason information is information indicating the reason why the first terminal device failed to successfully connect to the network. The failure reason information here is information indicating that the first terminal device cannot search for a wireless network that matches the network information in the connection instruction, which can be specifically expressed as "the target wireless network was not searched for."

[0110] If the first terminal device searches for one or more candidate wireless networks and fails to successfully establish a connection with each candidate wireless network after actively sending a connection request to each candidate wireless network in turn to establish a network connection, the first terminal device determines that the connection has failed and generates a connection failure message. The failure reason information carried in the connection failure message is information indicating that the first terminal device has failed to connect to the searched wireless network, which can be specifically expressed as "key error" or "connection timeout" and the like.

[0111] After the first terminal device generates the connection failure information, it sends the connection failure information to the server. The connection failure information may also carry the device identification number corresponding to the first terminal device, so that the server determines the bound second terminal device according to the device identification number, and then forwards the connection failure information to the second terminal device to complete the feedback of the connection failure of the first terminal device.

[0112] By adopting the above embodiment, after the first terminal device fails to search for a candidate wireless network or fails to connect to each candidate wireless network, it generates connection failure information and carries failure cause information in the connection failure information to provide feedback on the connection failure status, so as to enable the second terminal device to know the status and cause of the connection failure of the first terminal device, thereby correcting the relevant errors and assisting the first terminal device to establish a network connection again, thereby avoiding repeated erroneous operations that may lead to network connection failure of the first terminal device, and improving the effect of assisting the first terminal device to establish a network connection.

[0113] In one embodiment, see Figure 6 , Figure 6 is a method flow chart of a network connection method applied to a second terminal device disclosed in an embodiment of the present application. The method can be applied to Figure 1 The second terminal device 20 shown. Figure 6 As shown, the method may include the following steps:

[0114] 610. Obtain network information of one or more target wireless networks.

[0115] In the embodiment of the present application, the second terminal device can obtain the network information of one or more target wireless networks by automatic search or user input. For example, the user manually inputs the network information of one or more target wireless networks to be connected to the first terminal device into the second terminal device; or, since the second terminal device assists the first terminal device in connecting to the network, such as the mobile phone of an adult child assisting the elderly parent's mobile phone in connecting to the network, the target wireless networks that the second terminal device assists the first terminal device in connecting to the network are mostly the target wireless networks that the second terminal device frequently connects to. Therefore, the second terminal device can obtain the network information of one or more target wireless networks from the storage space.

[0116] 620. Generate a connection instruction according to network information of one or more target wireless networks.

[0117] In an embodiment of the present application, the second terminal device generates a connection instruction including one or more target wireless network information based on the network information of the one or more target wireless networks.

[0118] 630. Upload the connection instruction to the server so that the server forwards the connection instruction to the first terminal device, so that the first terminal device searches for wireless networks within the connection range according to the connection instruction, and when a candidate wireless network matching any network information is found, establishes a network connection with the candidate wireless network according to the matching network information.

[0119] In the embodiment of the present application, the second terminal device uploads the connection instruction to the server, and the server forwards the connection instruction to the first terminal device. After receiving the connection instruction, the first terminal device searches for wireless networks within the connection range according to the connection instruction. When a candidate wireless network matching any network information is found, the first terminal device establishes a network connection with the candidate wireless network according to the matching network information.

[0120] By adopting the above embodiment, the second terminal device can assist the first terminal device in automatically connecting to the wireless network, simplifying the user operations required for the first terminal device to establish a connection with the wireless network, and improving the network connection experience of some users when using smart terminals.

[0121] In one embodiment, see Figure 7 , Figure 7 is a method flow diagram of another network connection method applied to a second terminal device disclosed in an embodiment of the present application. The method can be applied to Figure 1 The second terminal device 20 shown. Figure 7 As shown, the method may include the following steps:

[0122] 710. Obtain network identifiers, keys, and network parameters of one or more target wireless networks.

[0123] 720. Determine the priority corresponding to each target wireless network according to the network identifier and / or network parameter of each target wireless network.

[0124] 730. Generate a connection instruction according to the network identifier, key, and corresponding priority of each target wireless network.

[0125] In an embodiment of the present application, the second terminal device can obtain the network identification, key and network parameters of one or more target wireless networks through automatic search or user input.

[0126] Then, the second terminal device determines the priority corresponding to each target wireless network according to the network identification and / or network parameters of each target wireless network obtained. Among them, the network parameters are parameters that represent information such as the signal strength and network speed of the wireless network. For example, the second terminal device sorts each target wireless network according to the network name of each target wireless network, and in the order of Chinese first, numbers second, and English last, and determines the corresponding priority according to the order of each target wireless network; or, the second terminal device sorts each target wireless network according to the network parameter of the network speed, the faster the network speed, the higher the ranking, and then determines the corresponding priority according to the order of each target wireless network. No specific limitation is made here.

[0127] The second terminal device generates a connection instruction including at least the network identification, key and corresponding priority of each target wireless network according to the network identification, key and corresponding priority of each target wireless network.

[0128] By adopting the above embodiment, the second terminal device obtains information such as the network identification, key, and network parameters of the target wireless network, and generates a connection instruction based on the above information, so that the first terminal device can connect to the network according to the connection instruction, which can assist the first terminal device to efficiently connect to the specific wireless network. In addition, by sorting the target wireless networks so that the first terminal device can connect in sequence, the first terminal device can establish a connection with a target wireless network with a higher priority as much as possible, so as to ensure the networking effect after the network connection.

[0129] 740. Obtain a device identification code corresponding to the first terminal device.

[0130] 750. Bind with the first terminal device according to the device identification code.

[0131] 760. Upload the connection instruction and the device identification code to the server, so that the server forwards the connection instruction to the first terminal device according to the device identification code, so that the first terminal device searches for wireless networks within the connection range according to the connection instruction, and searches for at least two candidate wireless networks that match the target wireless network. Then, according to the order of priority corresponding to the target wireless networks that match the candidate wireless networks from high to low, and according to the keys corresponding to the target wireless networks that match the candidate wireless networks, establish connections with the candidate wireless networks in sequence.

[0132] In the embodiment of the present application, the second terminal device can obtain the device identification code corresponding to the first terminal device through user input or automatic search before generating a connection instruction or transmitting the connection instruction to the server, and bind the second terminal device to the first terminal device according to the device identification code. For example, the user can input the unique serial number of the first terminal device when it is shipped into the APP in the second terminal device to bind the APP in the second terminal device to the first terminal device; or bind the unique device serial number of the first terminal device to the mobile phone number of the second terminal device. No specific limitation is made here.

[0133] The second terminal device uploads the connection instruction and the device identification code to the server, and the server forwards the connection instruction to the corresponding first terminal device according to the device identification code, and the first terminal device searches for wireless networks within the connection range according to the network identification in the received connection instruction. When at least two candidate wireless networks matching the target wireless network are searched, the first terminal device establishes connections with the candidate wireless networks in sequence according to the priority corresponding to the target wireless networks matching the candidate wireless networks from high to low, and according to the keys corresponding to the target wireless networks matching the candidate wireless networks.

[0134] By adopting the above embodiment, by acquiring the device identification code and binding with the first terminal device, the connection instruction can be accurately sent to the first terminal device, so as to accurately assist the first terminal device that needs to connect to the network to connect to the network.

[0135] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a network connection device disclosed in an embodiment of the present application. The network connection device can be applied to Figure 1 The first terminal device 10 in the application scenario shown. Figure 8 As shown, the network connection device includes: an instruction receiving module 810, a network search module 820 and a network connection module 830.

[0136] The instruction receiving module 810 is used to receive a connection instruction sent by the server; the connection instruction is uploaded to the server by the second terminal device, and the connection instruction includes network information of one or more target wireless networks;

[0137] The network search module 820 is used to search for wireless networks within the connection range according to the connection instruction;

[0138] The network connection module 830 is configured to establish a network connection with the candidate wireless network according to the matching network information if a candidate wireless network matching any network information is found.

[0139] In some embodiments, the connection instruction carries network information of multiple target wireless networks, where the network information includes a network identifier, a key, and a priority.

[0140] The network connection module 830 is further used for:

[0141] If at least two candidate wireless networks matching the target wireless network are searched for based on the network identifiers of the multiple target wireless networks, connections are established with the candidate wireless networks in sequence according to the priorities of the target wireless networks matching the candidate wireless networks from high to low and according to the keys corresponding to the target wireless networks matching the candidate wireless networks.

[0142] In some embodiments, the network connection module 830 is further configured to:

[0143] Determine the ranking of each candidate wireless network according to the order of priorities corresponding to the target wireless networks matched by each candidate wireless network from high to low;

[0144] Establishing a connection with the current candidate wireless network according to the key corresponding to the target wireless network that matches the current candidate wireless network;

[0145] If a connection is not successfully established with the current candidate wireless network within the first time period, the next candidate wireless network is used as the new current candidate wireless network, and the step of establishing a connection with the current candidate wireless network is re-executed according to the key corresponding to the target wireless network matched with the current candidate wireless network, until the first terminal device successfully establishes a connection with the current candidate wireless network, or the first terminal device fails to successfully establish a connection with each candidate wireless network.

[0146] In some embodiments, the network search module 820 is further configured to:

[0147] If it is detected that the network connection function of the first terminal device is in a closed state, the network connection function is turned on according to the connection instruction, and a search is performed for wireless networks within the connection range.

[0148] In some embodiments, see Fig. 9 , Figure 8 is a schematic diagram of the structure of another network connection device disclosed in an embodiment of the present application, and the network connection device can be applied to Figure 1 The first terminal device 10 in the application scenario shown. Fig. 9 As shown, Fig. 9 The network connection device in Figure 8 Based on the network connection device shown, an information feedback module 840 is also included.

[0149] The information feedback module 840 is used to, if a candidate wireless network matching any network information is searched, establish a network connection with the candidate wireless network according to the matching network information, and if the first terminal device successfully establishes a connection with the candidate wireless network, save the connection settings of the candidate wireless network, generate connection success information, and upload the successful connection information to the server so that the server forwards the successful connection information to the second terminal device.

[0150] In some embodiments, the information feedback module 840 is further configured to:

[0151] If no candidate wireless network matching any network information is found, or the first terminal device fails to successfully establish a connection with the candidate wireless network, a connection failure message is generated, and the connection failure message carries failure reason information;

[0152] The connection failure information is uploaded to the server, so that the server forwards the connection failure information to the second terminal device.

[0153] See also Fig.10 , Fig.10 Schematic diagram of a network connection device for a second terminal device disclosed in an embodiment of the present application. The network connection device can be applied to Figure 1 The second terminal device 20 in the application scenario shown. Fig.10 As shown, the network connection device includes: an information acquisition module 1010, an instruction generation module 1020 and an instruction sending module 1030.

[0154] The information acquisition module 1010 is used to acquire network information of one or more target wireless networks;

[0155] An instruction generation module 1020, configured to generate a connection instruction according to network information of one or more target wireless networks;

[0156] The instruction sending module 1030 is used to upload the connection instruction to the server so that the server forwards the connection instruction to the first terminal device, so that the first terminal device searches for wireless networks within the connection range according to the connection instruction, and when a candidate wireless network matching any network information is found, establishes a network connection with the candidate wireless network according to the matching network information.

[0157] In some embodiments, the information acquisition module 1010 is further used to:

[0158] Obtaining network identifications, keys, and network parameters of one or more target wireless networks;

[0159] Determine the priority corresponding to each target wireless network according to the network identification and / or network parameter of each target wireless network;

[0160] The instruction generation module 1020 is further used for:

[0161] A connection instruction is generated according to the network identification, key and corresponding priority of each target wireless network.

[0162] In some embodiments, the information acquisition module 1010 is further used to:

[0163] Before uploading the connection instruction to the server, obtaining a device identification code corresponding to the first terminal device;

[0164] Binding with the first terminal device according to the device identification code;

[0165] The instruction sending module 1030 is further used for:

[0166] The connection instruction and the device identification code are uploaded to the server, so that the server forwards the connection instruction to the first terminal device according to the device identification code.

[0167] See also Fig.11 , Fig.11 Schematic diagram of the structure of a terminal device disclosed in the embodiment of the present application. Fig.11 As shown, the terminal device 1100 may include:

[0168] A memory 1110 storing executable program codes;

[0169] a processor 1120 coupled to the memory 1110;

[0170] The processor 1120 calls the executable program code stored in the memory 1110 to execute any one of the network connection methods disclosed in the embodiments of the present application.

[0171] It should be noted that Fig.11 The terminal device shown may also include components not shown, such as a power supply, input buttons, a camera, a speaker, a screen, an RF circuit, a Wi-Fi module, a Bluetooth module, and sensors, which are not described in detail in this embodiment.

[0172] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute any one of the network connection methods disclosed in the embodiment of the present application.

[0173] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute any one of the network connection methods disclosed in the embodiments of the present application.

[0174] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.

[0175] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0176] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0178] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present 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, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.

[0179] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0180] The above is a detailed introduction to a network connection method, device, wireless headset and storage medium disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. At the same time, for those of ordinary skill in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A network connection method, characterized in that: Applied to a first terminal device, the method includes: Receiving a connection instruction sent by a server; the connection instruction is uploaded to the server by the second terminal device, and the connection instruction includes network information of one or more target wireless networks; Searching for wireless networks within a connection range according to the connection instruction; If a candidate wireless network matching any of the network information is found, a network connection is established with the candidate wireless network according to the matching network information.

2. The method according to claim 1, characterized in that The connection instruction carries network information of multiple target wireless networks, wherein the network information includes a network identifier, a key, and a priority; If a candidate wireless network matching any of the network information is found, establishing a network connection with the candidate wireless network according to the matching network information includes: If at least two candidate wireless networks matching the target wireless network are searched for based on the network identifiers of the multiple target wireless networks, connections are established with the candidate wireless networks in sequence according to the priorities corresponding to the target wireless networks matching the candidate wireless networks from high to low and according to the keys corresponding to the target wireless networks matching the candidate wireless networks.

3. The method according to claim 2, characterized in that The establishing connections with the candidate wireless networks in sequence according to the priorities of the target wireless networks matched by the candidate wireless networks from high to low and according to the keys corresponding to the target wireless networks matched by the candidate wireless networks comprises: Determine the ranking of each of the candidate wireless networks according to the order of priorities corresponding to the target wireless networks matched by each of the candidate wireless networks from high to low; Establishing a connection with the current candidate wireless network according to a key corresponding to a target wireless network that matches the current candidate wireless network; If a connection is not successfully established with the current candidate wireless network within the first time period, the next candidate wireless network is used as the new current candidate wireless network, and the step of establishing a connection with the current candidate wireless network by matching the key corresponding to the target wireless network with the current candidate wireless network is re-executed until the first terminal device successfully establishes a connection with the current candidate wireless network, or the first terminal device fails to successfully establish a connection with each of the candidate wireless networks.

4. The method according to claim 1, characterized in that: The searching for a wireless network within a connection range according to the connection instruction includes: If it is detected that the network connection function of the first terminal device is in a closed state, the network connection function is turned on according to the connection instruction, and a search is performed for wireless networks within a connection range.

5. The method according to claim 1, characterized in that After the step of searching for a candidate wireless network that matches any of the network information and establishing a network connection with the candidate wireless network according to the matching network information, the method further includes: If the first terminal device successfully establishes a connection with the candidate wireless network, the connection settings of the candidate wireless network are saved, and connection success information is generated, and the successful connection information is uploaded to the server, so that the server forwards the successful connection information to the second terminal device.

6. The method according to claim 1, characterized in that The method further comprises: If no candidate wireless network matching any of the network information is found, or the first terminal device fails to successfully establish a connection with the candidate wireless network, a connection failure message is generated, wherein the connection failure message carries failure reason information; The connection failure information is uploaded to the server, so that the server forwards the connection failure information to the second terminal device.

7. A network connection method, characterized in that: Applied to a second terminal device, the method includes: Obtaining network information of one or more target wireless networks; generating a connection instruction according to network information of the one or more target wireless networks; The connection instruction is uploaded to a server so that the server forwards the connection instruction to the first terminal device, so that the first terminal device searches for wireless networks within a connection range according to the connection instruction, and upon searching for a candidate wireless network that matches any of the network information, establishes a network connection with the candidate wireless network according to the matching network information.

8. The method according to claim 7, characterized in that The obtaining of network information of one or more target wireless networks includes: Obtaining network identifiers, keys, and network parameters of the one or more target wireless networks; Determining the priority corresponding to each of the target wireless networks according to the network identifier and / or network parameter of each of the target wireless networks; The generating a connection instruction according to the network information of the one or more target wireless networks includes: A connection instruction is generated according to the network identification, key and corresponding priority of each of the target wireless networks.

9. The method according to claim 7, characterized in that: Before uploading the connection instruction to the server, the method further includes: Obtaining a device identification code corresponding to the first terminal device; Binding with the first terminal device according to the device identification code; The step of uploading the connection instruction to the server includes: The connection instruction and the device identification code are uploaded to the server, so that the server forwards the connection instruction to the first terminal device according to the device identification code.

10. A network connection device, characterized in that: Applied to a first terminal device, the apparatus comprises: An instruction receiving module, used to receive a connection instruction sent by a server; the connection instruction is uploaded to the server by a second terminal device, and the connection instruction includes network information of one or more target wireless networks; A network search module, used to search for wireless networks within a connection range according to the connection instruction; The network connection module is used to establish a network connection with the candidate wireless network according to the matching network information if a candidate wireless network matching any of the network information is searched.

11. A terminal device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 6, or 7 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6, or 7 to 9 is implemented.

Citation Information

Patent Citations

  • Network configuration method, system and device

    CN110662236A

  • Equipment network connection method, device, electronic equipment, server and system

    CN115514800A

  • Network management method, electronic equipment and computer readable storage medium

    CN116321366A

  • Wireless network access method, terminal and storage medium

    WO2018161761A1