Wireless connection method, electronic device, and communication system

By reconnecting or restarting the wireless module when the wireless connection is unstable, and selecting high-priority devices to rebuild the connection based on detection data and user preferences, the problem of unstable wireless connection is solved, the stability and quality of the connection are improved, and manual intervention is reduced.

CN119697805BActive Publication Date: 2026-03-20HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing wireless communication technologies suffer from instability, prone to lag and disconnections, requiring users to manually restore the connection, thus impacting user experience.

Method used

After establishing a wireless connection between the device and the second device, a connection test is performed. If the connection is unstable, the device is reconnected or the wireless communication module is restarted. The device with the highest priority is selected to rebuild the connection based on the connection status test data and user preferences.

Benefits of technology

It improves the stability and quality of wireless connectivity, reduces manual maintenance workload, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697805B_ABST
    Figure CN119697805B_ABST
Patent Text Reader

Abstract

The application provides a wireless connection method, an electronic device and a communication system. The method comprises connection detection, connection self-recovery and connection optimization, and specifically comprises: after a first device and a second device establish a wireless connection, the first device performs connection detection; in the case that the connection state does not meet a stable state, the first device performs connection self-recovery through reconnection or restarting. Optionally, the method further comprises: after the connection self-recovery succeeds, the connection detection is continuously performed; and in the case that the connection self-recovery fails, the first device selects other devices to connect according to a priority order. The priority is obtained by the first device based on stored connection state detection data, connection self-recovery data and the like between the first device and each device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the terminal field, and in particular to a wireless connection method, an electronic device and a communication system. BACKGROUND

[0002] At present, wireless communication technologies are widely used, such as WiFi communication technology, Bluetooth communication technology and the like. Users have high quality and high stability requirements for wireless connections established by using these wireless communication technologies. How to improve the quality and stability of wireless connections is a problem to be solved. SUMMARY

[0003] The present application provides a wireless connection method, an electronic device and a communication system. Specifically, after a first device and a second device establish a wireless connection, the first device performs connection detection. If it is detected that the connection state does not meet a stable state, connection self-healing is performed by reconnection or restarting and the like. Optionally, the method further includes: after connection self-healing succeeds, connection detection and the like are continuously performed; and after connection self-healing fails, other devices are selected according to a priority order to establish a connection.

[0004] In a first aspect, the present application provides a wireless connection method. The method is applied to a first device including a wireless communication module. The method includes: establishing a first connection with a second device through the wireless communication module; detecting that the first connection does not meet a stable state; disconnecting the first connection and re-establishing a second connection with the second device through the wireless communication module; detecting that the second connection does not meet the stable state; restarting the wireless communication module and re-establishing a third connection with the second device through the wireless communication module.

[0005] After the method provided in the first aspect is implemented, the stability of the connection can be improved. Specifically, the first device can detect in advance that the connection state is unstable through connection detection, and the connection state can be restored in time through connection self-healing, thereby avoiding problems such as connection lag and disconnection caused by a long time in an unstable state, and improving the stability of the connection. In combination with the method provided in the first aspect, the condition that the connection does not meet the stable state includes: the connection is not disconnected, and a connectivity test exceeds a preset time length and / or a signal strength is less than a preset strength; and the connection includes the first connection, the second connection or the third connection.

[0006] In this way, whether the connection state is stable can be detected through multiple ways, and the accuracy of connection state detection is improved.

[0007] In combination with the method provided in the first aspect, the condition that the connection does not meet the stable state includes: the connection is not disconnected, and N times of connectivity tests exceed a preset time length and / or a signal strength is less than a preset strength, N≥1.

[0008] In this way, accidental connection instability can be excluded, and the accuracy of the connection state detection is further improved.

[0009] With reference to the method provided in the first aspect, the method further includes: detecting that the third connection does not meet the stable state; and establishing a fourth connection with a third device through the wireless communication module.

[0010] In this way, the quality of the connection can be improved. Specifically, after the connection self-recovery fails, the first device selects a corresponding device from available other devices to establish a wireless connection, thereby guaranteeing the quality of the connection of the first device.

[0011] With reference to the method provided in the first aspect, the third device is a device with the highest priority among devices connectable by the first device, and the priority of the device is determined according to any one or more of the following: a connectivity test duration, a signal strength, a transmission rate, a number of times of reestablishing a connection, a time required for reestablishing a connection, a ratio of reestablishing a connection meeting the stable state, or a user setting.

[0012] In this way, the priority of the device can be determined according to multi-dimensional detection data and user habits, thereby further guaranteeing the stability and quality of the connection established with the new device.

[0013] With reference to the method provided in the first aspect, the stable state is a first stable state, and the method further includes: updating the first stable state to a second stable state according to any one or more of the number of times of reestablishing a connection, the time required for reestablishing a connection, or the ratio of reestablishing a connection meeting the stable state.

[0014] With reference to the method provided in the first aspect, when the ratio of reestablishing a connection meeting the stable state is lower than a first preset ratio, a range of the second stable state is greater than a range of the first stable state; and when the ratio of reestablishing a connection meeting the stable state is higher than a second preset ratio, the range of the second stable state is smaller than the range of the first stable state, where the first preset ratio is smaller than the second preset ratio.

[0015] In this way, the normal communication of the first device can be avoided from being affected by excessively strict detection conditions, and the wireless connection established can also be guaranteed to have high stability and high quality, thereby improving the user experience.

[0016] With reference to the method provided in the first aspect, before detecting that the connection state of the first connection does not meet the stable state, the method further includes: receiving a first operation.

[0017] In this way, the switch can be provided to determine whether to start the connection detection, self-recovery and other functions according to the switch operation (also referred to as the first operation) of the user, so as to meet the personalized needs of the user.

[0018] With reference to the method provided in the first aspect, the first device further comprises a first application, and the first device performs the following through the first application: detecting that the first connection does not meet the stable state; disconnecting the first connection, and re-establishing the second connection with the second device through the wireless communication module; detecting that the second connection does not meet the stable state; restarting the wireless communication module, and re-establishing the third connection with the second device through the wireless communication module.

[0019] In this way, the method provided in the application can be realized by installing the first application.

[0020] With reference to the method provided in the first aspect, the first device is a terminal-side device, and the second device is a network-side device.

