Control method and device, equipment, storage medium and program product
By implementing network expansion mode and hotspot mode on terminal devices, the problem that terminal devices cannot receive AP signals when there are long distances or blockages are present is solved, and the reliability and flexibility of network access are improved.
Patent Information
- Application Number
- CN202510238295.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-02
- Publication Date
- 2025-05-30
AI Technical Summary
When there is a long distance or obstruction between the terminal device and the router (AP), the terminal device may not be able to receive the AP's signal or the signal strength is insufficient, resulting in the inability to realize network functions.
By implementing the network extension mode on the terminal device, the terminal device can establish a wireless connection with the network device and access the Internet through the network device. The specific method includes enabling the network extension mode based on network parameters of the target network access point, or switching to the hotspot mode or network reception mode when signal quality is poor.
It improves the network access capability of terminal devices in weak signal environments, reduces the unavailability of network functions caused by environmental factors, and increases the networking method of terminal devices.
Smart Images

Figure CN120075921A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a handover method, apparatus, device, storage medium, and program product. Background Art
[0002] Providing a wireless access point (AP) through a router at home or in the company to access the network is a common wireless network access method currently. Among them, the strength of the signal of the AP received by the terminal device is related to environmental factors such as the distance between the terminal device and the router (AP), and whether there are obstacles between the terminal device and the router (AP). Therefore, when the terminal device is far from the router (AP), or there are obstacles between the terminal and the router (AP), the terminal device may not be able to receive the signal of the AP, or the received signal of the AP is very weak and the network function cannot be realized. Summary of the Invention
[0003] In view of the above problems, this application provides a control method, apparatus, device, storage medium, and program product. The specific solutions are as follows:
[0004] A first aspect of this application provides a control method, including:
[0005] Establishing a wireless connection between a first communication device and a first network access point;
[0006] If the first network access point belongs to a target network access point, enabling a network extension mode of a first terminal device to which the first communication device belongs based on network parameters of the target network access point; wherein, the target network access point is provided by a network device, and the network device has the ability to connect to the Internet;
[0007] If the network extension mode of the first terminal device is enabled, enabling a second terminal device to access the Internet through the first terminal device and the network device.
[0008] In a possible implementation, it further includes:
[0009] If the first network access point does not belong to the target network access point, maintaining the wireless connection with the first network access point.
[0010] In a possible implementation, enabling the network extension mode of the first terminal device based on the network parameters of the target network access point includes one of the following:
[0011] Obtain at least one network parameter characterizing the signal quality of the target network access point, process the at least one network parameter to obtain a score characterizing the signal quality of the target network access point, and if the score is greater than or equal to the target value, enable the network expansion mode;
[0012] Alternatively, obtain the quality parameter value of the target network access point, and if the quality parameter value meets the target quality standard, enable the network expansion mode.
[0013] In a possible implementation, the enabling of the network expansion mode includes:
[0014] Enable the hotspot mode to provide a second network access point, so that the second terminal device establishes a wireless connection with the first terminal device based on the second network access point, and accesses the Internet through the first terminal device and the network device.
[0015] In a possible implementation, the enabling of the network expansion mode includes:
[0016] Broadcast information based on a second communication device; the broadcast information at least includes that the first terminal device can provide a second network access point and the score characterizing the signal quality of the target network access point; the second communication device is different from the first communication device;
[0017] Obtain a target request based on the second communication device;
[0018] In response to the target request, enable the hotspot mode to provide a second network access point, so that the second terminal device establishes a wireless connection with the first terminal device based on the second network access point, and accesses the Internet through the first terminal device and the network device.
[0019] In a possible implementation, it further includes one of the following:
[0020] If the score is less than the target value, enable the network reception mode of the first terminal device;
[0021] If the quality parameter value does not meet the target quality standard, enable the network reception mode of the first terminal device.
[0022] In a possible implementation, the enabling of the network reception mode includes:
[0023] Receive broadcast information based on a second communication device, where the broadcast information at least includes that a third terminal device can provide a second network access point and the score characterizing the signal quality of the target network access point;
[0024] Determine the target second network access point based on the broadcast information;
[0025] Sending a target request based on the second communication device, where the target request is used to start a hotspot mode for a terminal device enabled with a network extension mode corresponding to the target second network access point;
[0026] Switching from the target network access point to the target second network access point based on the target second network access point and the second communication device.
[0027] A second aspect of the present application provides a control device, including:
[0028] A connection module, configured to establish a wireless connection with a first network access point based on a first communication device;
[0029] A control module, configured to, if the first network access point belongs to a target network access point, enable a network extension mode of a first terminal device to which the first communication device belongs based on network parameters of the target network access point; wherein, the target network access point is provided by a network device, and the network device has the ability to connect to the Internet;
[0030] If the network extension mode of the first terminal device is enabled, enabling a second terminal device to access the Internet through the first terminal device and the network device.
[0031] A third aspect of the present application provides a computer program product, including computer-readable instructions, which, when running on a first terminal device, cause the first terminal device to implement the following steps:
[0032] Establishing a wireless connection with a first network access point based on a first communication device;
[0033] If the first network access point belongs to a target network access point, enabling a network extension mode of the first terminal device based on network parameters of the target network access point; wherein, the target network access point is provided by a network device, and the network device has the ability to connect to the Internet;
[0034] If the network extension mode of the first terminal device is enabled, enabling a second terminal device to access the Internet through the first terminal device and the network device.
[0035] A fourth aspect of the present application provides an electronic device, where the electronic device is a first terminal device, and the first terminal device includes a first communication device and at least one processor, wherein:
[0036] The first communication device is configured to establish a wireless connection with a network access point;
[0037] The processor is configured to:
[0038] Establish a wireless connection based on the first communication device and the first network access point;
[0039] If the first network access point belongs to the target network access point, enable the network extension mode of the first terminal device based on the network parameters of the target network access point; wherein, the target network access point is provided by a network device, and the network device has the ability to connect to the Internet;
[0040] If the network extension mode of the first terminal device is enabled, enable the second terminal device to access the Internet through the first terminal device and the network device.
[0041] In a possible implementation, the processor is further configured to: if the first network access point does not belong to the target network access point, maintain the wireless connection with the first network access point.
[0042] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by a first terminal device, the first terminal device can be enabled to implement the following steps:
[0043] Establish a wireless connection based on the first communication device and the first network access point;
[0044] If the first network access point belongs to the target network access point, enable the network extension mode of the first terminal device based on the network parameters of the target network access point; wherein, the target network access point is provided by a network device, and the network device has the ability to connect to the Internet;
[0045] If the network extension mode of the first terminal device is enabled, enable the second terminal device to access the Internet through the first terminal device and the network device. Description of the Drawings
[0046] Combined with the drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the original elements and elements are not necessarily drawn to scale.
[0047] Figure 1 It is a flowchart of an implementation of the control method provided by the present application;
[0048] Figure 2a It is a flowchart of an implementation of enabling the network extension mode of the first terminal device based on the network parameters of the target network access point provided by the present application;
[0049] Figure 2bAn example diagram of the scoring model provided by this application.
[0050] Figure 3 Another implementation flowchart for enabling the network expansion mode of the first terminal device based on the network parameters of the target network access point provided by this application;
[0051] Figure 4 An implementation flowchart for enabling the network expansion mode of the first terminal device provided by this application;
[0052] Figure 5 An implementation flowchart for enabling the network reception mode of the first terminal device provided by this application;
[0053] Figure 6 An example diagram of the network structure provided by this application;
[0054] Figure 7a Another implementation flowchart for the control method provided by this application;
[0055] Figure 7b A schematic structural diagram of the control device provided by this application;
[0056] Figure 8 A schematic structural diagram of the electronic device provided by this application. Detailed implementation manners
[0057] The embodiments of this application will be described below in conjunction with the accompanying drawings in the embodiments of this application. The terms used in the embodiments section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0058] The embodiments of this application will be described below in conjunction with the accompanying drawings. Those of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems.
[0059] The terms "first", "second", etc. in the specification, claims and above-mentioned drawings of this application are used to distinguish similar objects and do not have to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing when describing objects with the same attributes in the embodiments of this application. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device including a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these process, method, product or device.
[0060] The control method provided by this application can be used in a terminal device. The terminal device has a first communication device (for example, a Wi-Fi module). The terminal device can establish a wireless connection with a network access point (for example, a network access point provided by a network device or a network access point provided by another terminal device) based on this first communication device and then access the network. The terminal device can also have a second communication device (for example, a Bluetooth module). Based on this second communication device, the terminal device can establish a wireless connection with the second communication device of another terminal device, enabling information interaction between the two terminal devices.
[0061] The terminal device can be a mobile device, such as a mobile phone, a tablet computer, a laptop computer, etc. Of course, the terminal device can also be a non-mobile device, such as a desktop computer, etc.
[0062] For the convenience of description and distinction, the solution of this application will be described below taking the first terminal device as an example.
[0063] As Figure 1 described, it is a flowchart of an implementation of the control method provided by an embodiment of this application, which may include:
[0064] Step S101: Establish a wireless connection with a first network access point based on the first communication device.
[0065] The first network access point may be provided by a network device or by another terminal device.
[0066] The first terminal device may automatically establish a wireless connection with the first network access point based on the first communication device according to a network connection policy, or may establish a wireless connection with the first network access point based on the first communication device in response to a connection instruction for the first network access point triggered by the user.
[0067] Step S102: If the first network access point belongs to the target network access point, enable the network extension mode of the first terminal device to which the first communication device belongs based on the network parameters of the target network access point; wherein, the target network access point is provided by a network device that has the ability to connect to the Internet.
[0068] The target network access point can be a pre-calibrated network access point.
[0069] As an example, the target network access point can be a network access point pre-specified by the user.
[0070] As an example, the target network access point can be a network access point determined according to a preset rule. For example, it can be the network access point to which the first terminal device has accessed the most times.
[0071] Compared with the network access points provided by terminal devices (such as mobile phones, tablets, etc.), the network access points provided by network devices (such as wireless routers) with the ability to connect to the Internet offer better performance when providing network services. Therefore, when calibrating the target network access point, the network access points provided by network devices can be preferentially selected for calibration.
[0072] Moreover, during the daily use of terminal devices by users, the network access points provided by network devices are usually preferentially selected. Therefore, the network access point with the most access times by the first terminal device is usually also the network access point provided by the network device.
[0073] Optionally, it is possible to determine whether the first network access point belongs to the target network access point through the record information characterizing the target network access point.
[0074] As an example, the record information can be a list of target network access points. If the first network access point is in the list of target-level network access points, then the first network access point belongs to the target network access point; otherwise, it is determined that the first network access point does not belong to the target network access point.
[0075] In the case where the first network access point belongs to the target network access point in this application, the process of enabling the network expansion mode of the first terminal device based on the network parameters of the target network access point will be started. Based on this process, the network expansion mode of the first terminal device may be successfully enabled or may not be successfully enabled. Specifically, whether it can be successfully enabled is related to the network parameters of the target network access point.
[0076] If the network expansion mode of the first terminal device is enabled, the second terminal device accesses the Internet through the first terminal device and the above-mentioned network device.
[0077] That is to say, in the case where the first terminal device enables the network expansion mode, the first terminal device can act as an extended device of the network device, enabling the second terminal device to access the Internet through the first terminal device and the network device.
[0078] The second terminal device can be a terminal device that has not established a wireless connection with any network access point, or a terminal device that has already established a wireless connection with a third network access point. The third network access point can be the first network access point or a non-first network access point.
[0079] In the case where the second terminal device has already established a wireless connection with the third network access point, if the signal quality of the third network access point detected by the second terminal device does not meet the network connection conditions, the wireless connection with the third network access point can be disconnected and switched to accessing the Internet through the first terminal device and the above-mentioned network device.
[0080] The control method provided by the embodiment of the present application enables the network extension mode of the first terminal device based on the network parameters of the target network access point when the first terminal device accesses the Internet based on the target network access point. When the network extension mode of the first terminal device is enabled, the second terminal device can access the above Internet through the first terminal device and the network device providing the target network access point, increasing the networking methods of the first terminal device and reducing the probability that the first terminal device cannot use the network function due to environmental factors such as being far from the wireless access point or being blocked by obstacles.
[0081] In an optional embodiment, if the first network access point does not belong to the target network access point, the wireless connection with the first network access point is maintained.
[0082] That is to say, when the first network access point does not belong to the target network access point, the process of enabling the network extension mode of the first terminal device based on the network parameters of the target network access point will not be started, that is, the network extension mode of the first terminal device will not be enabled.
[0083] For example, there are two network access points in a certain space range, namely network access point A and network access point B. Among them, network access point A belongs to the target network access point, and network access point B does not belong to the target network access point. Then when the first terminal device enters this space range, if the first terminal device first establishes a wireless connection with network access point A through the first communication device, the first terminal device will enable the network extension mode of the first terminal device based on the network parameters of network access point A; if the first terminal device first establishes a wireless connection with network access point B through the first communication device, the first terminal device will not enable the network extension mode of the first terminal device based on the network parameters of network access point A.
[0084] In an optional embodiment, a flowchart of an implementation of enabling the network extension mode of the first terminal device based on the network parameters of the target network access point is as Figure 2a shown, and may include:
[0085] Step S201: Obtain at least one network parameter characterizing the signal quality of the target network access point.
[0086] The network parameters characterizing the signal quality of the target network access point may include, but are not limited to, at least one of the following: Received Signal Strength Indication (RSSI), frequency band (such as 2.4G, 5G, 6G), bandwidth, throughput, encryption method, whether it has been used, etc.
[0087] Step S202: Process the above at least one network parameter to obtain a score representing the signal quality of the target network access point.
[0088] Among them, the score of the signal quality of the target network access point is positively correlated with the RSSI, that is, the larger the RSSI of the target network access point, the higher the score of the signal quality of the target network access point.
[0089] The score of the signal quality of the target network access point is positively correlated with the frequency band, that is, the higher the frequency band of the target network access point, the higher the score of the signal quality of the target network access point.
[0090] The score of the signal quality of the target network access point is positively correlated with the bandwidth, that is, the wider the bandwidth of the target network access point, the higher the score of the signal quality of the target network access point.
[0091] The score of the signal quality of the target network access point is positively correlated with the throughput, that is, the throughput of the target network access point the greater The higher the score of the signal quality of the target network access point.
[0092] The score of the signal quality of the target network access point is positively correlated with the security of the encryption method, that is, the higher the security of the encryption method of the target network access point, the higher the score of the signal quality of the target network access point.
[0093] When the target network access point is a used network access point, the score of the signal quality of the target network access point is higher than when the target network access point is an unused network access point.
[0094] In the process of obtaining the score representing the signal quality of the target network access point, certain weights can be assigned to each network parameter, and the weights corresponding to different network parameters can be the same or different.
[0095] As an example, the above at least one network parameter can be calculated using a pre-set calculation rule to obtain a score representing the signal quality of the target network access point.
[0096] As an example, the above at least one network parameter can be input into a pre-trained scoring model to obtain the score representing the signal quality of the target network access point output by the scoring model.
[0097] Such as Figure 2bAs shown in the figure, it is an example diagram of the scoring model provided by the embodiment of the present application. Induction parameters (see below) indicating whether the terminal device providing the target network access point is moving, the signal quality score (calculated score) or network parameters of the target network access point, the remaining power of the first terminal device, the network level of the target network access point, and other information can be input into the scoring model to obtain the score representing the signal quality of the target network access point output by the scoring model, and then determine whether to enable the network expansion mode according to the score.
[0098] Among them, the target network access point is a first-level network access point, and the network access point provided by the terminal device accessing the first-level network access point is a second-level network access point.
[0099] Step S203: If the score is greater than or equal to the target value, enable the network expansion mode.
[0100] If the score is greater than or equal to the target value, it means that the target network access point can support the first terminal device as a network expansion device, that is, the network expansion condition is met. Based on this, the network expansion mode of the first terminal device is enabled, so that the second device can access the Internet through the first terminal device and the network device.
[0101] In an alternative embodiment, another implementation flowchart of enabling the network expansion mode of the first terminal device based on the network parameters of the target network access point is as Figure 3 shown, and it may include:
[0102] Step S301: Obtain the quality parameter value of the target network access point.
[0103] The quality parameter value of the target network access point can be determined based on the value of the network parameter representing the signal quality of the target network access point. The network parameter representing the signal quality of the target network access point may include, but is not limited to, at least one of the following: Received Signal Strength Indication (RSSI), frequency band (such as 2.4G, 5G, 6G), bandwidth, throughput, encryption method, whether it has been used, etc.
[0104] That is to say, the quality parameter value of the target network access point is determined based on the value of at least one network parameter.
[0105] As an example, the value of each network parameter obtained in real time can be used as the quality parameter value of the target network access point.
[0106] As an example, for each network parameter, the mean value of multiple values obtained at consecutive multiple moments can be calculated, and the mean value corresponding to each network parameter is determined as the quality parameter value of the target network access point.
[0107] Step S302: If the quality parameter value meets the target quality standard, enable the network expansion mode.
[0108] The quality parameter meeting the target quality standard indicates that the target network access point can support the first terminal device as a network expansion device, that is, the network expansion condition is met. Based on this, the network expansion mode of the first terminal device is enabled, so that the second device can access the Internet through the first terminal device and the network device.
[0109] Optionally, in the case of taking the value of each network parameter obtained in real time as the quality parameter value of the target network access point, if the value of each network parameter is within the target range (which can be denoted as the first target range for convenience of description and distinction) corresponding to the network parameter, it is determined that the quality parameter meets the target quality standard.
[0110] Optionally, for each network parameter, calculate the average value of multiple values obtained at consecutive multiple moments, and in the case of determining the average value corresponding to each network parameter as the quality parameter value of the target network access point, if the average value corresponding to each network parameter is within the target range (which can be denoted as the second target range for convenience of description and distinction) corresponding to the network parameter, it is determined that the quality parameter meets the target quality standard.
[0111] In an alternative embodiment, one implementation manner of enabling the network expansion mode of the first terminal device may be:
[0112] Enable the hotspot mode to provide a second network access point, so that the second terminal device can establish a wireless connection with the first terminal device based on the second network access point and access the Internet through the first terminal device and the network device.
[0113] That is to say, when the network expansion condition is met, directly turn on the hotspot function of the first terminal device, so that the first terminal device provides a second network access point.
[0114] In the case where the verification information is not set for the second network access point, if the second terminal device obtains an access instruction for the second network access point, the second terminal device can directly establish a wireless connection with the second network access point through the first communication device of the second terminal device.
[0115] The access instruction for the second network access point can be triggered manually or automatically triggered by the second terminal device based on the network access policy.
[0116] When verification information is set at the second network access point, if the second terminal device obtains an access instruction for the second network access point, the second terminal device may send the verification information of the second network access point input by the user to the second network access point, so as to establish a wireless connection with the second network access point through the first communication device of the second terminal device.
[0117] In the above embodiment, when enabling the network extension mode of the first terminal device, only the hotspot mode of the first terminal device is enabled. However, when verification information is set at the second network access point, if the second terminal device wants to establish a wireless connection with the second network access point, the user needs to input verification information. To further improve the convenience of network access, the present application provides another way to enable the network extension mode of the first terminal device, as Figure 4 shown, which is a flowchart of an implementation for enabling the network extension mode of the first terminal device provided by an embodiment of the present application, and may include:
[0118] Step S401: Perform information broadcasting based on the second communication device; the information broadcast by the first terminal device (hereinafter referred to as broadcast information) at least includes that the first terminal device can provide the second network access point and a score representing the signal quality of the target network access point. The second communication device is different from the first communication device.
[0119] In the network extension mode, the second communication device is in an open state.
[0120] Optionally, the broadcast information may include the identifier of the second network access point (for example, SSID), and of course, it may not include the identifier information of the second network access point. Further, the broadcast information may further include, but is not limited to: verification information (for example, password), network encryption method, network address (for example, mac address, etc.).
[0121] The content in the above broadcast information may be broadcast at one time or in multiple times.
[0122] Step S402: Obtain a target request based on the second communication device.
[0123] After receiving the information broadcast by the first terminal device, if the second terminal device determines to access the second network access point, it may send a target request to the first terminal device through the first communication device of the second terminal device to request the first terminal device to enable the hotspot mode.
[0124] Step S403: In response to the target request, enable the hotspot mode to provide the second network access point, so that the second terminal device establishes a wireless connection with the first terminal device based on the second network access point and accesses the Internet through the first terminal device and the network device.
[0125] After enabling the hotspot mode, the second terminal device can scan the second network access point.
[0126] If the first terminal device does not broadcast the verification information of the second network access point before enabling the hotspot mode, after enabling the hotspot mode, the identification and verification information of the second network access point can be broadcast based on the second communication device. Alternatively, after receiving the access information request of the second terminal device based on the second communication device, the identification and verification information of the second network access point can be broadcast based on the second communication device.
[0127] If the first terminal device broadcasts the verification information of the second network access point before enabling the hotspot, there is no need to broadcast the identification and verification information of the second network access point again.
[0128] If an access request carrying verification information sent by the second terminal device is received based on the first communication device, in response to the access request, a wireless connection is established with the second terminal device through the second network access point, so that the second terminal device accesses the Internet through the first terminal device and the network device.
[0129] In an optional embodiment, if the score representing the signal quality of the target network access point is less than the target value, enable the network reception mode of the first terminal device.
[0130] Alternatively, if the quality parameter value of the target network access point does not meet the target quality standard, enable the network reception mode of the first terminal device.
[0131] The first terminal device that has enabled the network reception mode can switch from establishing a wireless connection with the target network access point based on the first communication device to establishing a wireless connection with the network access point provided by the terminal device that has enabled the network extension mode based on the first communication device.
[0132] Optionally, if the first network access point does not belong to the target network access point, the network reception mode of the first terminal device will not be enabled either.
[0133] In an optional embodiment, a flowchart of an implementation of enabling the network reception mode of the first terminal device is as Figure 5 shown and may include:
[0134] Step S501: Receive broadcast information based on the second communication device. The broadcast information includes at least that the third terminal device can provide the second network access point and the score representing the signal quality of the target network access point.
[0135] In the network reception mode, the second communication device is in an on state.
[0136] The broadcast information is broadcast by a terminal device (for the convenience of description and distinction, denoted as the third terminal device) that enables the network extension mode outside the first terminal device. The third terminal device is a terminal device that establishes a wireless connection with the target network access point.
[0137] Optionally, the broadcast information may include the identifier of the second network access point (for example, SSID). Further, it may also include, but is not limited to: authentication information (such as a password), network encryption method, network address (such as a mac address, etc.).
[0138] The above broadcast information can be received all at once or in multiple times.
[0139] Step S502: Determine the target second network access point based on the broadcast information.
[0140] If the broadcast information of only one third terminal device is received, the second network access point of the broadcast information is determined as the target second network access point.
[0141] If the broadcast information of at least two third terminal devices is received, the target second network access point can be determined based on the score representing the signal quality of the target network access point in the broadcast information. Optionally, the maximum score can be determined among all the scores in the received broadcast information, and the second network access point in the broadcast information containing the maximum score is determined as the target second network access point.
[0142] Further, the remaining battery power of the third terminal device may also be included in the broadcast information; based on this, if there are at least two maximum scores, the second network access point corresponding to the broadcast information containing the maximum score and the maximum remaining battery power can be determined as the target second network access point.
[0143] Further, the induction parameters (such as the induction parameters of a speed sensor, an acceleration sensor, a gyroscope, etc.) representing whether the third terminal device is in a moving state may also be included in the broadcast information. Based on this, if there are at least two second network access points corresponding to the broadcast information containing the maximum score and the maximum remaining battery power, the second network access point corresponding to the induction parameter representing static can be determined as the target second network access point.
[0144] Step S503: Send a target request based on the second communication device. The target request is used to start the hotspot mode with the terminal device that enables the network extension mode corresponding to the target second network access point.
[0145] After determining the target second network access point, a target request may be sent to a third terminal device providing the target second network access point based on the second communication device, so as to request the third terminal device to start the hotspot mode. The third terminal device may also broadcast access information of the target second network access point through the second communication device, for example, an identifier of the target second network access point, authentication information, etc.
[0146] Step S504: Switch from the target network access point to the target second network access point based on the target second network access point and the second communication device.
[0147] In the case where the third terminal device broadcasts the identifier and authentication information of the target second network access point, the first terminal device may directly send an access request carrying the authentication information to the target second network access point based on the first communication device, so as to establish a wireless connection with the target second network access point and disconnect the wireless connection with the target network access point.
[0148] In the case where the third terminal device does not broadcast the identifier and authentication information of the target second network access point, after the first terminal scans the target second network access point, the first terminal device may send an access information request to the third terminal device providing the target second network access point based on the second communication device, so that the third terminal device providing the target second network access point broadcasts the identifier and authentication information of the target second network access point. After the first terminal device receives the identifier and authentication information of the target second network access point broadcast by the third terminal device, the first terminal device may send an access request carrying the authentication information to the target second network access point through the first communication device, so as to establish a wireless connection with the target second network access point and disconnect the wireless connection with the target network access point.
[0149] Next, a specific application scenario is used to illustrate an implementation manner of the present application:
[0150] As Figure 6 shown, it is an example diagram of a network structure provided by an embodiment of the present application. The network structure is composed of a network device and terminal devices, where the network device is a wireless router, and the terminal devices include a mobile phone and a tablet computer.
[0151] In the initial state, three terminal devices, namely mobile phone A (located at the first position), mobile phone B, and tablet computer C, can all scan the network access point provided by the wireless router (denoted as network access point W). Therefore, these three terminal devices can all establish wireless connections with the wireless router through their respective first communication devices (for example, WIFI modules) to access the Internet.
[0152] If the network access point W is designated as the target network access point in both mobile phone A and mobile phone B, but not in the tablet computer, then mobile phone A will enable the network expansion mode of mobile phone A based on the network parameters of network access point W, mobile phone B will enable the network expansion mode of mobile phone B based on the network parameters of network access point W, while the tablet computer will not enable the network expansion mode of the tablet computer based on the network parameters of network access point W.
[0153] Mobile phone A can obtain at least one network parameter characterizing the signal quality of the network access point W, process the obtained at least one network parameter to obtain a score characterizing the signal quality of network access point W. If the score is greater than or equal to the target value, then enable the network expansion mode of mobile phone A. In the network expansion mode, mobile phone A can broadcast information through a second communication device (such as Bluetooth). The broadcast information includes at least: the network access point that mobile phone A can provide (denoted as network access point R1) and the score characterizing the signal quality of network access point W. If the score is less than the target value, then mobile phone A enables the network reception mode of mobile phone A. In the network reception mode, mobile phone A can receive broadcast information from other terminal devices (such as mobile phone B) through the second communication device.
[0154] Similarly, mobile phone B can obtain at least one network parameter characterizing the signal quality of the network access point W, process the obtained at least one network parameter to obtain a score characterizing the signal quality of network access point W. If the score is greater than or equal to the target value, then enable the network expansion mode of mobile phone B. In the network expansion mode, mobile phone B can broadcast information through a second communication device (such as Bluetooth). The broadcast information includes at least: the network access point that mobile phone B can provide (denoted as network access point R2) and the score characterizing the signal quality of network access point W. If the score is less than the target value, then mobile phone B enables the network reception mode of mobile phone B. In the network reception mode, mobile phone B can receive broadcast information from other terminal devices (such as mobile phone A) through the second communication device.
[0155] Suppose mobile phone A enables the network expansion mode when it is at the first position, and mobile phone B also enables the network expansion mode. Then both mobile phone A and mobile phone will broadcast information, enabling other terminal devices that access network access point W and enable the network reception mode to switch to accessing the Internet through mobile phone A and the wireless router, or to switch to accessing the Internet through mobile phone B and the wireless router.
[0156] After mobile phone A moves from the first position to the second position, the network reception mode of mobile phone A is enabled based on the network parameters of network access point W. That is, after mobile phone A moves from the first position to the second position, it switches from the network expansion mode to the network reception mode and no longer provides network access point R1. Since it is relatively close to mobile phone B, mobile phone A can receive the broadcast information of mobile phone B through the second communication device. At this time, mobile phone A can send a target request (such as a hotspot activation request) to mobile phone B through the second communication device. Mobile phone B enables the hotspot mode in response to the target request to provide network access point R2. After mobile phone A scans network access point R2, it can send an access information request to mobile phone B through the second communication device. After receiving the access information request, mobile phone B broadcasts the access information through the second communication device (i.e., the SSID and password of network access point R2, encryption method, mac address, etc.). After receiving the access information, mobile phone A sends an access request to network access point R2 through the first communication device to establish a wireless connection with network access point R2 and disconnects the wireless connection with wireless network access point W. Thus, mobile phone A switches from accessing the Internet through a wireless router to accessing the Internet through mobile phone B and a wireless router.
[0157] As Figure 7a shown, it is another implementation flowchart of the control method provided by the embodiment of the present application, which may include:
[0158] Step S701: Establish a wireless connection with the first network access point based on the first communication device.
[0159] For example, the first network access point is the network access point provided by the wireless router at the user's home, and the user sets the first network access point as the target network access point. After the user brings the terminal device U home, the terminal device U will establish a wireless connection with the wireless router through the WiFi module to access the Internet. After establishing a wireless connection with the first network access point provided by the wireless router, the terminal device U will record some information of the first network access point, and these information include but are not limited to: the frequency band, bandwidth, RSSI, data transmission rate, Mac address of the first network access point, etc.
[0160] Step S702: Determine whether the first network access point belongs to the target network access point. If it is, enter step S703; if not, end. That is, determine whether the currently connected network access point belongs to the target network access point.
[0161] For the specific determination process, refer to the foregoing embodiments and will not be elaborated here.
[0162] Step S703: Obtain the score representing the signal quality of the first network access point. That is, obtain the score representing the signal quality of the currently connected network access point.
[0163] Step S704: Determine whether the score is greater than or equal to the score threshold. If so, proceed to step S705; if not, proceed to step S713 for network search.
[0164] Step S705: Determine whether the terminal device U is in a moving state. If so, proceed to step S711; if not, proceed to step S706.
[0165] Step S706: Broadcast information through the second communication device (such as a Bluetooth module). The broadcast information may include, but is not limited to, the following information: the SSID of the hotspot that the terminal device U can provide, the password, the encryption type, the score of the first network access point, the Mac address assigned by the first network access point to the terminal device U, etc.
[0166] Step S707: Monitor whether a hotspot enabling request is received. If so, proceed to step S708; if not, continue to monitor whether a hotspot enabling request message is received. Specifically, monitor whether a hotspot enabling request message is received through the second communication device.
[0167] Step S708: Enable the hotspot mode of the terminal device U.
[0168] Step S709: Monitor whether a terminal device establishes a wireless connection through the first communication device. If no terminal device is connected, proceed to step S710; if there is, keep the hotspot mode of the terminal device enabled.
[0169] Optionally, if no terminal device accesses the hotspot within the preset duration, it is determined that no terminal device is connected.
[0170] Step S710: Turn off the hotspot mode of the terminal device U.
[0171] Step S711: Obtain a score representing the signal quality of the first network access point. When the terminal device U is in a moving state, it is necessary to obtain again the score representing the signal quality of the first network access point. That is, obtain again the score representing the signal quality of the currently connected network access point.
[0172] Step S712: Determine whether the score is greater than or equal to the score threshold. If so, proceed to step S706; if not, proceed to step S713 for network search.
[0173] Step S713: Monitor whether broadcast information is received through the second communication device. If so, proceed to step S714; if not, continue to monitor whether broadcast information is received through the second communication device.
[0174] Step S714: Sort each network access point parsed based on the broadcast information in descending order of signal quality. If there are multiple network access points with the best quality, proceed to step S715.
[0175] Step S715: Select the network access point with the best quality and closest to the terminal device U as the network access point to be connected.
[0176] Step S716: Send a hotspot enable request to the network access point to be connected through the second communication device.
[0177] Step S717: Monitor whether a wireless connection is established with the network access point to be connected. If so, proceed to step S718; if not, return to step S713.
[0178] In another possible implementation, if a wireless connection is established with the network access point to be connected, step S702 can be returned for execution.
[0179] Step S718: Perform a network scan to obtain a list of network access points.
[0180] The network scan can be performed at a preset period to update the list of network access points. After obtaining the list of network access points, it can be determined whether to perform a network switch based on the signal quality of the scanned network access points, or it can be determined whether to perform a network switch based on the signal quality and level of the scanned network access points.
[0181] Corresponding to the method embodiment, the present application further provides a control device. A schematic structural diagram of the control device provided in the embodiment of the present application is as Figure 7b shown, and may include:
[0182] A connection module 701 and a control module 702;
[0183] Among them, the connection module 701 is used to establish a wireless connection with the first network access point based on the first communication device;
[0184] The control module 702 is used to enable the network extension mode of the first terminal device to which the first communication device belongs based on the network parameters of the target network access point if the first network access point belongs to the target network access point; wherein, the target network access point is provided by a network device, and the network device has the ability to connect to the Internet;
[0185] If the network extension mode of the first terminal device is enabled, the second terminal device can access the Internet through the first terminal device and the network device.
[0186] The control device provided by the embodiment of the present application enables the network expansion mode of the first terminal device based on the network parameters of the target network access point when the first terminal device accesses the Internet based on the target network access point. When the network expansion mode of the first terminal device is enabled, the second terminal device can access the above Internet through the first terminal device and the network device providing the target network access point, increasing the networking methods of the first terminal device and reducing the probability of the situation where the first terminal device cannot use the network function due to environmental factors such as being far away from the wireless access point or being blocked by obstacles.
[0187] In an optional embodiment, the control module 702 is further configured to:
[0188] If the first network access point does not belong to the target network access point, maintain the wireless connection with the first network access point.
[0189] In an optional embodiment, when the control module 702 enables the network expansion mode of the first terminal device based on the network parameters of the target network access point, it includes the following one:
[0190] Obtain at least one network parameter characterizing the signal quality of the target network access point, process the at least one network parameter to obtain a score characterizing the signal quality of the target network access point, and if the score is greater than or equal to the target value, enable the network expansion mode;
[0191] Or, obtain the quality parameter value of the target network access point, and if the quality parameter value meets the target quality standard, enable the network expansion mode.
[0192] In an optional embodiment, when the control module 702 enables the network expansion mode, it is configured to:
[0193] Enable the hotspot mode to provide a second network access point, so that the second terminal device establishes a wireless connection with the first terminal device based on the second network access point and accesses the Internet through the first terminal device and the network device.
[0194] In an optional embodiment, when the control module 702 enables the network expansion mode, it is configured to:
[0195] Perform information broadcast based on a second communication device; the broadcast information at least includes that the first terminal device can provide a second network access point and the score characterizing the signal quality of the target network access point; the second communication device is different from the first communication device;
[0196] Obtain a target request based on the second communication device;
[0197] In response to the target request, enable the hotspot mode to provide a second network access point, so that the second terminal device can establish a wireless connection with the first terminal device based on the second network access point, and access the Internet through the first terminal device and the network device.
[0198] In an optional embodiment, the control module 702 is further configured to perform one of the following:
[0199] If the score is less than the target value, enable the network reception mode of the first terminal device;
[0200] If the quality parameter value does not meet the target quality standard, enable the network reception mode of the first terminal device.
[0201] In an optional embodiment, when the control module 702 enables the network reception mode, it is configured to:
[0202] Receive broadcast information based on the second communication device, where the broadcast information at least includes that a third terminal device can provide a second network access point and a score representing the signal quality of the target network access point;
[0203] Determine the target second network access point based on the broadcast information;
[0204] Send a target request based on the second communication device, where the target request is used to start the hotspot mode for the terminal device enabled with the network extension mode corresponding to the target second network access point;
[0205] Switch from the target network access point to the target second network access point based on the target second network access point and the second communication device.
[0206] This application further provides an electronic device, which is the first terminal device. The first terminal device includes a first communication device and at least one processor, where:
[0207] The first communication device is used to establish a wireless connection with a network access point. The first communication device and the processor can be independent components in the first terminal device, or the first communication device is a component of the processor. For example, the first communication device is a functional module provided by the processor.
[0208] The processor is used to:
[0209] Establish a wireless connection with the first network access point based on the first communication device;
[0210] If the first network access point belongs to the target network access point, enable the network extension mode of the first terminal device based on the network parameters of the target network access point; wherein, the target network access point is provided by a network device, and the network device has the ability to connect to the Internet;
[0211] If the network extension mode of the first terminal device is enabled, enable the second terminal device to access the Internet through the first terminal device and the network device.
[0212] Optionally, the processor is further configured to: if the first network access point does not belong to the target network access point, maintain a wireless connection with the first network access point.
[0213] Optionally, the electronic device further includes a second communication device, which is different from the first communication device, and the second communication device is used for sending and receiving data.
[0214] An electronic device is further provided in an embodiment of the present application. Refer to Figure 8 As shown, it shows a schematic structural diagram of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may be a terminal device (for example, a car machine, a large screen device, a smart home, a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc.). Figure 8 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiment of the present application.
[0215] As Figure 8 shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 801, which may execute various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0216] Generally, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a memory card, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 8An electronic device with various devices is shown, but it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices can be implemented or had.
[0217] An embodiment of the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions run on an electronic device (such as a first terminal device), the first terminal device is caused to implement the following steps:
[0218] Establish a wireless connection with a first network access point based on a first communication device;
[0219] If the first network access point belongs to a target network access point, enable the network expansion mode of the first terminal device based on the network parameters of the target network access point; wherein, the target network access point is provided by a network device, and the network device has the ability to connect to the Internet;
[0220] If the network expansion mode of the first terminal device is enabled, enable a second terminal device to access the Internet through the first terminal device and the network device.
[0221] An embodiment of the present application also provides a computer-readable storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device (such as a first terminal device), the first terminal device can be caused to implement the following steps:
[0222] Establish a wireless connection with a first network access point based on a first communication device;
[0223] If the first network access point belongs to a target network access point, enable the network expansion mode of the first terminal device based on the network parameters of the target network access point; wherein, the target network access point is provided by a network device, and the network device has the ability to connect to the Internet;
[0224] If the network expansion mode of the first terminal device is enabled, enable a second terminal device to access the Internet through the first terminal device and the network device.
[0225] It should be noted that the device embodiments described above are merely illustrative. The units described 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 to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in the present application, the connection relationships between the modules indicate that they have communication connections with each other, and can be specifically implemented as one or more communication buses or signal lines.
[0226] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions accomplished by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits or dedicated circuits, etc. However, for the present application, in more cases, software program implementation is a better embodiment. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disc of a computer, etc., and includes several instructions for causing a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in various embodiments of the present application.
[0227] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. Professional technicians can use different methods to implement the described functions for each specific solution, but such implementation should not be considered to exceed the scope of the present application.
[0228] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center to another website, a computer, a training device or a data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0229] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other.
[0230] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A control method, comprising: Establishing a wireless connection with a first network access point based on a first communication device; If the first network access point belongs to a target network access point, enabling a network extension mode of a first terminal device to which the first communication device belongs based on a network parameter of the target network access point; wherein the target network access point is provided by a network device, and the network device has the ability to connect to the Internet; If the network extension mode of the first terminal device is enabled, the second terminal device is enabled to access the Internet through the first terminal device and the network device.
2. The method according to claim 1, further comprising: If the first network access point does not belong to the target network access point, the wireless connection with the first network access point is maintained.
3. The method according to claim 1, enabling the network extension mode of the first terminal device based on the network parameters of the target network access point, comprises one of the following: obtaining at least one network parameter characterizing the signal quality of the target network access point, processing the at least one network parameter to obtain a score characterizing the signal quality of the target network access point, and enabling the network extension mode if the score is greater than or equal to a target value; Alternatively, a quality parameter value of the target network access point is obtained, and if the quality parameter value meets a target quality standard, the network extension mode is enabled.
4. The method according to claim 3, wherein the enabling the network extension mode comprises: The hotspot mode is enabled to provide a second network access point, so that the second terminal device establishes a wireless connection with the first terminal device based on the second network access point, and accesses the Internet through the first terminal device and the network device.
5. The method according to claim 3, wherein the enabling the network extension mode comprises: Broadcasting information based on a second communication device; The broadcast information at least includes that the first terminal device can provide a second network access point and a score representing the signal quality of the target network access point; the second communication device is different from the first communication device; obtaining a target request based on the second communication device; In response to the target request, hotspot mode is enabled to provide a second network access point, so that a second terminal device establishes a wireless connection with the first terminal device based on the second network access point, and accesses the Internet through the first terminal device and the network device.
6. The method according to claim 3, further comprising: If the score is less than a target value, enabling a network receiving mode of the first terminal device; If the quality parameter value does not meet the target quality standard, a network reception mode of the first terminal device is enabled.
7. The method according to claim 6, wherein the enabling network reception mode comprises: Receiving broadcast information based on the second communication device, the broadcast information at least includes the third terminal device being able to provide the second network access point and a score representing the signal quality of the target network access point; determining a target second network access point based on the broadcast information; Sending a target request based on the second communication device, the target request is used to start a hotspot mode for a terminal device with a network extension mode enabled corresponding to the target second network access point; Based on the target second network access point and the second communication device, switching from the target network access point to the target second network access point.
8. A control device comprising: A connection module, configured to establish a wireless connection with a first network access point based on a first communication device; a control module, configured to enable a network extension mode of a first terminal device to which the first communication device belongs based on a network parameter of the target network access point if the first network point access point belongs to a target network access point; wherein the target network access point is provided by a network device, and the network device has the ability to connect to the Internet; If the network extension mode of the first terminal device is enabled, the second terminal device is enabled to access the Internet through the first terminal device and the network device.
9. An electronic device, the electronic device being a first terminal device, the first terminal device comprising a first communication device and at least one processor, wherein: The first communication device is used to establish a wireless connection with a network access point; The processor is used to: Establishing a wireless connection with a first network access point based on the first communication device; If the first network access point belongs to a target network access point, enabling a network extension mode of the first terminal device based on a network parameter of the target network access point; wherein the target network access point is provided by a network device, and the network device has the ability to connect to the Internet; If the network extension mode of the first terminal device is enabled, the second terminal device is enabled to access the Internet through the first terminal device and the network device. 10 . The electronic device according to claim 9 , wherein the processor is further configured to: if the first network access point does not belong to the target network access point, maintain the wireless connection with the first network access point.