Wireless connection method, electronic equipment and communication system
By implementing connection detection and self-healing mechanisms in wireless communication devices, wireless connection stability and quality problems are solved, and higher connection stability and user experience are achieved.
Patent Information
- Application Number
- CN202311199638.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2043-09-15
AI Technical Summary
The existing wireless communication technology has quality and stability problems when establishing wireless connections, which are prone to problems of lag and disconnection, and users need to manually restore the connection.
After the first device establishes a wireless connection with the second device, the connection detection and self-healing mechanism are used to detect whether the connection state meets the stable state. If it does not meet, the connection will be self-healed through reconnection or restart, and after the self-healing failure, other devices will be selected in priority order for connection.
It improves the stability and quality of wireless connections, reduces the occurrence of connection lags and disconnects, reduces the workload of users' manual operation and maintenance, and improves the user experience.
Smart Images

Figure CN119697805A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals, and in particular to a wireless connection method, electronic equipment and a communication system. Background Art
[0002] Currently, wireless communication technologies are widely used, such as WiFi communication technology, Bluetooth communication technology, etc. Users have high quality and high stability requirements for wireless connections established using these wireless communication technologies. How to improve the quality and stability of wireless connections is an urgent problem to be solved. Summary of the invention
[0003] The present application provides a wireless connection method, electronic device and communication system. Specifically, it includes: after the first device establishes a wireless connection with the second device, the first device performs a connection detection, and when it is detected that the connection state does not meet the stable state, the connection self-healing is performed by reconnecting or restarting. Optionally, the method also includes: after the connection self-healing is successful, the connection detection is continued, and after the connection self-healing fails, other devices are selected for connection according to the priority order.
[0004] In a first aspect, the present application provides a wireless connection method, which is applied to a first device including a wireless communication module, and the method includes: establishing a first connection with a second device through the wireless communication module; detecting that the first connection does not conform to 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 conform to 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 implementing the method provided in the first aspect, the stability of the connection can be improved. Specifically, the first device can detect in advance the situation of unstable connection state through connection detection, and can restore the connection state in time through connection self-healing, avoiding the problem of connection jamming and connection disconnection caused by being in an unstable state for a long time, thereby improving the stability of the connection. In combination with the method provided in the first aspect, not meeting the stable state includes: the connection is not disconnected, and the connectivity test exceeds the preset time and / or the signal strength is less than the preset strength; the connection includes the first connection, the second connection or the third connection.
[0006] In this way, whether the connection status is stable can be detected in multiple ways, thereby improving the accuracy of connection status detection.
[0007] In combination with the method provided in the first aspect, not meeting the stable state includes: the connection is not disconnected, and N connectivity tests exceed a preset time length and / or the signal strength is less than a preset strength, N≥1.
[0008] In this way, occasional connection instability can be eliminated and the accuracy of connection status detection can be further improved.
[0009] In combination with the method provided in the first aspect, the method further includes: detecting that the third connection does not conform to the stable state; and establishing a fourth connection with the third device through the wireless communication module.
[0010] In this way, the quality of the connection can be improved. Specifically, after the connection self-healing fails, the first device selects a corresponding device from other available devices to establish a wireless connection, thereby ensuring the quality of the connection of the first device.
[0011] In combination with the method provided in the first aspect, the third device is the device with the highest priority among the devices that the first device can connect to, and the priority of the device is determined based on any one or more of the following: the connectivity test duration, signal strength, transmission rate of the first device's historical connection devices, the number of times the connection is re-established, the time required to re-establish the connection, the ratio of the re-established connection to the stable state, or user settings.
[0012] In this way, the priority of the device can be comprehensively determined through multi-dimensional detection data and user habits, further ensuring the stability and quality of the connection established with the new device.
[0013] In combination with the method provided in the first aspect, the stable state is a first stable state, and the method also includes: updating the first stable state to a second stable state based on any one or more of the number of times the first device re-establishes the connection, the time required to re-establish the connection, or the ratio of re-establishing the connection that meets the stable state.
[0014] In combination with the method provided in the first aspect, when the ratio of re-establishing the connection to comply with the stable state is lower than a first preset ratio, the range of the second stable state is greater than the range of the first stable state; when the ratio of re-establishing the connection to comply with the stable state is higher than a second preset ratio, the range of the second stable state is less than the range of the first stable state, wherein the first preset ratio is less than the second preset ratio.
[0015] In this way, it is possible to avoid detection conditions being too stringent to affect normal communication of the first device, and to avoid detection conditions being too loose, thereby ensuring that the established wireless connection has high stability and quality, thereby improving user experience.
[0016] In combination with the method provided in the first aspect, before detecting that the connection state of the first connection does not conform to the stable state, the method further includes: receiving a first operation.
[0017] In this way, a switch can be provided to determine whether to enable functions such as connection detection and self-healing according to the user's switch operation (also called the first operation) to meet the user's personalized needs.
[0018] In combination with the method provided in the first aspect, the first device also includes a first application, and the first device performs the following through the first application: detecting that the first connection does not conform to 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 conform to 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 this application can be implemented by installing the first application.
[0020] In combination with 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 between the terminal side device and the network side device, the Internet experience of the terminal side device can be improved.
[0022] In combination with the method provided in the first aspect, the wireless communication module is a Wireless Fidelity Wi-Fi module.
[0023] In this way, a WiFi service experience of the first device can be provided.
[0024] In a second aspect, the present application provides an electronic device, comprising 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 comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes a method as described in any one of the first aspects.
[0025] In a third aspect, the present application provides a communication system, which includes a first device and one or a second device, the first device including 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 includes computer instructions, and the one or more processors call the computer instructions to enable the first device to perform a method as described in any one of the first aspects.
[0026] The communication system provided in the present application may further include more devices, where the more devices are devices with which the first device has established a connection.
[0027] In a fourth aspect, the present application provides a chip, which is applied to an electronic device, and the chip includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute any method described in the first aspect.
[0028] In a fifth aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, causes the electronic device to execute a method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of a communication system 10 involved in a production line test scenario provided in an embodiment of the present application;
[0030] Figure 2 A schematic diagram of a communication system 20 involved in a product application scenario provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of a wireless connection method provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of a connection optimization method involved in a wireless connection method provided in an embodiment of the present application;
[0033] Figure 5 A schematic diagram of a software architecture of an electronic device 100 provided in an embodiment of the present application;
[0034] Figure 6 A schematic diagram of the hardware architecture of an electronic device 100 provided in an embodiment of the present application;
[0035] Figure 7 A schematic diagram of the hardware architecture of an electronic device 200 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0037] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0038] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0039] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or 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 a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
[0040] With the development of wireless communication technology, more and more electronic devices will use communication technologies such as WiFi and Bluetooth to establish wireless connections. However, the wireless connection established by this type of communication technology is unstable and easily affected by various factors such as the environment, device hardware and software functions, resulting in problems such as freezes, fluctuations, and disconnections in the wireless connection. After the user discovers a wireless connection failure, the user needs to manually perform relevant operations to restore the wireless connection. It can be seen that it takes a long time from the occurrence of a wireless connection failure to the restoration of the wireless connection, which not only delays the user's Internet experience, but also requires manual operation and maintenance to restore the wireless connection, greatly reducing the user experience.
[0041] In order to solve the above problems, the present application provides a wireless connection method, an electronic device and a communication system. The method includes connection detection, connection self-healing and connection optimization, etc., specifically including: after the first device establishes a wireless connection with the second device, the first device performs connection detection, and when it is detected that the connection state does not conform to the stable state, the connection self-healing is performed by reconnecting or restarting. Optionally, the method also includes: after the connection self-healing is successful, continue to perform connection detection, etc., and after the connection self-healing fails, select other devices for connection in order of priority. Among them, the priority is obtained by the first device sorting each device based on the stored connection status detection data, connection self-healing data, etc. with each device.
[0042] Furthermore, the present application provides a wireless connection method that also includes updating connection detection conditions, specifically including that the first device adopts the detection conditions when updating the connection detection based on the acquired connection self-healing data, that is, updating the stable state. For example, when the connection self-healing data acquired by the first device indicates that the connection self-healing success rate is lower than the first preset ratio, the connection detection conditions are relaxed; when the connection self-healing data indicates that the connection self-healing success rate of the first device is higher than the second preset ratio, the connection detection conditions are narrowed, wherein the first preset ratio is less than the second preset ratio.
[0043] Furthermore, the wireless connection method provided by the present application can be implemented by an application / component / service installed in an electronic device, and the application / component / service can be provided by the system or by a third party. Among them, system provision refers to that provided or developed by the manufacturer of the electronic device, and third-party provision refers to that provided or developed by the manufacturer of non-electronic equipment. The manufacturer of the electronic device may include the manufacturer, supplier, provider or operator of the electronic device, etc.
[0044] Further, in an optional implementation, after the first device establishes a wireless connection with other devices, the above-mentioned connection detection, connection self-healing and connection optimization methods are performed by default. In another optional implementation, after the first device establishes a wireless connection with other devices, it determines whether to perform the above-mentioned connection detection, connection self-healing and connection optimization methods based on whether the user turns on the corresponding function.
[0045] The wireless connection method provided in the present application can be applied to the following scenarios: in a terminal device including a communication module, in a communication network test production line, and the embodiments of the present application are not limited to this.
[0046] Next, we introduce the relevant concepts involved in this application:
[0047] Wireless connection includes but is not limited to wireless fidelity (Wi-Fi) connection established through wireless communication technology, Bluetooth (BT) connection, etc.
[0048] Connection detection includes but is not limited to connectivity detection, signal strength detection, etc. For example, connectivity is detected by using a packet internet groper (Ping), signal strength is detected by using an ADB command, etc.
[0049] The connection state not meeting the stable state includes: the connection is not disconnected, and the connectivity test exceeds the preset duration and / or the signal strength is less than the preset strength. The specific connection state not meeting the stable state includes: the duration obtained by performing the connectivity test N times (N≥1) is greater than the preset duration, and / or the signal strength is less than the preset strength, and the N times can be continuous or discontinuous. When the connection state is in a state that does not meet the stable state for a long time, the connection is stuck and easily disconnected. Optionally, the connection state not meeting the stable state may also include a disconnected state.
[0050] Reconnection means that the first device disconnects from the current device and then reconnects to the current device. Usually, reconnection takes a short time, does not affect the user's network communication experience, and can solve the problem of network lag to a certain extent.
[0051] Restarting means that the first device restarts the wireless communication module, for example, by restoring the network factory settings (reset) to power off and then power on the wireless communication module, and then reconnecting with the device connected before the restart. Usually, restarting can solve the problem of network operation failure of the first device, thereby solving the problem of network lag.
[0052] The connection self-healing success means that the connection state between the first device and the device connected after reconnection or restart is in a stable state. On the contrary, the connection self-healing failure means that the connection state between the first device and the device connected after reconnection or restart is still not in a stable state.
[0053] The connection status detection data includes, but is not limited to, any one or more of the following: the duration of the connectivity test, signal strength, transmission rate, etc. corresponding to the detection object (device identification) 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 successful self-healings, the time required for successful self-healing, the number of self-healings within a preset time, etc. corresponding to the self-healing object (device identifier) and the self-healing time.
[0055] Priority refers to the ranking of the first device based on the stored connection status detection data with each device, connection self-healing data, and any one or more factors in the user's frequently connected device preferences. The higher the priority of the device, the more stable the connection established with the device and the more in line with user expectations; the lower the priority, the more likely the connection established with the device is to fluctuate and less in line with user expectations.
[0056] It can be seen that after implementing the wireless connection method, electronic device and communication system provided by the present application, 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 can restore the connection state in time through connection self-healing, avoiding the problem of connection jamming and disconnection caused by being in an unstable state for a long time, thereby improving the stability of the connection.
[0058] (2) Improving the quality of connection. Specifically, after the connection self-healing fails, the first device selects a corresponding device from other available devices to establish a wireless connection, thereby ensuring the quality of the connection of the first device.
[0059] (3) Reduce the workload of manual operation and maintenance of connections. Specifically, connection detection, connection self-healing, and connection optimization are all fully automated, without the need for manual connection detection, connection maintenance, connection selection, and other operations. In this way, when the first device performs Internet access services, the user does not need to pay attention to the connection status at all times, and the normal execution of Internet access services can still be guaranteed.
[0060] Next, the device and communication system used by the wireless connection method provided by this application are introduced.
[0061] Figure 1 The communication system 10 involved in a production line test scenario is exemplarily shown.
[0062] like Figure 1 As shown, the communication system 10 includes: a wireless access point and multiple node devices. The wireless access point and the multiple node devices are both provided with a wireless communication module, and the multiple 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). When the wireless connection is specifically a Wi-Fi connection, the node device can also be called a terminal side device, and the wireless access point can also be called a network side device.
[0063] Optionally, the communication system 10 may also include more wireless access points and node devices, etc., which is not limited in the embodiment of the present application.
[0064] In the communication system 10, multiple node devices connected to the wireless access point can be used by testers to test the wireless communication functions in the node devices. In the process of testing the node device after the wireless access device establishes a connection with the node device, if a connection failure occurs and causes a disconnection, it will affect the test of the node device. However, after adopting the wireless connection method provided by the present application, the connection stability can be guaranteed through connection detection and connection self-healing, thereby reducing the workload of testers in the production line and improving the test efficiency of the node device.
[0065] In the production line test scenario, connection detection and connection self-healing can be specifically performed by a wireless access point device, or can also be performed by a node device, and the embodiments of the present application are not limited to this.
[0066] Figure 2 The communication system 10 involved in a product application scenario is exemplarily shown.
[0067] like Figure 2 As shown, the communication system 20 includes: a node device and multiple wireless access points. The node device and the multiple wireless access points are both provided with a wireless communication module, and the node device 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). When the wireless connection is specifically a Wi-Fi connection, the node device can also be called a terminal side device, and the wireless access point can also be called a network side device.
[0068] Optionally, the communication system 20 may also include more wireless access points and node devices, etc., which is not limited in the embodiment of the present application.
[0069] In the communication system 20, the node device can select the best wireless access point to establish a connection, so that the node device can communicate with the wireless access point and perform Internet access services, etc. After the node device establishes a connection with the wireless access device 1, if a connection failure occurs and causes disconnection, the Internet access service of the node device will be affected. However, after adopting the wireless connection method provided by the present application, the 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 surf the Internet.
[0070] In product application scenarios, connection detection and connection self-healing can be performed by products and node devices.
[0071] Based on the above introduction to the application scenarios of the wireless communication system 10 and the communication system 20, it can be known that the device forms of the above node devices and wireless access points can be as follows.
[0072] Node devices may include but are not limited to: Or portable terminal devices with other operating systems, such as mobile phones, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPC), netbooks, as well as cellular phones, personal digital assistants (PDA), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, vehicle-mounted devices, smart home devices and / or smart city devices, etc.
[0073] Wireless access points can include but are not limited to: routers, Or portable terminal devices with other operating systems, such as mobile phones, tablet computers, etc.
[0074] Next, combine Figure 3 The wireless connection method provided by the present application is described in detail by taking the product application scenario as an example. The implementation of the wireless connection method in the production line test scenario is similar to the following description, and can be referred to the description below, which will not be repeated here.
[0075] refer to Figure 3 , Figure 3 A wireless connection method provided by the present application is exemplified.
[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. The second device and the third device involved in the method are the wireless access point 1, the 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 may establish a connection with the second device through wireless communication technology. Alternatively, without user operation, when the wireless communication function of the electronic device is turned on and the communication distance between the first device and the second device meets the conditions, the first device may also automatically connect to the second device through wireless communication technology. In the embodiment of the present application, the connection established between the first device and the second device described in S31 may also be referred to as the first connection.
[0079] The above-mentioned user operations that trigger the first device to connect to the second device include but are not limited to: operations acting on the options of the second device, operations scanning the labels of the second device, operations by inputting, for example, ADB commands to the first device, etc. The embodiments of the present application do not limit the scenarios that trigger the first device to connect to the second device.
[0080] The above wireless communication technologies include but are not limited to any one or more of the following: Wi-Fi, BT or NFC, etc.
[0081] The above connection includes but is not limited to: Wi-Fi connection, BT connection, etc., and the following text only uses Wi-Fi connection as an example, and the embodiments of the present application are not limited to this.
[0082] S32, the first device detects whether the connection state between the first device and the second device is in a stable state.
[0083] Specifically, the first device may periodically (ie, periodically poll) detect whether the connection status with the second device complies with the stable status.
[0084] When it is detected that the connection state with the second device does not conform to the stable state, the first device executes subsequent S33-S37. When it is detected that the connection state conforms to the stable state, the first device does not execute subsequent S33-S37, but continues to execute S32, i.e., polling to detect the connection state.
[0085] The above detection method includes: detecting connectivity through Ping, detecting signal strength through ADB commands, etc. The embodiment of the present application does not limit the specific commands used for connectivity testing or signal strength testing, and the commands used in different platforms may be different.
[0086] The above-mentioned stable state can be stored in the connection detection module of the first device. Specifically, not meeting the stable state includes: the duration obtained by performing connectivity tests for N consecutive times (N≥1) is greater than the preset duration, and / or the signal strength is less than the preset strength. Meeting the stable state includes: the connectivity test duration is less than or equal to the preset duration, and / or the signal strength is greater than or equal to the preset strength. The preset duration can be, for example, 100ms, and the preset strength can be, for example, -75dbm. The embodiments of the present application do not limit the specific values.
[0087] Optionally, after the first device establishes a connection with other devices, it automatically performs the connection status detection described in S32, and then promptly detects the unstable connection state and performs subsequent connection self-healing and connection optimization. Alternatively, after the first device establishes a connection with other devices, it determines whether to enable the corresponding function, and only performs the connection status detection described in S32 if it is determined that the corresponding function is enabled. The corresponding function is specifically provided by the application / component / service installed in the electronic device.
[0088] S33: The first device re-establishes a connection with the second device.
[0089] Specifically, after the first device detects that the connection state with the second device does not conform to the stable state, the first device performs connection self-healing, and the connection self-healing includes preliminary self-healing and further self-healing. Among them, preliminary self-healing includes re-establishing the connection, and further self-healing includes re-establishing the connection after restarting. Further self-healing is performed when the connection state still does not conform to the stable state after the preliminary self-healing. Therefore, in S33, the first device specifically performs preliminary self-healing, that is, first disconnecting the connection with the second device, and then re-establishing the connection with the second device.
[0090] In the embodiment of the present application, the connection re-established between the first device and the second device described in S33 may also be referred to as a second connection.
[0091] S34, the first device detects whether the connection status between the first device and the second device is in a stable state.
[0092] Specifically, S34 is similar to the execution method of the aforementioned S32, except that the connection detected in S32 is the connection established between the first device and the second device before self-healing, while the connection detected in S34 is the connection established after the first device and the second device are reconnected after initial self-healing.
[0093] When it is detected that the connection status after reconnection with the second device does not conform to the stable state, the first device executes subsequent S35-S37. When it is detected that the connection status after reconnection with the second device conforms to the stable state, the first device does not execute subsequent S35-S37, but jumps to continue executing S32, that is, polling to detect the connection status.
[0094] S35, after the first device restarts the wireless communication module, it establishes a connection with the second device.
[0095] Specifically, after the first device detects that the connection state after reconnection with the second device does not conform to a stable state, the first device performs further self-healing, that is, restarting the wireless communication module of the first device, for example, by restoring the network factory settings (reset) so that the wireless communication module is powered off and then powered on, and then re-establishing a connection with the device connected before the restart.
[0096] In the embodiment of the present application, the connection re-established between the first device and the second device after the first device restarts the wireless communication module in S35 can also be referred to as a third connection.
[0097] S36, the first device detects whether the connection status between the first device and the second device is in a stable state.
[0098] Specifically, S36 is similar to the execution method of the aforementioned S32 and S34. The difference between the three is that: the connection detected by S32 is the connection established between the first device and the second device before the initial self-healing, or after the initial and successful self-healing, or the connection established between the first device and the second device after further self-healing and successful self-healing; the connection detected in S34 is the connection established after the first device and the second device are reconnected after the initial self-healing and before the further self-healing, and the connection detected in S36 is the connection established after the first device and the second device are reconnected after the further self-healing.
[0099] When it is detected that the connection status with the second device after restart does not conform to the stable state, the first device executes the subsequent S37. When it is detected that the connection status with the second device after restart conforms to the stable state, the first device does not execute the subsequent S37, but jumps to continue executing S32, that is, polling to detect the connection status.
[0100] S37: The first device establishes a connection with the third device with the highest priority.
[0101] Specifically, after the connection self-healing with the second device fails, the first device selects a third device with the highest priority from other connectable devices to establish a connection.
[0102] The above-mentioned priority is obtained in the following manner: after the first device establishes a connection with each device, while executing the connection status detection and connection self-healing process described in, for example, S32-S36 above, the first device will record the connection status detection data, the connection self-healing data, or the first device will also record the user's frequently connected device preferences. Based on any one or more of these data, the first device will prioritize the connected devices and regularly update the priorities based on the updated data.
[0103] In the embodiment of the present application, the connection established between the first device and the third device with the highest priority described in S37 can also be called the fourth connection.
[0104] Optionally, after establishing a connection with the third device, the first device continues to perform connection status detection, connection self-healing and connection optimization with the third device, etc. For details, please refer to the description of S36-S37 above, which will not be repeated here.
[0105] The above S36-S37 are optional steps, that is, the wireless connection method provided in the present application may only include connection detection and connection self-healing stages, or the wireless connection method provided in the present application may include 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, please refer to the following description for details. Figure 4 Description.
[0107] Figure 4 The connection optimization method involved in the wireless connection method provided in the present application is exemplified.
[0108] like Figure 4 As shown, the method comprises the following steps:
[0109] S41: The first device stores information of the device with which the connection has been established.
[0110] Specifically, in the process of establishing a connection with the opposite device, the first device may obtain information of the opposite device, including but not limited to: device identification, protocol type, and connection mode.
[0111] Among them, the opposite device includes but is not limited to the second device and the third device mentioned above. The device identification includes, for example, the device name, the network address, etc. The protocol types include but are not limited to IEEE802.11a, 802.11b, 802.11n, 802.11ac, 802.11ax, and some other self-developed protocols. The connection modes include automatic connection, manual connection, etc. Automatic connection means that when the first device detects that the conditions for establishing a connection are met, the first device can directly connect to the device without manual triggering by the user; manual connection means that a connection can be established with the device only after an operation based on user input to establish a connection.
[0112] S42: The first device stores connection status detection data with the connected device.
[0113] Specifically, after establishing a connection with the opposite device, the first device will perform a connection status detection as described in S32, S34 and S36 above. Therefore, the first device will also store connection status detection data, and the connection status detection data includes but is not limited to any one or more of the following: the duration of the connectivity test, signal strength, transmission rate, etc. corresponding to the detection object (device identification) and the detection time.
[0114] S43: The first device stores connection self-healing data with the connected device.
[0115] Specifically, after the first device detects the connection status of the established connection, if it detects that the connection status does not meet the stable state, it will perform the connection self-healing as described in S33 and S35 above. Therefore, the first device will also store the connection self-healing data, and 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 successful self-healings, the time required for successful self-healing, the number of self-healings within a preset time, etc. corresponding to the self-healing object (device identifier) and the self-healing time.
[0116] S44, the first device obtains the preference of the user's frequently connected device.
[0117] Specifically, the first device may calculate the connection frequency of the connected devices, and if the frequency of a certain device being connected is higher, it is determined that the user prefers to connect to the device more. Alternatively, the first device may also provide a setting item for frequently connected devices, and then based on the user's setting operation, the device set by the user as frequently connected is the device that the user prefers to connect to more.
[0118] In the embodiment of the present application, S44 is an optional operation.
[0119] In the embodiment of the present application, the present application does not limit the order in which the first device executes S41-S44. The first device can execute S41-S44 simultaneously or in any other order, and the embodiment of the present application does not limit this.
[0120] S45: The first device determines the priority of each device based on any one or more factors of connection status detection data with each device, connection self-healing data, or user's preference for frequently connected devices.
[0121] Specifically, the first device can periodically determine the latest priority of each device based on the latest stored connection status detection data with each device, connection self-healing data, and any one or more factors in the user's frequently connected device preferences. The higher the priority of the device, the more stable the connection established between the first device and the device, which is more in line with the user's expectations; the lower the priority, the more likely the connection established between the standard first device and the device is to fluctuate, which is less in line with the user's expectations.
[0122] When the first device comprehensively determines the priority based on the above-mentioned connection status detection data, connection self-healing data, and user's frequently connected device preferences, the priority can be determined illustratively by sorting the following factors in order of importance from high to low: connection signal strength, user preference, number of connection self-healing times and time required for successful self-healing, and number of self-healings within a preset time (i.e., the number of times the connection status does not meet the stable state within the preset time).
[0123] Next, the software and hardware architecture of the electronic device involved in this application is introduced.
[0124] The software system of the first device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structure of the first device is exemplified.
[0125] Figure 5 It is a schematic diagram of the software architecture of the first device of an embodiment of the present application.
[0126] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. The system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime ( 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 connection application (also referred to as a first application), and Figure 5 Automated tests not shown are for applications such as Camera, Gallery, Calendar, Calls, Maps, Navigation, WLAN, Bluetooth, Music, Video, SMS, etc.
[0129] Among them, the name of the wireless connection application is only an example, which 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 connection applications include but are not limited to the following modules: connection 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 coding protocol, and based on the parsed device information, establish a wireless connection with the device according to the coding 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 IEEE802.11a, 802.11b, 802.11n, 802.11ac, 802.11ax, etc. The self-developed protocol is mainly used for the electronic device 100 to establish a wireless connection with other devices to realize wireless functions.
[0133] The detection module is mainly used to detect the connection status after the connection module successfully establishes a connection with the peer device, such as the electronic device 200, including but not limited to detecting connectivity, signal strength, etc. through the Ping command. In addition, the detection module is also used to store the detected connection status data for the optimization module to prioritize the connectable devices.
[0134] The self-healing module is mainly used to perform 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 initial self-healing fails, that is, controlling the wireless connection module to power off and then power on again to establish a connection. In addition, the self-healing module is also used to store the self-healing data for the optimization module to prioritize the devices that can be connected.
[0135] The optimization module is mainly used to prioritize multiple devices that can be connected, and to select the device with the highest priority from the connectable devices to establish a connection after the self-healing module fails to further self-heal.
[0136] The update module is mainly used to update 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 the first preset ratio, the connection detection conditions are relaxed, such as increasing the preset duration of the connectivity test, and / or reducing the signal strength less than the preset strength, that is, changing the stable state from the original first stable state to the second stable state. The range of the second stable state is greater than the range of the first stable state, so that the detection conditions are too strict and affect the normal communication of the electronic device 100; when the connection self-healing data indicates that the connection self-healing success rate of the first device is higher than the second preset ratio, the connection detection conditions are narrowed, such as reducing the preset duration of the connectivity test, and / or increasing the signal strength less than the preset strength, that is, changing the stable state from the original first stable state to the second stable state. The range of the second stable state is less than the range of the first stable state. Among them, the first preset ratio is less than the second preset ratio, so that the established wireless connection can be guaranteed to have high stability and high quality, and improve the user experience.
[0137] Among them, the automated test is usually used in the production line of the electronic device 100. After the product is launched, the automated test is not provided at the user end, so it is not elaborated here.
[0138] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0139] like Figure 5 As shown, the application framework layer may include a Wi-Fi interface, a BT interface, and Figure 5 Not shown are the window manager, content provider, view system, telephony manager, resource manager, notification manager, etc.
[0140] The WiFi interface is used to control the services issued by the lower-layer WiFi driver based on the calls of the upper-layer applications.
[0141] The BT interface is used to control the services issued by the lower-layer WiFi driver based on the calls of the upper-layer applications.
[0142] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0143] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0144] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0145] The phone manager is used to provide the communication function of the first device, such as the management of the call status (including connecting, hanging up, etc.).
[0146] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0147] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, the first device vibrates, the indicator light flashes, etc.
[0148] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0149] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0150] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0151] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0152] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0153] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0154] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0155] A 2D graphics engine is a drawing engine for 2D drawings.
[0156] The kernel layer is the layer between hardware and software. The kernel layer contains at least Wi-Fi driver, BT driver, display driver, camera driver, and Figure 5 Audio driver, sensor driver, etc. not shown.
[0157] The electronic device 100 can call the WiFi interface through the upper-layer wireless connection apk to control the operation of the Wi-Fi driver. The WiFi driver can be used to control the operation of the Wi-Fi chip, thereby establishing a Wi-Fi connection.
[0158] refer to Figure 6 , Figure 6 The software architecture diagram of an electronic device 100 provided by the present application is exemplarily outputted. In the embodiment of the present application, the hardware architecture of the node device can refer to the following description of the electronic device 100.
[0159] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a camera 193, and a display screen 194, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, etc.
[0160] It is to be understood that the structure illustrated in the embodiment 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 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0161] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (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 may be independent devices or integrated into one or more processors.
[0162] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0163] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0164] In the embodiment of the present application, the electronic device 100 can call other software and hardware modules through the processor 110 to execute the above Figure 3-Figure 4 The connection methods introduced are not described in detail here.
[0165] In some embodiments, the processor 110 may include one or more interfaces. The interface 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.
[0166] The USB interface 130 is an interface that complies with 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 transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices 100, such as AR devices, etc.
[0167] In the embodiment 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.
[0168] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0169] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.
[0170] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set 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.
[0172] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0173] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may 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 from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0174] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0175] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0176] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may 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. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0177] In the embodiment of the present application, the electronic device can be coupled to the wireless communication module 160 via the antenna 2, so that the electronic device 100 can establish a connection with the electronic device 200 via wireless communication technology, such as Wi-Fi technology.
[0178] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0179] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display screen panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), miniled, microled, micro-oled, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0180] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0181] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and 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 and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on 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 set in the camera 193.
[0182] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the 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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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 an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0183] In the embodiment of the present application, the electronic device 100 can scan the label of the device to be connected through the camera to parse the information of the device to be connected so that the wireless communication module can establish a 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 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0185] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0186] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0187] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0188] Random access memory may 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 DDR SDRAM is generally referred to as DDR5 SDRAM), etc.;
[0189] Non-volatile memory may include disk storage devices and flash memory.
[0190] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; can be divided into universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.
[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 the operating system or other running programs, and can also be used to store user and application data.
[0192] The non-volatile memory may also store executable programs and user and application data, etc., and may 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 to an external non-volatile memory 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 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
[0194] In an embodiment of the present application, the electronic device 100 can store wireless connection related data through the above-mentioned memory, including but not limited to: connection device identification, connection status detection data, connection self-healing data, user's frequently connected device preference and priority, etc.
[0195] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0196] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0197] The speaker 170A, also called a "speaker", 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 audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0199] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into 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, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0200] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0201] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on 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 acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on 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 the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0202] The touch sensor 180B is also called a "touch panel". The touch sensor 180B can be arranged on the display screen 194, and the touch sensor 180B and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180B is used to detect touch operations acting on or near it. The touch sensor can pass 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 arranged on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0203] In the embodiment of the present application, the electronic device 100 can receive the user's operation of selecting a connection device through the touch sensor 180B, and receive operations of starting connection detection, self-healing, optimization and other functions.
[0204] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0205] The following describes a hardware architecture of an electronic device 200 provided in an embodiment of the present application. In the embodiment of the present application, the hardware architecture of the access point can refer to the description of the electronic device 200 below.
[0206] Figure 7 A schematic diagram of the hardware structure of an electronic device 200 provided in an embodiment of the present application is shown.
[0207] like Figure 7 As shown, the electronic device 200 may include: a processor 201, a memory 202, a wireless communication module 203, an antenna 205, and a power management module 206. Among them:
[0208] The processor 201 may include one or more processing units, for example, the processor 201 may include an application processor (AP), a modem processor, a graphics processor (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 may be independent devices or integrated into one or more processors.
[0209] The controller may be the nerve center and command center of the electronic device 200. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0210] The processor 201 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 201 is a cache memory. The memory may store instructions or data that the processor 201 has just used or cyclically used. If the processor 201 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 201, and thus improves the efficiency of the system.
[0211] In some embodiments, the processor 201 may include one or more interfaces. The interface 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 understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0213] In some embodiments, the processor 201 can be used to parse the signal received by the wireless communication module 203 and demodulate the signal. The processor 201 can respond according to the analysis result 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 a signal sent out by the wireless communication module 203, such as a Wi-Fi signal.
[0214] The memory 202 is coupled to the processor 201 and is used to store various software programs and / or multiple sets of instructions. In a specific implementation, the memory 202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 202 may store an operating system, such as uCOS, VxWorks, RTLinux, and other embedded operating systems. The memory 202 may also store a communication program, which may be used to communicate with the electronic device 200 or other devices.
[0215] The wireless communication module 203 may include a WLAN communication module 204. The WLAN communication module 204 may provide a solution for Wi-Fi wireless communication applied to the electronic device 200. The Wi-Fi protocol used in the WLAN communication module 204 may be IEEE802.11a, 802.11b, 802.11n, 802.11ac, 802.11ax, etc.
[0216] Optionally, the wireless communication module 203 may also include other communication modules to provide other wireless communication solutions (for example, Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR)).
[0217] Optionally, the WLAN communication module 204 can be integrated with other communication modules (e.g., Bluetooth communication modules). The WLAN communication module 204 can detect signals emitted by other devices (e.g., electronic device 200), such as measurement signals, scanning signals, etc., and can send response signals, such as measurement responses, scanning responses, etc., so that other devices can find the electronic device 200 and establish wireless communication connections with other devices through one or more of WLAN, Bluetooth, or other short-range wireless communication technologies to perform data transmission.
[0218] In other embodiments, one or more of the WLAN communication modules 204 may also transmit signals, such as broadcast detection signals and beacon signals, so that other devices can discover the electronic device 200 and establish wireless communication connections with other devices via WLAN or other short-range wireless communication technologies to transmit data.
[0219] The antenna 205 can be used to transmit and receive electromagnetic wave signals. The antennas of different communication modules can be reused or can be independent of each other to improve the utilization rate of the antenna.
[0220] The power management module 206 may be used to control the power supply to the electronic device 200. The power supply may be a battery or an external power supply.
[0221] In some embodiments, the hardware structure of the electronic device 200 may further include an audio module ( Figure 7 not shown) and a speaker ( Figure 7The audio module is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. The audio module can also be used to encode and decode audio signals. The speaker, also known as a "horn", is used to convert audio electrical signals into sound signals.
[0222] In some embodiments, the hardware structure of the electronic device 200 may further include a microphone ( Figure 7 (not shown). A microphone, also called a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, a user can speak by approaching the microphone with his or her mouth to 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 may also include a display screen ( Figure 7 ). The display screen is used 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the terminal may include 1 or N display screens, where N is a positive integer greater than 1.
[0224] In some embodiments, the hardware structure of the electronic device 200 may also include one or more sensors ( Figure 7 The one or more sensors may include one or more of the following pressure sensors, gyroscope sensors, air pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity light sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0225] It should be noted that Figure 7 The electronic device 200 shown is only one implementation of the embodiment of the present application. In actual applications, the electronic device 200 may also include more or fewer components, which is not limited here.
[0226] It should be understood that each step in the above method embodiment provided by the present application can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0227] The present application also provides an electronic device, which may include: a memory and a processor, wherein the memory may be used to store a computer program; and the processor may be used to call the computer program in the memory so that the electronic device executes 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 executed by the electronic device in any of the above embodiments.
[0229] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.
[0230] The chip system may be composed of the chip, or may include the chip and other discrete devices.
[0231] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0232] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
[0233] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0234] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which enables a computer to execute the method executed by the electronic device in any of the above embodiments when the computer program is executed.
[0235] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the electronic device in any of the above embodiments.
[0236] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
[0237] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part 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, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk), etc.
[0238] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0239] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.
Claims
1. A wireless connection method, characterized in that: The method is applied to a first device including a wireless communication module, and the method includes: Establishing a first connection with a second device through the wireless communication module; detecting that the first connection does not conform to 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 conform to the stable state; Restart the wireless communication module, and re-establish a third connection with the second device through the wireless communication module.
2. The method according to claim 1, characterized in that Not meeting the stable state, including: the connection is not disconnected, and the connectivity test exceeds a preset time and / or the signal strength is less than a preset strength; The connection includes the first connection, the second connection or the third connection.
3. The method according to claim 1 or 2, characterized in that: Not meeting the stable state includes: the connection is not disconnected, and N connectivity tests exceed a preset time and / or the signal strength is less than a preset strength, N≥1.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: detecting that the third connection does not conform to the stable state; A fourth connection is established with a third device through the wireless communication module.
5. The method according to claim 4, characterized in that The third device is the device with the highest priority among the devices that the first device can connect to, and the priority of the device is determined based on any one or more of the following: the connectivity test duration, signal strength, transmission rate of the devices that the first device has been historically connected to, the number of times the connection has been reestablished, the time required to reestablish the connection, the ratio of the reestablished connection to the stable state, or user settings.
6. The method according to any one of claims 1 to 4, characterized in that The stable state is a first stable state, and the method further includes: The first stable state is updated to a second stable state according to any one or more of the number of times the first device reestablishes connection, the time required to reestablish connection, or the ratio of reestablishing connection in accordance with the stable state.
7. The method according to claim 6, characterized in that When the ratio of reestablishing the connection in accordance with the stable state is lower than the first preset ratio, the range of the second stable state is greater than the range of the first stable state; When the ratio of reestablishing the connection in accordance with 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, wherein the first preset ratio is smaller than the second preset ratio.
8. The method according to any one of claims 1 to 7, characterized in that Before detecting that the connection state of the first connection does not conform to the stable state, the method further includes: A first operation is received.
9. The method according to any one of claims 1 to 8, characterized in that The first device further includes a first application, and the first device executes the following through the first application: detecting that the first connection does not conform to 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 conform to the stable state; Restart the wireless communication module, and re-establish the third connection with the second device through the wireless communication module.
10. The method according to any one of claims 1 to 9, characterized in that The first device is a terminal side device, and the second device is a network side device.
11. The method according to any one of claims 1 to 10, characterized in that The wireless communication module is a Wireless Fidelity Wi-Fi module.
12. 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 includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in any one of claims 1-11.
13. A communication system, characterized in that: The communication system includes a first device and one or 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, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the first device to execute the method described in any one of claims 1-11.
14. A chip, which is applied to electronic equipment, characterized in that: The chip includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method as described in any one of claims 1-11.
15. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 11.
Citation Information
Patent Citations
Network reconnection method and device, terminal equipment and storage medium
CN115278932A
Bluetooth connection method and device, electronic equipment and storage medium
CN116033597A
WiFi connection method, electronic equipment, storage medium and chip
CN116668583A
Method and system for simplifying WIFI setup for best performance
US20140273877A1