[0021] In this way, by improving the connection stability of the terminal-side device and the network-side device, the online experience of the terminal-side device can be improved.

[0022] With reference to the method provided in the first aspect, the wireless communication module is a wireless fidelity (Wi-Fi) module.

[0023] In this way, the WiFi service experience of the first device can be provided.

[0024] In a second aspect, the application provides an electronic device, which comprises one or more memories and one or more processors; the memory is coupled to the one or more processors, and the memory is used to store computer program codes, the computer program codes comprising computer instructions, and the one or more processors invoke the computer instructions to enable the electronic device to perform the method described in any one of the first aspect.

[0025] In a third aspect, the application provides a communication system, which comprises a first device and one or more second devices, and the first device comprises one or more memories and one or more processors; the memory is coupled to the one or more processors, and the memory is used to store computer program codes, the computer program codes comprising computer instructions, and the one or more processors invoke the computer instructions to enable the first device to perform the method described in any one of the first aspect.

[0026] The communication system provided in the application can further comprise more devices, which are devices that have established connections with the first device.

[0027] In a fourth aspect, the present application provides a chip applied to an electronic device, the chip comprising one or more processors configured to invoke computer instructions to cause the electronic device to perform the method described in any one of the first aspect.

[0028] In a fifth aspect, the present application provides a computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method described in any one of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0029] Figure 1 A communication system 10 involved in a production line test scenario provided by an embodiment of the present application is shown in the schematic diagram.

[0030] Figure 2 A communication system 20 involved in a product application scenario provided by an embodiment of the present application is shown in the schematic diagram.

[0031] Figure 3 A wireless connection method provided by an embodiment of the present application is shown in the schematic diagram.

[0032] Figure 4 A connection optimization method involved in a wireless connection method provided by an embodiment of the present application is shown in the schematic diagram.

[0033] Figure 5 A software architecture of an electronic device 100 provided by an embodiment of the present application is shown in the schematic diagram.

[0034] Figure 6 A hardware architecture of an electronic device 100 provided by an embodiment of the present application is shown in the schematic diagram.

[0035] Figure 7 A hardware architecture of an electronic device 200 provided by an embodiment of the present application is shown in the schematic diagram. DETAILED DESCRIPTION

[0036] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; the "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone.

[0037] Hereinafter, the terms "first", "second", "third", etc. are used only for the purpose of description, and are not to be construed as implying or suggesting relative importance or an implied indication of the number of indicated technical features. Thus, the features defined with "first", "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0038] Reference to "an embodiment" in this application means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative embodiments to each other. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the application can be combined with other embodiments.

[0039] The term "user interface (UI)" in the following embodiments of the present application is a medium interface for interaction and information exchange between an application program or an operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is source code written in a specific computer language such as Java, extensible markup language (XML), etc. The interface source code is parsed, rendered, and finally presented as content recognizable by the user on the electronic device. The commonly used form of user interface is graphic user interface (GUI), which refers to a user interface displayed in a graphical manner related to computer operation. It can be a visual interface element such as text, icon, button, menu, tab, text box, dialog box, status bar, navigation bar, Widget, etc. displayed in the display screen of the electronic device.

[0040] With the development of wireless communication technology, more and more electronic devices will use communication technologies such as WiFi, Bluetooth, etc. to establish wireless connections. However, the wireless connection established by such communication technologies is unstable and is easily affected by various factors such as environment, device hardware and software functions, etc., resulting in problems such as lag, fluctuation and disconnection of wireless connection. After the user discovers the wireless connection failure, the user needs to manually implement relevant operations to restore the wireless connection. It can be seen that during the period from the failure of the wireless connection to the restoration of the wireless connection, the time is long, which not only delays the user's online experience, but also needs to rely on manual operation to restore the wireless connection, greatly reducing the user experience.

[0041] To solve the above problems, the application provides a wireless connection method, an electronic device and a communication system. The method includes connection detection, connection self-recovery and connection optimization, and specifically includes: after the first device and the second device establish a wireless connection, the first device performs connection detection, and in the case that the connection state does not meet the stable state, connection self-recovery is performed through reconnection or through restarting and the like. Optionally, the method further includes: after the connection self-recovery is successful, the connection detection and the like are continued to be performed, and after the connection self-recovery fails, other devices are selected according to a priority order for connection. The priority is obtained by the first device based on stored connection state detection data, connection self-recovery data and the like between the first device and each device.

[0042] Further, the application provides a wireless connection method further including updating the connection detection condition, specifically including that the first device updates the detection condition, i.e., the stable state, based on the obtained connection self-recovery data. For example, when the connection self-recovery data obtained by the first device indicates that the connection self-recovery success rate is lower than a first preset ratio, the connection detection condition is relaxed; when the connection self-recovery data indicates that the connection self-recovery success rate of the first device is higher than a second preset ratio, the connection detection condition is limited, wherein the first preset ratio is smaller than the second preset ratio.

[0043] Further, the wireless connection method provided by the application can be implemented by an application / component / service installed in the electronic device, which can be provided by the system or by a third party. The system provided means that the manufacturer of the electronic device provides or develops, and the third party provided means that the manufacturer of the electronic device does not provide or develop. The manufacturer of the electronic device can include the manufacturer, supplier, provider or operator of the electronic device and the like.

[0044] Further, in an optional implementation manner, after the first device establishes a wireless connection with other devices, the method of the above connection detection, connection self-recovery and connection optimization is executed by default. In another optional implementation manner, after the first device establishes a wireless connection with other devices, whether to execute the method of the above connection detection, connection self-recovery and connection optimization is determined based on whether the corresponding function is started by the user.

[0045] The wireless connection method provided by the application can be applied to the following scenarios: the end-side device including a communication module, a communication network test production line, and the like, and the embodiments of the application do not limit the same.

[0046] Next, related concepts involved in the application are introduced:

[0047] Wireless connections, including but not limited to wireless fidelity (Wi-Fi) connections, bluetooth (BT) connections, and the like established through wireless communication technologies.

[0048] Connection detection, including but not limited to connectivity detection, signal strength detection, and the like. Connectivity can be detected, for example, through a packet internet groper (Ping). Signal strength can be detected, for example, through an ADB command, and the like.

[0049] The connection state not meeting the stable state includes that the connection is not disconnected, and the connectivity test exceeds a preset time length and / or the signal strength is less than a preset strength. The specific connection state not meeting the stable state includes that the time length obtained by N (N≥1) times of connectivity tests is greater than the preset time length, and / or the signal strength is less than the preset strength. The N times can be continuous or discontinuous. When the connection state is in the state not meeting the stable state for a long time, the connection is lagged and is prone to disconnection. Optionally, the connection state not meeting the stable state can also include a state in which the connection is disconnected.

[0050] Reconnection refers to that the first device reestablishes a connection with the current device after the first device disconnects from the current device. The reconnection usually takes a short time and does not affect the user's network communication experience, and can solve the network lag problem to a certain extent.

[0051] Restart refers to that the first device restarts the wireless communication module, for example, powers off and then powers on the wireless communication module after resetting the network factory settings, and then reestablishes a connection with the device connected before the restart. The restart can usually solve the network running failure problem of the first device, thereby solving the network lag problem.

[0052] Connection self-healing success refers to that the connection state between the first device and the device connected after the reconnection or the restart meets the stable state. Conversely, connection self-healing failure refers to that the connection state between the first device and the device connected after the reconnection or the restart still does not meet the stable state.

[0053] The connection state detection data includes but is not limited to any one or more of the following: connectivity test time length, signal strength, transmission rate, and the like corresponding to the detection object (device identifier) and the detection time.

[0054] The connection self-healing data includes but is not limited to any one or more of the following: the number of self-healings, the number of self-healing successes, the time required for self-healing success, the number of self-healings within a preset time, and the like corresponding to the self-healing object (device identifier) and the self-healing time.

[0055] The priority refers to a priority of the first device based on any one or more of the stored connection state detection data between devices, the connection self-recovery data, and the user's frequently connected device preferences. The higher the priority, the more stable the connection established with the device, and the more in line with the user's expectations. The lower the priority, the more volatile the connection established with the device, and the less in line with the user's expectations.

[0056] It can be seen that after the wireless connection method, the electronic device, and the communication system provided by the present application are implemented, the following beneficial effects can be brought about:

[0057] (1) Improving the stability of the connection. Specifically, the first device can detect the unstable connection state in advance through connection detection, and restore the connection state in time through connection self-recovery, thereby avoiding the problems of connection lag and disconnection caused by a long time in an unstable state, and improving the stability of the connection.

[0058] (2) Improving the quality of the connection. Specifically, after the connection self-recovery fails, the first device selects a corresponding device to establish a wireless connection from the available other devices, thereby ensuring the quality of the connection of the first device.

[0059] (3) Reducing the workload of manual operation and maintenance of the connection. Specifically, the connection detection, the connection self-recovery, and the connection optimization are all fully automated, and do not require human intervention for connection detection, connection maintenance, and connection selection. In this way, when the first device performs an online service, the user does not need to constantly monitor the connection state, and the normal execution of the online service can still be ensured.

[0060] Next, the device and the communication system to which the wireless connection method provided by the present application is applied are introduced.

[0061] Figure 1 An example of a communication system 10 involved in a production line test scenario is shown.

[0062] As shown in Figure 1 , the communication system 10 includes a wireless access point and a plurality of node devices. The wireless access point and the plurality of node devices are each provided with a wireless communication module, and the plurality of node devices can establish a wireless connection with the wireless access point through the wireless communication module. The wireless communication module includes a wireless local area network (WLAN), and when the wireless connection is a Wi-Fi connection, the node device can also be referred to as an end-side device, and the wireless access point can also be referred to as a network-side device.

[0063] Optionally, the communication system 10 can further include more wireless access points and node devices, etc., and the embodiments of the present application do not limit this.

[0064] In this communication system 10, multiple node devices connected to the wireless access point can be used by testers to test the wireless communication functions of the node devices. During the testing of the node devices after the wireless access device and node devices have established a connection, if a connection failure occurs and the connection is lost, it will affect the testing of the node devices. However, by using the wireless connection method provided in this application, connection stability can be ensured through connection detection and connection self-healing, thereby reducing the workload of testers on the production line and improving the testing efficiency of the node devices.

[0065] In production line testing scenarios, connectivity detection and connectivity self-healing can be performed by wireless access point devices or by node devices, and this application embodiment does not limit this.

[0066] Figure 2 An example of a communication system 10 involved in a product application scenario is shown.

[0067] like Figure 2 As shown, the communication system 20 includes: node devices and multiple wireless access points. Both the node devices and the multiple wireless access points are equipped with wireless communication modules, through which the node devices can establish wireless connections with the wireless access points. The wireless communication modules include Wireless Local Area Networks (WLANs). When the wireless connection is specifically a Wi-Fi connection, the node devices can also be referred to as end-side devices, and the wireless access points can also be referred to as network-side devices.

[0068] Optionally, the communication system 20 may also include more wireless access points and node devices, etc., and this application embodiment does not limit this.

[0069] In this communication system 20, the node device can select the optimal wireless access point to establish a connection for communication with the wireless access point and for performing internet access services. After the node device establishes a connection with the wireless access device 1, if a connection failure occurs and the connection is lost, it will affect the node device's internet access services. However, by using the wireless connection method provided in this application, connection stability can be ensured through connection detection, connection self-healing, and connection optimization, thereby improving the user's experience of using the node device to access the internet.

[0070] In product application scenarios, connectivity detection and connectivity self-healing can be performed by the product and node devices.

[0071] Based on the foregoing description of the application scenarios of wireless communication system 10 and communication system 20, it can be understood that the device forms of the aforementioned node devices and wireless access points can be as follows.

[0072] Node devices may include, but are not limited to: carrying Or other portable terminal devices with different operating systems, such as mobile phones, tablets, desktop computers, laptops, handheld computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices and / or smart city devices, etc.

[0073] Wireless access points can include, but are not limited to: routers, devices equipped with... Or portable terminal devices with other operating systems, such as mobile phones, tablets, etc.

[0074] Next, combined Figure 3 The wireless connection method provided in this application will be described in detail using a product application scenario as an example. The implementation of this wireless connection method in production line testing scenarios is similar to the following description, and will not be repeated here.

[0075] refer to Figure 3 , Figure 3 An example is shown of a wireless connection method provided in this application.

[0076] like Figure 3 As shown, the method includes the following steps. The first device involved in the method is the node device in the aforementioned communication system 20, and the second and third devices involved in the method are wireless access point 1, wireless access point 2, etc. in the aforementioned communication system 20.

[0077] S31, the first device establishes a connection with the second device.

[0078] Specifically, based on user operation, the first device can establish a connection with the second device via wireless communication technology. Alternatively, without user operation, if the electronic device has its wireless communication function enabled and the communication distance between the first and second devices meets the requirements, the first device can also automatically connect to the second device via wireless communication technology. In the embodiments of this application, the connection established between the first device and the second device in S31 can also be referred to as the first connection.

[0079] The user operation triggering the first device to connect to the second device includes, but is not limited to, an operation on a second device option, an operation of scanning a label of the second device, an operation of inputting, for example, an ADB command to the first device, and the like. Embodiments of the present application do not limit the scenario of triggering the first device to connect to the second device.

[0080] The wireless communication technology includes, but is not limited to, any one or more of the following: Wi-Fi, BT, NFC, and the like.

[0081] The connection includes, but is not limited to, a Wi-Fi connection, a BT connection, and the like. Hereinafter, a Wi-Fi connection is exemplarily introduced, and embodiments of the present application do not limit the connection.

[0082] S32, the first device detects whether the connection state between the first device and the second device meets a stable state.

[0083] Specifically, the first device can periodically (i.e., periodically polling) detect whether the connection state between the first device and the second device meets the stable state.

[0084] When it is detected that the connection state between the first device and the second device does not meet the stable state, the first device executes subsequent S33-S37. When it is detected that the connection state between the first device and the second device meets the stable state, the first device does not execute subsequent S33-S37, and continues to execute S32, i.e., polling to detect the connection state.

[0085] The detection method includes detecting connectivity by Ping and detecting signal strength by an ADB command, and the like. Embodiments of the present application do not limit the specific command used for the connectivity test and the signal strength test. In different platforms, the command used can be different.

[0086] The stable state can be stored in a connection detection module of the first device. Specifically, the state that does not meet the stable state includes that a time length obtained by performing connectivity test for N (N≥1) times continuously is greater than a preset time length, and / or the signal strength is less than a preset strength. The state that meets the stable state includes that the time length obtained by performing the connectivity test is less than or equal to the preset time length, and / or the signal strength is greater than or equal to the preset strength. The preset time length can be, for example, 100 ms, and the preset strength can be, for example, -75 dbm. Embodiments of the present application do not limit the specific values.

[0087] Optionally, the first device automatically performs the connection state detection in S32 after establishing the connection with the other device, and then detects the unstable connection state in time to perform the subsequent connection self-recovery and connection optimization. Alternatively, the first device performs the connection state detection in S32 after establishing the connection with the other device, and determines whether to start the corresponding function, and only when it is determined to start the corresponding function, the connection state detection in S32 is performed. The corresponding function is specifically provided by an application / component / service installed in the electronic device.

[0088] S33, the first device re-establishes the connection with the second device.

[0089] Specifically, after the first device detects that the connection state with the second device does not meet the stable state, the first device performs connection self-recovery, which includes preliminary self-recovery and further self-recovery. The preliminary self-recovery includes re-establishing the connection, and the further self-recovery includes restarting and then re-establishing the connection. The further self-recovery is performed when the connection state still does not meet the stable state after the preliminary self-recovery. Therefore, in S33, the first device specifically performs the preliminary self-recovery, that is, disconnects the connection with the second device, and then re-establishes the connection with the second device.

[0090] In the embodiments of the present application, the connection re-established by the first device and the second device in S33 can also be referred to as a second connection.

[0091] S34, the first device detects whether the connection state between the first device and the second device meets the stable state.

[0092] Specifically, S34 is similar to the execution method of the foregoing S32, and the difference is that the connection detected in S32 is the connection established between the first device and the second device before self-recovery, and the connection detected in S34 is the connection established between the first device and the second device after the preliminary self-recovery.

[0093] When it is detected that the connection state after reconnection with the second device does not meet the stable state, the first device performs the subsequent S35-S37, and when it is detected that the connection state after reconnection with the second device meets the stable state, the first device does not perform the subsequent S35-S37, but jumps to continue to perform S32, that is, polls the connection state.

[0094] S35, the first device re-establishes the connection with the second device after restarting the wireless communication module.

[0095] Specifically, after the first device detects that the connection state after reconnection with the second device does not meet the stable state, the first device performs further self-recovery, that is, restarts the wireless communication module of the first device, for example, powers off and then powers on the wireless communication module after resetting the network factory settings, and then re-establishes the connection with the device connected before the restart.

[0096] In the embodiments of the present application, the connection re-established by the first device after restarting the wireless communication module and the second device in S35 can also be referred to as a third connection.

[0097] S36, the first device detects whether the connection state between the first device and the second device meets the stable state.

[0098] Specifically, S36 is similar to the execution methods of the aforementioned S32 and S34. The difference among the three is that: the connection detected in S32 is the connection established by the first device and the second device before the preliminary self-healing, or after the preliminary self-healing and the successful self-healing, or after the further self-healing and the successful self-healing; the connection detected in S34 is the connection established by the first device and the second device after the reconnection before the further self-healing; and the connection detected in S36 is the connection established by the first device and the second device after the reconnection after the further self-healing.

[0099] When it is detected that the connection state of the first device and the second device after the restart does not meet the stable state, the first device executes the subsequent S37; when it is detected that the connection state of the first device and the second device after the restart meets the stable state, the first device does not execute the subsequent S37, but jumps to continue to execute S32, i.e., polling the detection of the connection state.

[0100] S37, the first device establishes a connection with a third device having the highest priority.

[0101] Specifically, after the self-healing of the connection between the first device and the second device fails, the first device selects a third device having the highest priority from the other connectable devices to establish a connection.

[0102] The priority is obtained by the following method: after the first device establishes a connection with each device, the first device records the connection state detection data and the connection self-healing data during the execution of the connection state detection and the connection self-healing processes described in the aforementioned S32-S36, or the first device also records the user's preference for frequently connected devices, and based on any one or more of these data, the first device prioritizes the connected devices, and periodically updates the priority based on the updated data.

[0103] In the embodiments of the present application, the connection established by the first device and the third device having the highest priority in S37 can also be referred to as a fourth connection.

[0104] Optionally, after the first device establishes a connection with the third device, the first device continues to perform the connection state detection, the connection self-healing, and the connection optimization of the third device, and the specific description can be referred to the aforementioned S36-S37, which will not be described here.

[0105] The steps S36-S37 above are optional. That is, the wireless connection method provided in this application may only include the connection detection and connection self-healing stages, or the wireless connection method provided in this application may include the connection detection, connection self-healing and connection optimization stages.

[0106] Regarding the method for the first device to perform the connection optimization described in S37 above, please refer to the following text for details. Figure 4 The description.

[0107] Figure 4 An exemplary embodiment illustrates a connection optimization method involved in the wireless connection method provided in this application.

[0108] like Figure 4 As shown, the method includes the following steps:

[0109] S41, the first device stores information about the devices with established connections.

[0110] Specifically, during the process of establishing a connection with the peer device, the first device will obtain information about the peer device, including but not limited to: device identifier, protocol type, and connection mode.

[0111] The peer devices include, but are not limited to, the second and third devices mentioned above. Device identification includes, for example, device name and network address. Protocol types include, but are not limited to, IEEE 802.11a, 802.11b, 802.11n, 802.11ac, 802.11ax, and some other self-developed protocols. Connection modes include automatic connection and manual connection. Automatic connection means that when the first device detects that the connection conditions are met, the first device can directly connect to the device without manual user intervention. Manual connection means that a connection can only be established with the device after user input.

[0112] S42, The first device stores connection status detection data with the connected devices.

[0113] Specifically, after establishing a connection with the peer device, the first device will perform connection status detection as described in S32, S34 and S36 above. Therefore, the first device will also store connection status detection data, which includes, but is not limited to, any one or more of the following: the detection object (device identifier) ​​and the detection time, the connectivity test duration, signal strength, transmission rate, etc.

[0114] S43, the first device stores connection self-healing data with connected devices.

[0115] Specifically, after the first device detects the connection state of the established connection, if the connection state does not conform to the stable state, the first device performs the connection self-recovery as described in S33 and S35. Therefore, the first device also stores connection self-recovery data, which includes but is not limited to any one or more of the following: the number of self-recoveries, the number of successful self-recoveries, the time required for a successful self-recovery, the number of self-recoveries within a preset time, and the like corresponding to the self-recovery object (device identifier) and the self-recovery time.

[0116] S44, the first device obtains the user's preference for the frequently connected device.

[0117] Specifically, the first device can calculate the connection frequency of the connected devices, and if a device is connected more frequently, it is determined that the user prefers to connect the device. Alternatively, the first device can also provide a setting item for the frequently connected device, and then based on the user's setting operation, the user's setting for the frequently connected device is regarded as the device that the user prefers to connect.

[0118] In the embodiments of the present application, S44 is an optional operation.

[0119] In the embodiments of the present application, the order of S41-S44 performed by the first device is not limited, and the first device can perform S41-S44 simultaneously or in any other order, which is not limited in the embodiments of the present application.

[0120] S45, the first device determines the priority of each device based on any one or more of the connection state detection data, the connection self-recovery data, or the user's preference for the frequently connected device.

[0121] Specifically, the first device can periodically determine the priority of each device based on any one or more of the latest stored connection state detection data, connection self-recovery data, and user's preference for the frequently connected device. The higher the priority of a device, the more stable the connection established between the first device and the device, and the more in line with the user's expectations; the lower the priority, the more likely the connection established between the first device and the device to fluctuate, and the less in line with the user's expectations.

[0122] When the first device determines the priority based on the connection state detection data, the connection self-recovery data, and the user's preference for the frequently connected device, the priority can be determined according to the following order from high to low according to the importance of the factors: the signal strength of the connection, the user's preference, the number of self-recoveries and the time required for a successful self-recovery, and the number of self-recoveries within a preset time (i.e., the number of times the connection state does not conform to the stable state within a preset time).

[0123] Next, the software and hardware architecture of the electronic device related in the present application is introduced.

[0124] The software system of the first device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered architecture. Taking the system as an example, the software structure of the first device is illustrated.

[0125] Figure 5 This is a schematic diagram of the software architecture of the first device according to an embodiment of this application.

[0126] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, [the following is omitted as the text is incomplete and likely refers to a specific implementation or feature]. The system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime layer, and the application application framework layer. runtime and system libraries, as well as the kernel layer.

[0127] The application layer can include a series of application packages.

[0128] like Figure 5 As shown, the application package may include a wireless connectivity application (also referred to as the first application), and Figure 5 Automated testing, not shown, is used for applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0129] The name of the wireless connection application is merely an example. It is mainly used to provide a solution for the wireless connection method described in this application, including establishing a connection, detecting the connection status, connection self-healing, connection optimization, and updating detection conditions, etc.

[0130] Wireless connectivity applications include, but are not limited to, the following modules: connectivity module, encoding protocol, detection module, self-healing module, optimization module, and update module, etc.

[0131] The connection module is mainly used to obtain device information and parse the device information according to the encoding protocol, and establish a wireless connection with the device based on the parsed device information according to the encoding protocol used.

[0132] The encoding protocol is mainly used to store supported protocols, including but not limited to self-developed protocols and standard protocols such as IEEE 802.11a, 802.11b, 802.11n, 802.11ac, 802.11ax, etc. This self-developed protocol is mainly used by electronic device 100 to establish wireless connections with other devices to achieve wireless functionality.

[0133] The detection module is mainly used for detecting the connection state after the connection module successfully establishes a connection with the opposite device, such as the electronic device 200, including but not limited to detecting connectivity, signal strength, etc. through a Ping command. In addition, the detection module is also used to store the detected connection state data for the optimization module to prioritize the connectable devices.

[0134] The self-healing module is mainly used for connection self-healing after detecting that the connection state does not meet the stable state, including preliminary self-healing and reconnection through self-healing stage 1, and further self-healing through self-healing stage 2 after the preliminary self-healing fails, that is, controlling the wireless connection module to power off and then power on to establish a connection again. In addition, the self-healing module is also used to store the self-healing data for the optimization module to prioritize the connectable devices.

[0135] The optimization module is mainly used for prioritizing the multiple connectable devices, and selecting the highest priority device from the connectable devices to establish a connection after the further self-healing of the self-healing module fails.

[0136] The update module is mainly used for updating the detection conditions of the connection module according to the self-healing detection data, for example, when the connection self-healing data obtained by the first device indicates that the connection self-healing success rate is lower than a first preset ratio, the connection detection conditions are relaxed, for example, the preset time length of the connectivity test is lengthened, and / or the signal strength less than the preset strength is reduced, that is, the stable state is modified from the original first stable state to a second stable state. The range of the second stable state is greater than the range of the first stable state, so that the normal communication of the electronic device 100 can be avoided due to too strict detection conditions; when the connection self-healing data indicates that the connection self-healing success rate of the first device is higher than a second preset ratio, the connection detection conditions are limited, for example, the preset time length of the connectivity test is reduced, and / or the signal strength less than the preset strength is increased, that is, the stable state is modified from the original first stable state to a second stable state. The range of the second stable state is less than the range of the first stable state. The first preset ratio is less than the second preset ratio, so that the wireless connection established can have high stability and high quality, and the user experience can be improved.

[0137] The automatic test is usually used in the production line of the electronic device 100, and the automatic test is not provided at the user end after the product goes online, so it is not expanded here.

[0138] The application framework layer provides an application programming interface (API) and a programming framework for the application of the application layer. The application framework layer includes some pre-defined functions.

[0139] AsFigure 5 As shown, the application framework layer can include a Wi-Fi interface, a BT interface, and Figure 5 (not shown) a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.

[0140] The Wi-Fi interface is used to control the lower layer Wi-Fi driver based on the call of the upper layer application to deliver the service based on the upper layer application.

[0141] The BT interface is used to control the lower layer Wi-Fi driver based on the call of the upper layer application to deliver the service based on the upper layer application.

[0142] The window manager is used to manage the window program. The window manager can acquire the display screen size, determine whether there is a status bar, lock the screen, and intercept the screen, etc.

[0143] The content provider is used to store and acquire data, and make the data accessible by the application program. The data can include video, image, audio, dialed and received phone, browsing history and bookmark, phone book, etc.

[0144] The view system includes visual controls, such as a control for displaying text, a control for displaying pictures, etc. The view system can be used to build the application program. The display interface can be composed of one or more views. For example, the display interface including the short message notification icon can include the view for displaying text and the view for displaying pictures.

[0145] The phone manager is used to provide the communication function of the first device. For example, the management of the call state (including connection, hang-up, etc.).

[0146] The resource manager provides various resources for the application program, such as localized strings, icons, pictures, layout files, video files, etc.

[0147] The notification manager makes the application program display the notification information in the status bar, which can be used to convey the message of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be the notification in the form of chart or scrolling text in the top status bar of the system, such as the notification of the application program running in the background, and can also be the notification in the form of dialogue window appearing on the screen. For example, the text information is prompted in the status bar, the prompt sound is emitted, the first device vibrates, the indicator light flashes, etc.

[0148] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0149] The core library includes two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

[0150] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, security and exception management, and garbage collection.

[0151] The system library can include a plurality of functional modules. For example: surface manager, media library, three-dimensional graphics processing library (for example: OpenGL ES), two-dimensional (2D) graphics engine (for example: SGL) and the like.

[0152] The surface manager is used to manage the display subsystem, and provides a fusion of 2D and 3D layers for a plurality of applications.

[0153] The media library supports a plurality of commonly used audio, video format playback and recording, and static image files and the like. The media library can support a plurality of audio and video coding formats, for example: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG and the like.

[0154] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing and the like.

[0155] The 2D graphics engine is a drawing engine for 2D drawing.

[0156] The kernel layer is a layer between hardware and software. The kernel layer at least includes Wi-Fi driver, BT driver, display driver, camera driver, and Figure 5 The audio driver, sensor driver and the like are not shown.

[0157] The electronic device 100 can call the WiFi interface through the wireless connection apk of the upper layer to control the work of the Wi-Fi driver, and the Wi-Fi driver can be used to control the work of the Wi-Fi chip, thereby realizing the establishment of the Wi-Fi connection.

[0158] Reference Figure 6 , Figure 6 An exemplary output is provided in the software architecture diagram of the electronic device 100. In the embodiment of the present application, the hardware architecture of the node device can refer to the description of the electronic device 100 as follows.

[0159] The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a camera 193, and a display screen 194, etc. The sensor module 180 can include a pressure sensor 180A, a touch sensor 180B, etc.

[0160] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0161] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated into one or more processors.

[0162] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching instructions and executing instructions.

[0163] The memory in the processor 110 can also be provided for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thus improving the efficiency of the system.

[0164] In the embodiments of the present application, the electronic device 100 can call other software and hardware modules through the processor 110 to perform the above-mentioned functions Figures 3-4 The connection method is not described here.

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

[0166] The USB interface 130 is an interface that conforms to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect earphones to play audio through the earphones. The interface can also be used to connect other electronic devices 100, such as AR devices, etc.

[0167] In the embodiments of the present application, the electronic device 100 can establish a connection with other control devices through the USB interface 130, and then receive commands input by the control device, such as ADB commands, etc.

[0168] It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or combinations of multiple interface connection methods in the above-mentioned embodiments.

[0169] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments with wired charging, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some embodiments with wireless charging, the charging management module 140 can receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 and power the electronic device 100 through the power management module 141.

[0170] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160, etc. The power management module 141 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.

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

[0172] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.

[0173] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and radiate as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.

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

[0175] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, demodulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.

[0176] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).

[0177] In the embodiments of the present application, the electronic device can be coupled through the antenna 2 and the wireless communication module 160, so that the electronic device 100 can establish a connection with the electronic device 200 through wireless communication technology, such as Wi-Fi technology.

[0178] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.

[0179] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be made of a liquid crystal display (LCD). The display panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a miniled, a micro Led, a micro-oled, a quantum dot light emitting diodes (QLED), and the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0180] The electronic device 100 can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, and the like.

[0181] The ISP is configured to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also algorithmically optimize the noise and brightness of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

[0182] The camera 193 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard RGB, YUV, and the like format image signal. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0183] In the embodiments of the present application, the electronic device 100 can scan the label of the to-be-connected device through the camera, to parse the information of the to-be-connected device, so as to enable the wireless communication module to establish wireless connection.

[0184] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point, etc.

[0185] The video codec is used to compress or decompress digital video. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0186] The NPU is a neural-network (NN) computing processor, which can quickly process input information by drawing on the structure of biological neural networks, such as drawing on the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, the electronic device 100 can realize intelligent cognition and other applications, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0187] The internal memory 121 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs).

[0188] The random access memory can include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation of DDR SDRAM is generally referred to as DDR5 SDRAM), etc.

[0189] The non-volatile memory can include a magnetic disk storage device, a flash memory.

[0190] According to the operation principle, the flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. According to the potential order of the storage unit, the flash memory can include single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. According to the storage specification, the flash memory can include universal flash storage (UFS), embedded multi media card (eMMC), etc.

[0191] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other programs running, and can also be used to store data of a user and an application program, etc.

[0192] The non-volatile memory can also store executable programs and data of a user and an application program, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 110.

[0193] The external memory interface 120 can be used to connect an external non-volatile memory, so as to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120, so as to realize a data storage function. For example, files such as music and videos are saved in the external non-volatile memory.

[0194] In the embodiments of the present application, the electronic device 100 can store wireless connection related data through the above-mentioned memories, including but not limited to: connection device identification, connection state detection data, connection self-healing data, user frequently connected device preference and priority, etc.

[0195] The electronic device 100 can realize an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor, etc. For example, music playing, recording, etc.

[0196] The audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode an audio signal. In some embodiments, the audio module 170 can be arranged in the processor 110, or part of the function modules of the audio module 170 can be arranged in the processor 110.

[0197] The speaker 170A, also called a "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0198] The receiver 170B, also called a "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 100 answers a call or a voice message, the receiver 170B can be held close to a human ear to listen to the voice.

[0199] The microphone 170C, also called a "microphone", "sound collector", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, a user can speak into the microphone 170C through the human mouth to input a sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, noise reduction functions can also be realized. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, to realize the collection of sound signals, noise reduction, and also to identify the source of the sound, to realize the function of directional recording, etc.

[0200] The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0201] The pressure sensor 180A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. The pressure sensor 180A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.

[0202] The touch sensor 180B, also referred to as a "touch panel". The touch sensor 180B can be disposed on the display screen 194, and the touch sensor 180B and the display screen 194 together form a touch screen, also referred to as a "touch panel". The touch sensor 180B is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor 180B can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180B can also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0203] In embodiments of the present application, the electronic device 100 can receive an operation of selecting a connection device by a user through the touch sensor 180B, and receive an operation of starting a connection detection, self-healing, optimization, etc.

[0204] The keys 190 include a power-on key, a volume key, etc. The keys 190 can be mechanical keys. They can also be touch keys. The electronic device 100 can receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0205] A hardware architecture of an electronic device 200 is described below. In embodiments of the present application, the hardware architecture of an access point can refer to the description of the electronic device 200 below.

[0206] Figure 7 A hardware structure diagram of an electronic device 200 is shown in embodiments of the present application.

[0207] As Figure 7 shown, the electronic device 200 can include a processor 201, a memory 202, a wireless communication module 203, an antenna 205, a power management module 206. Among them:

[0208] The processor 201 can include one or more processing units, for example: the processor 201 can include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processing unit (neural-network processing unit, NPU) and the like. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0209] Among them, the controller can be the nerve center and command center of the electronic device 200. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of instruction fetching and instruction execution.

[0210] The memory in the processor 201 can also be provided to store instructions and data. In some embodiments, the memory in the processor 201 is a cache memory. The memory can save instructions or data that the processor 201 has just used or repeatedly uses. If the processor 201 needs to use the instructions or data again, it can be directly called from the memory. Avoid repeated access and reduce the waiting time of the processor 201, thus improving the efficiency of the system.

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

[0212] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0213] In some embodiments, the processor 201 can be used to parse the signals received by the wireless communication module 203 and demodulate the signals. The processor 201 can respond according to the parsing results and perform corresponding operations, such as establishing a connection with the electronic device 100. In some embodiments, the processor 201 can also be used to generate signals that the wireless communication module 203 transmits, such as Wi-Fi signals.

[0214] Memory 202 is coupled to processor 201 and is used to store various software programs and / or sets of instructions. In specific implementations, memory 202 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 202 may store an operating system, such as uCOS, VxWorks, RTLinux, or other embedded operating systems. Memory 202 may also store communication programs that can be used to communicate with electronic device 200 or other devices.

[0215] The wireless communication module 203 can include a WLAN communication module 204. The WLAN communication module 204 can provide a solution for Wi-Fi wireless communication applied on the electronic device 200. In this regard, the Wi-Fi protocol used in the WLAN communication module 204 can be IEEE 802.11a, 802.11b, 802.11n, 802.11ac, 802.11ax, etc.

[0216] Optionally, the wireless communication module 203 can further include other communication modules to provide solutions for other wireless communication (e.g., Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR)).

[0217] Optionally, the WLAN communication module 204 can be integrated with other communication modules (e.g., a Bluetooth communication module). The WLAN communication module 204 can detect signals (e.g., measurement signals, scanning signals, etc.) transmitted by other devices (e.g., the electronic device 200) and can transmit response signals (e.g., measurement responses, scanning responses, etc.) so that the other devices can discover the electronic device 200 and establish a wireless communication connection with the electronic device 200 through one or more of WLAN, Bluetooth, or other near field wireless communication technologies for data transmission.

[0218] In some embodiments, one or more of the WLAN communication module 204 can also transmit signals (e.g., broadcast probe signals, beacon signals) so that other devices can discover the electronic device 200 and establish a wireless communication connection with the electronic device 200 through WLAN or other near field wireless communication technologies for data transmission.

[0219] The antenna 205 can be used to transmit and receive electromagnetic wave signals. The antennas of different communication modules can be multiplexed or independent of each other to improve the utilization rate of the antennas.

[0220] The power management module 206 can be used to control the power supply of the electronic device 200. In this regard, the power supply can be a battery or an external power supply.

[0221] In some embodiments, the hardware structure of the electronic device 200 can further include an audio module (not shown in FIG. 2) and a speaker (not shown in FIG. 2). Figure 7 Figure 7 ​The audio module is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module can also be configured to encode and decode audio signals. The speaker, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal.

[0222] In some embodiments, the hardware structure of the electronic device 200 can further include a microphone (not shown in FIG. 2). Figure 7 The microphone, also referred to as a "microphone", "microphone", is configured to convert a sound signal into an electrical signal. When making a phone call or sending voice information, the user can make a sound by putting the mouth close to the microphone, and input the sound signal into the microphone. The electronic device 200 can be provided with at least one microphone.

[0223] In some embodiments, the hardware structure of the electronic device 200 can further include a display screen (not shown in FIG. 2). Figure 7 The display screen is configured to display images, videos, etc. The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), etc. In some embodiments, the terminal can include one or N display screens, N being a positive integer greater than 1.

[0224] In some embodiments, the hardware structure of the electronic device 200 can further include one or more sensors (not shown in FIG. 2). Figure 7 The one or more sensors can include one or more of a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0225] It should be noted that, Figure 7 The electronic device 200 shown is only one implementation of the embodiments of the present application, and in actual applications, the electronic device 200 can further include more or fewer components, which are not limited here.

[0226] It should be understood that each step in the above method embodiments provided by the present application can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The method steps disclosed in combination with the embodiments of the present application can be directly embodied as hardware processor execution or combined execution by hardware and software modules in the processor.

[0227] The present application also provides an electronic device, which can include a memory and a processor. The memory can be used to store a computer program, and the processor can be used to invoke the computer program in the memory to enable the electronic device to perform the method in any one of the above embodiments.

[0228] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method performed by the electronic device in any one of the above embodiments.

[0229] In a possible design, the chip system further includes a memory for storing program instructions and data, and the memory is located in the processor or outside the processor.

[0230] The chip system can be composed of a chip, or can include a chip and other discrete devices.

[0231] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software codes stored in the memory.

[0232] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor, or can be separately arranged from the processor, and the embodiments of the present application do not make any specific limitation. For example, the memory can be a non-transient processor, such as a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be separately arranged on different chips, and the embodiments of the present application do not make any specific limitation on the type of the memory and the arrangement manner of the memory and the processor.

[0233] Exemplarily, the chip system can be a field programmable gate array (FPGA), can be an application specific integrated circuit (ASIC), can also be a system on chip (SoC), can also be a central processor unit (CPU), can also be a network processor (NP), can also be a digital signal processor (DSP), can also be a micro controller unit (MCU), can also be a programmable logic device (PLD) or other integrated chip.

[0234] The present application also provides a computer program product, which comprises a computer program (also referred to as code or instruction), which, when executed, causes a computer to perform the method performed by the electronic device in any one of the above embodiments.

[0235] The present application also provides a computer readable storage medium, which stores a computer program (also referred to as code or instruction). When the computer program is executed, it causes a computer to perform the method performed by the electronic device in any one of the above embodiments.

[0236] The embodiments of the present application can be combined in any manner to achieve different technical effects.

[0237] In the above embodiments, all or part of the processes can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the processes can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes described in the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), etc.

[0238] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiments can be implemented by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The storage medium includes ROM or random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.

[0239] In summary, the above only describes the embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present application shall be included in the protection scope of the present application.

Claims

1. A wireless connection method, characterized in that, The method is applied to a first device including a wireless communication module, the method comprising: A first connection is established with the second device through the wireless communication module; The first connection was detected to be inconsistent with the stable state; the first connection being inconsistent with the stable state includes: when the first connection is not disconnected, the connectivity test exceeds a preset duration and / or the signal strength is less than a preset strength; Disconnect the first connection and re-establish a second connection with the second device through the wireless communication module; The second connection was detected to be inconsistent with the stable state; Restart the wireless communication module to re-establish a third connection with the second device; The stable state is updated based on one or more of the following: the number of times the first device re-establishes the connection, the time required to re-establish the connection, or the ratio of re-established connections conforming to the stable state. When the ratio of re-established connections with the second device conforming to the stable state is lower than a first preset ratio, the range of the updated stable state is greater than the range of the stable state before the update; when the ratio of re-established connections with the second device conforming to the stable state is higher than a second preset ratio, the range of the updated stable state is less than the range of the stable state before the update; wherein, the first preset ratio is less than the second preset ratio.

2. The method according to claim 1, characterized in that, The following conditions are not met: the connection is not broken, and the N connectivity tests exceed the preset duration and / or the signal strength is less than the preset strength, where N≥1.

3. The method according to claim 1 or 2, characterized in that, The method further includes: The third connection was detected to be inconsistent with the stable state; A fourth connection is established with a third device through the wireless communication module.

4. The method according to claim 3, characterized in that, The third device is the highest priority device among the devices that the first device can connect to. The priority of the device is determined based on one or more of the following: the connectivity test duration, signal strength, and transmission rate of the devices historically connected to the first device, the number of times the connection was re-established, the time required to re-establish the connection, the ratio of re-establishment to the stable state, or user settings.

5. The method according to claim 1, characterized in that, Before detecting that the connection state of the first connection does not conform to a stable state, the method further includes: First operation received.

6. The method according to claim 1, characterized in that, The first device also includes a first application, through which the first device performs the following: The first connection was detected to be inconsistent with the stable state. Disconnect the first connection and re-establish the second connection with the second device through the wireless communication module; The second connection was detected to be inconsistent with the stable state; Restart the wireless communication module to re-establish the third connection with the second device.

7. The method according to claim 1, characterized in that, The first device is a terminal-side device, and the second device is a network-side device.

8. The method according to claim 1, characterized in that, The wireless communication module is a Wi-Fi module.

9. An electronic device, characterized in that, The electronic device includes one or more memories and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-4.

10. A communication system, characterized in that, The communication system includes a first device and a second device. The first device includes one or more memories and one or more processors. The memory is coupled to the one or more processors and is used to store computer program code, which includes computer instructions. The one or more processors invoke the computer instructions to cause the first device to perform the method as described in any one of claims 1-4.

11. A chip, said chip being used in an electronic device, characterized in that, The chip includes one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-4.

12. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Network reconnection method and device, terminal equipment and storage medium

    CN115278932A