Wireless connection maintenance method and electronic device

By acquiring health indicators of each communication layer of the wireless connection, the target fault tolerance and recovery strategy was determined, thus solving the problem of wireless connection interruption and achieving more stable and efficient communication.

CN122269500APending Publication Date: 2026-06-23GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-16
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Wireless connections are susceptible to interference during use, resulting in poor link quality and frequent interruptions, which affect communication stability and efficiency. Existing technologies are unable to effectively prevent these interruptions.

Method used

By acquiring health metrics from each communication layer, target fault tolerance and recovery strategies are determined, data resolution is adjusted, and link quality is optimized to maintain wireless connectivity.

Benefits of technology

It improves the quality of wireless connections, reduces the risk of interruption, ensures the stability and continuity of wireless connections, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122269500A_ABST
    Figure CN122269500A_ABST
Patent Text Reader

Abstract

The application provides a wireless connection maintenance method and electronic equipment, and relates to the technical field of communication. The method comprises the following steps: acquiring health indexes of each communication layer used by a wireless connection, wherein the health indexes represent communication characteristics affecting the link quality of the wireless connection; determining a target fault-tolerant strategy and a target recovery strategy of the wireless connection based on the health indexes of each communication layer, wherein the target fault-tolerant strategy is used to adjust the data resolution of the wireless connection, and the target recovery strategy is used to optimize the link quality of the wireless connection; and maintaining the wireless connection based on the target fault-tolerant strategy and the target recovery strategy, so that the wireless connection is connected. Based on the above scheme, the wireless connection can be prevented from being interrupted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and more particularly to a wireless connection maintenance method and electronic device in the field of communication technology. Background Technology

[0002] Wireless connectivity eliminates the constraints of wired connections, making network connections between electronic devices more convenient. However, wireless connections may experience communication problems during use, leading to connection interruptions and the inability to communicate normally.

[0003] Therefore, how to avoid wireless connection interruptions is a problem that urgently needs to be solved. Summary of the Invention

[0004] This application provides a wireless connection maintenance method and an electronic device that can prevent wireless connection interruption.

[0005] In a first aspect, this application provides a wireless connection maintenance method applied to an electronic device, the method comprising: Obtain health metrics for each communication layer used in the wireless connection, where health metrics represent communication characteristics that affect the link quality of the wireless connection; Based on the health indicators of each communication layer, the target fault tolerance strategy and the target recovery strategy for the wireless connection are determined. The target fault tolerance strategy is used to adjust the data resolution of the wireless connection, and the target recovery strategy is used to optimize the link quality of the wireless connection. Based on target fault tolerance and target recovery strategies, wireless connections are maintained to ensure wireless connectivity.

[0006] In this embodiment, since the health indicators of each communication layer represent the communication characteristics that affect the link quality of the wireless connection, the target fault tolerance strategy and target recovery strategy determined by the health indicators of each communication layer used by the wireless connection will be more in line with the actual situation of the wireless connection link quality. This allows the target fault tolerance strategy and target recovery strategy to perform more accurate maintenance when maintaining the wireless connection, effectively avoiding wireless connection interruption. Furthermore, using the target fault tolerance strategy and target recovery strategy to maintain the wireless connection can reduce the risk of continuous deterioration of the wireless connection link quality and interruption, preventing the continuous deterioration of the wireless connection link quality, thereby improving the wireless connection link quality and reducing the possibility of wireless connection interruption, thus effectively avoiding wireless connection interruption.

[0007] Secondly, this application provides a wireless connection maintenance device configured in an electronic device, the device comprising: The acquisition module is used to acquire the health indicators of each communication layer used by the wireless connection. The health indicators represent the communication characteristics that affect the link quality of the wireless connection. The processing module is used to determine the target fault tolerance strategy and target recovery strategy for the wireless connection based on the health indicators of each communication layer. The target fault tolerance strategy is used to adjust the data resolution of the wireless connection, and the target recovery strategy is used to optimize the link quality of the wireless connection. Based on the target fault tolerance strategy and the recovery strategy, the wireless connection is maintained to ensure that the wireless connection is connected.

[0008] Thirdly, this application provides a controller, including a storage module and a processing module. The storage module is used to store executable program code, and the processing module is used to call and run the executable program code from the storage module, causing the controller to execute the methods in the first aspect or any possible implementation of the first aspect.

[0009] Fourthly, this application provides an electronic device including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the methods described in the first aspect or any possible implementation thereof.

[0010] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in the first aspect or any possible implementation thereof.

[0011] Sixthly, this application provides a computer-readable storage medium storing computer program code that, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description

[0012] Figure 1 This is a schematic diagram of a scenario for the wireless connection maintenance method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a wireless connection maintenance method provided in an embodiment of this application; Figure 3 This is another flowchart illustrating a wireless connection maintenance method provided in an embodiment of this application; Figure 4 This is another schematic flowchart of a wireless connection maintenance method provided in an embodiment of this application; Figure 5 This is another flowchart illustrating a wireless connection maintenance method provided in an embodiment of this application; Figure 6 This is another flowchart illustrating a wireless connection maintenance method provided in an embodiment of this application; Figure 7 This is a schematic diagram of a wireless connection maintenance architecture provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of the wireless connection maintenance device provided in the embodiments of this application; Figure 9 This is a schematic diagram of the controller provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

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

[0014] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0015] With the continuous development of communication networks, the communication methods between different electronic devices have gradually shifted from wired connections to wireless connections. Wireless connections free users from the constraints of wired connections, making network connections between electronic devices more convenient. However, during use, wireless connections may be subject to interference, leading to poor link quality and, in severe cases, interruption, preventing normal communication. Link quality can include at least one of the following: wireless connection stability, connection efficiency, data transmission integrity, and data display smoothness. Poor wireless connection stability results in frequent interruptions; poor connection efficiency leads to slow connections; poor data transmission integrity causes packet loss and data transmission delays; and poor data display smoothness results in black screens, stuttering, distorted images, and flickering. Furthermore, wireless connectivity refers to a communication method where different electronic devices do not need wired connections (e.g., network cables, data cables) but can achieve data exchange, signal transmission, and device interconnection through wireless communication technology. Wireless communication technologies may include at least one of Bluetooth Low Energy (BLE), Cellular Network (CN), Wireless Fidelity Peer-to-Peer (WiFi P2P), and Near Field Communication (NFC). Wireless connection data can represent data transmitted via a wireless connection.

[0016] Figure 1 This is a schematic diagram of a scenario for the wireless connection maintenance method provided in the embodiments of this application.

[0017] For example, such as Figure 1 As shown, Figure 1 The system includes an in-vehicle terminal 101 and a mobile terminal 102. The in-vehicle terminal 101 is installed in a vehicle. Both the in-vehicle terminal 101 (which can be referred to as an "in-vehicle intelligent terminal") and the mobile terminal 102 are electronic devices. The in-vehicle terminal 101 and the mobile terminal 102 have the same wireless communication modules required by wireless communication technology. For example, both the in-vehicle terminal 101 and the mobile terminal 102 are equipped with at least one of the following: WiFi P2P communication module, BLE communication module, CN communication module, NFC communication module, etc.

[0018] For example, when the vehicle terminal 101 and the mobile terminal 102 are wirelessly connected, the Android system (Android Auto) can be used as the core connection carrier between the vehicle terminal 101 and the mobile terminal 102. Wireless connection can be achieved through a combination of various wireless communication technologies (e.g., Wi-Fi P2P and BLE), thereby enabling collaborative applications of vehicle functions such as navigation, media playback, and voice command output. Since the quality of the wireless connection link directly affects the user experience, interference and poor link quality can lead to frequent wireless connection interruptions. When the wireless connection is interrupted, the user typically needs to manually reconnect (this can be called "passive reconnection mode"), which is cumbersome and time-consuming (e.g., 1-3 seconds), significantly reducing the user experience.

[0019] It should be understood that wireless interference sources, such as smart devices other than the vehicle terminal 101 (e.g., in-vehicle wireless charging devices, vehicle controllers) and electrical equipment outside the vehicle (e.g., high-voltage power lines, other vehicles), may interfere with the wireless connection and reduce the link quality. The vehicle controller may include any of the following: Vehicle Control Unit (VCU), Domain Controller, Infotainment Controller (IC), Telematics Control Unit (TCU). The operating systems used by the vehicle terminal 101 and the mobile terminal 102 may be the same or different.

[0020] In related technologies, to avoid wireless connection interruptions, a backup communication link can be set up on top of the primary communication link. This allows switching to the backup link when the quality of the primary link is poor, thus preventing wireless connection interruptions. However, the switch from the primary to the backup link may fail due to interference from wireless sources, and therefore cannot completely prevent wireless connection interruptions, meaning the problem of wireless connection interruptions will still exist.

[0021] The following is combined with Figures 2 to 7 The wireless connection maintenance method provided in the embodiments of this application will be described in detail.

[0022] Figure 2 This is a flowchart illustrating a wireless connection maintenance method provided in an embodiment of this application. The method can be executed by an electronic device, for example, by... Figure 1 The vehicle-mounted terminal 101 in the vehicle executes the command, or is executed by... Figure 1 The mobile terminal 102 in the middle executes.

[0023] For example, such as Figure 2 As shown, the method 200 includes the following implementation process: S210: Obtain health indicators for each communication layer used in the wireless connection.

[0024] Health indicators refer to communication characteristics that affect the link quality of wireless connections. Specifically, health indicators are communication characteristics strongly correlated with wireless connections at each communication layer, such as at least one of the following: Received Signal Strength Indicator (RSSI), data retransmission rate, heartbeat latency, and application keep-alive capability. Furthermore, different communication layers have different health indicators, and different communication layers have different communication functions.

[0025] The communication layers are: Physical Layer, Data Link Layer, Network Layer, and Application Layer. These layers (Physical Layer, Data Link Layer, Network Layer, and Application Layer) are required to establish a wireless connection. The wireless connection is built through these layers. The health metric for the Physical Layer is RSSI, for the Data Link Layer it's the data retransmission rate, for the Network Layer it's the heartbeat latency, and for the Application Layer it's the application keep-alive capability.

[0026] The physical layer receives communication data from other electronic devices, establishing the physical signal channel for the wireless communication module in a wireless connection. RSSI (Receiving Signal Strength Index) reflects the strength of the received communication data. A stronger RSSI indicates a less abnormal physical layer and a more stable communication signal, while a weaker RSSI suggests a more likely abnormal physical layer and a less stable communication signal. A strong RSSI indicates less interference from wireless sources, resulting in a more stable communication signal, stronger signal reception, and a lower likelihood of abnormalities and wireless connection interruptions. Conversely, a weak RSSI indicates strong interference from wireless sources, suggesting a higher likelihood of abnormalities, a less stable communication signal, weaker signal reception, and a higher risk of wireless connection interruptions. Specifically, an RSSI within a preset strength range indicates that the physical layer can still receive communication data normally without interruption, while an RSSI outside the preset range suggests that the physical layer may not be able to receive communication data normally, potentially leading to wireless connection interruption. The preset strength range represents the effective range in which the physical layer can normally receive communication data, such as -40dBm to -100dBm (decibels and milliwatts) or -40dBm to -120dBm. The preset strength range can be configured in advance, and this application embodiment does not limit it.

[0027] The data link layer is used for data processing such as encapsulation, verification, retransmission, and hardware address (MAC address) addressing of received communication data, providing a communication link and ensuring secure data transmission. The data retransmission rate reflects whether data loss has occurred; a lower retransmission rate indicates less data loss, while a higher rate indicates more data loss. A low retransmission rate indicates less interference from wireless sources, making the data link layer less prone to data loss, resulting in stronger data transmission capabilities and a lower likelihood of wireless connection interruption. Conversely, a high retransmission rate indicates greater interference from wireless sources, making the data link layer more susceptible to data loss, weaker data transmission capabilities, and a higher likelihood of wireless connection interruption. The data retransmission rate can be used to monitor the retransmission rate of Advanced Video Coding (AVC) or High Efficiency Video Coding (HEVC) encoded data, for example, monitoring the retransmission rate of audio and video stream encoded data. AVC can also be referred to as H.264, and HEVC as H.265.

[0028] The network layer handles data processing after the data link layer has processed the communication data, including allocating network logical addresses, planning end-to-end transmission paths, and routing, ensuring smooth data transmission. Heartbeat latency reflects the timeliness of wireless data transmission. Shorter heartbeat latency indicates shorter data delay and more stable wireless communication; conversely, longer heartbeat latency indicates longer data delay and less stable wireless communication. Shorter heartbeat latency means less interference from wireless sources, resulting in more stable wireless communication, more timely data transmission, and a lower likelihood of wireless connection interruption. Longer heartbeat latency indicates greater interference from wireless sources, leading to less stable wireless communication, less timely data transmission, and a higher likelihood of wireless connection interruption. Heartbeat latency (also known as "heartbeat response latency") is suitable for the real-time requirements of applications such as vehicle navigation, media playback, and voice command output.

[0029] The application layer is responsible for processing the communication data processed by the network layer, including business data parsing, application protocol interaction, user interface presentation, business function implementation, and application keep-alive, ensuring accurate output of communication data. Application keep-alive capability reflects the keep-alive status of communication data output; a stronger keep-alive capability results in more continuous data output, while a weaker capability leads to more discontinuous data output. Strong keep-alive capability indicates less interference from wireless sources, making data output less prone to interruption, ensuring normal communication data output, and reducing the likelihood of wireless connection interruption. Conversely, weak keep-alive capability indicates greater interference from wireless sources, making data output more prone to interruption, resulting in abnormal communication data output and increasing the likelihood of wireless connection interruption. Application keep-alive capability can be used to monitor the keep-alive status of application functions in electronic devices, which may include at least one of the following: vehicle navigation, media playback, and voice command output.

[0030] For example, when an electronic device is powered on, in order to avoid interference from wireless interference sources when the electronic device is making a wireless connection, the health indicators of each communication layer used by the electronic device during the wireless connection can be obtained. The wireless connection can be maintained by using the health indicators of each communication layer of the wireless connection to avoid wireless connection interruption.

[0031] Optionally, when the electronic device is powered on, it can also detect whether the electronic device has received a wireless connection request from another electronic device. Upon receiving a wireless connection request from another electronic device, it can respond to the request by obtaining health indicators of each communication layer used by the electronic device during wireless connection. The wireless connection request is used to request the establishment of a wireless connection with the electronic device. The number of other electronic devices is at least one.

[0032] For example, in response to a wireless connection request sent by another electronic device, the electronic device may first establish a wireless connection with the other electronic device, and after the wireless connection is successfully established, obtain the health indicators of each communication layer used by the electronic device during the wireless connection.

[0033] For example, in response to a wireless connection request from another electronic device, the electronic device may first authenticate the other electronic device to ensure the legitimacy of the request. If authentication passes, the wireless connection request is considered legitimate, and the electronic device can then establish a wireless connection. After successful establishment, the electronic device can then obtain the health indicators of each communication layer used during the wireless connection process. If authentication fails, the wireless connection request is considered illegitimate, and the electronic device can refuse to establish a wireless connection. It should be understood that the authentication method used by the electronic device can be at least one of key authentication, protocol authentication, or identity authentication.

[0034] S220 determines the target fault tolerance strategy and target recovery strategy for wireless connections based on the health indicators of each communication layer.

[0035] The target fault-tolerance strategy is used to adjust the data resolution of the wireless connection. For example, reducing or maintaining the data resolution of the wireless connection can prevent direct interruption of the wireless connection when the link quality is poor, and is a remedial measure to avoid direct interruption of the wireless connection. The target recovery strategy is used to optimize the link quality of the wireless connection, improving the link quality to enhance the overall wireless connection quality. There is at least one target fault-tolerance strategy and at least one target recovery strategy.

[0036] For example, when the health indicators of each communication layer are obtained, the target fault tolerance strategy and / or target recovery strategy corresponding to the health indicators of each communication layer can be determined through the health indicators of each communication layer; that is, the target fault tolerance strategy and the target recovery strategy are related to the health indicators of each communication layer.

[0037] It should be understood that fault-tolerant strategies can ensure that the wireless connection is not interrupted even when the wireless connection link quality is low, and recovery strategies can restore the wireless connection link quality even when the wireless connection link quality is low, that is, improve the wireless connection link quality.

[0038] S230 maintains the wireless connection based on the target fault tolerance strategy and the target recovery strategy to ensure the wireless connection remains connected.

[0039] For example, by adjusting the data resolution of the wireless connection through a target fault tolerance strategy, the problem of excessive data transmission pressure on the wireless connection due to a high data resolution can be avoided, which could lead to interruption of the wireless connection and failure to transmit data normally. This ensures that the wireless connection is always connected, thereby enabling normal communication through the wireless connection.

[0040] For example, by optimizing the link quality of the wireless connection through a target recovery strategy, the problem of wireless connection interruption and failure to transmit data due to poor wireless connection link quality can be avoided, ensuring that the wireless connection is always connected, thereby enabling normal communication through the wireless connection.

[0041] Optionally, the wireless connection is maintained based on the target fault tolerance strategy and / or target recovery strategy to ensure continuous wireless connectivity.

[0042] For example, the target fault tolerance strategy and / or target recovery strategy are determined as the target maintenance strategy for the wireless connection, and the wireless connection is maintained based on the target maintenance strategy to ensure that the wireless connection remains connected.

[0043] It should be noted that S210~S230 above is a simplified description of the wireless connection maintenance method provided in the embodiments of this application. The following will provide further details... Figure 2 The specific implementation methods shown in the embodiments are described in detail below: When executing S220, the above-mentioned determination of the target fault tolerance strategy and target recovery strategy for wireless connection based on the health indicators of each communication layer includes: determining the target score based on the health indicators of each communication layer; and determining the target fault tolerance strategy and target recovery strategy based on the target score.

[0044] The target score is used to evaluate the link quality of the wireless connection. The target score is positively correlated with the link quality of the wireless connection, while the link quality of the wireless connection is negatively correlated with the probability of wireless connection interruption. In other words, the target score is negatively correlated with the probability of wireless connection interruption.

[0045] For example, a target score is first determined by the health indicators of each communication layer. This target score is used to measure the link quality of the wireless connection. Then, the link quality of the wireless connection is used to predict the probability of wireless connection interruption. In order to maintain the wireless connection by the target fault tolerance strategy and target recovery strategy determined by the target score when the link quality of the wireless connection is poor and the wireless connection is prone to interruption, the wireless connection is always connected.

[0046] Optionally, the target fault tolerance strategy and / or target recovery strategy can be determined through the target score. That is, both the target fault tolerance strategy and the target recovery strategy are related to the target score.

[0047] In this embodiment, the target fault tolerance strategy and target recovery strategy for the wireless connection are determined by the target score of the wireless connection corresponding to the health indicators of each communication layer. This quantifies the impact of the health indicators of each communication layer on the link quality of the wireless connection, thus ensuring objectivity. This improves the accuracy of the target fault tolerance strategy and target recovery strategy determined by the target score, resulting in more accurate target fault tolerance and target recovery strategies. Furthermore, with more accurate target fault tolerance and target recovery strategies, the wireless connection can be maintained more precisely and effectively, further preventing wireless connection interruptions. Moreover, the target score of the wireless connection is determined by the health indicators of each communication layer, reflecting the collaborative impact of each communication layer on the link quality of the wireless connection. Since the health indicators of each communication layer are communication characteristics strongly correlated with the wireless connection, rather than general communication characteristics, the accuracy of the target score is improved.

[0048] In one implementation, determining the target score based on the health indicators of each communication layer includes: determining the target health score of each communication layer based on the health indicators of each communication layer; and fusing the target health scores of each communication layer to obtain the target score.

[0049] Among them, the target health score of each communication layer is used to evaluate the link quality of wireless connection at each communication layer. The target health score of each communication layer is positively correlated with the link quality of each communication layer, and the link quality of each communication layer is negatively correlated with the probability of wireless connection interruption at each communication layer. That is, the target health score of each communication layer is negatively correlated with the probability of wireless connection interruption at each communication layer.

[0050] For example, the target health score of the physical layer is determined by the signal reception strength at the physical layer. This target health score is used to assess the link quality of the wireless connection at the physical layer.

[0051] Furthermore, the target health score of the data link layer is determined by the data retransmission rate of the data link layer. The target health score of the data link layer is used to evaluate the link quality of the wireless connection at the data link layer.

[0052] Furthermore, the target health score of the network layer is determined by the heartbeat latency at the network layer. This target health score is used to assess the link quality of the wireless connection at the network layer.

[0053] Furthermore, the application layer's application keep-alive capability is used to determine the application layer's target health score. This target health score is used to evaluate the link quality of wireless connections at the application layer.

[0054] Then, the target health scores of each communication layer are fused to obtain a fused score, which is then determined as the target score. The score fusion can be any of the following: weighted scoring, unweighted scoring, etc.

[0055] In this embodiment, by fusing the target health scores corresponding to the health indicators of each communication layer, the limitations of determining the target score of wireless connection through the health indicators of individual communication layers can be avoided. The influence of health indicators from different communication layers on the target score of wireless connection is taken into account, thereby improving the accuracy of the target score. Furthermore, with a more accurate target score for wireless connection, more precise and effective maintenance of the wireless connection can be achieved, further preventing wireless connection interruptions.

[0056] In one implementation, multiple scoring ranges for each health indicator are obtained; the above-mentioned determination of the target health score for each communication layer based on the health indicators of each communication layer includes: determining the first scoring range in which the health indicator of each communication layer is located among the multiple scoring ranges of each health indicator; and determining the target health score for each communication layer based on the first scoring range in which the health indicator of each communication layer is located.

[0057] There is a correspondence between the scoring range of the health indicators for each communication layer and the health scores for that layer. The multiple scoring ranges corresponding to different health indicators can be different or the same.

[0058] For example, when determining the target health score of each communication layer, multiple score ranges corresponding to each health indicator can be obtained first, and then the target health score of each communication layer can be determined based on the multiple score ranges corresponding to each health indicator and the health indicators of each communication layer.

[0059] Specifically, among the multiple scoring ranges corresponding to each health indicator, the scoring range in which the health indicator of each communication layer is located (which can be called the "first scoring range") is determined. Then, through the first scoring range in which the health indicator of each communication layer is located, the health score corresponding to the first scoring range in which the health indicator of each communication layer is located is determined, and this health score is determined as the target health score of each communication layer.

[0060] The multiple scoring ranges corresponding to each health indicator can be preset or dynamically adjusted according to the link quality requirements of the wireless connection; this embodiment does not limit this. The corresponding relationship between the scoring ranges of health indicators at each communication layer and the health scores of each communication layer can be preset or dynamically adjusted according to the link quality requirements of the wireless connection; this embodiment does not limit this. Table 1 below provides an illustrative example: Table 1

[0061] In Table 1, the RSSI of the physical layer has several scoring ranges: -40dBm to -60dBm, -61dBm to -80dBm, -81dBm to -90dBm, -91dBm to -100dBm, and exceeding -40dBm to -100dBm. Furthermore, the physical layer health scores corresponding to the various scoring ranges are as follows: -40dBm to -60dBm indicates extremely strong RSSI signal strength, belonging to a strong signal, with a physical layer health score of 100; -61dBm to -80dBm indicates relatively strong RSSI signal strength, belonging to a medium-strong signal, with a physical layer health score of 80; -81dBm to -90dBm indicates relatively weak RSSI signal strength, belonging to a medium-weak signal, with a physical layer health score of 60; -91dBm to -100dBm indicates extremely weak RSSI signal strength, belonging to an extremely weak-strong signal, with a physical layer health score of 30; and values ​​outside the range of -40dBm to -100dBm indicate no RSSI signal strength, belonging to no signal, with a physical layer health score of 0.

[0062] In addition, the data retransmission rate at the data link layer has several scoring ranges: data retransmission rate ≤ 5%, 5% < data retransmission rate ≤ 10%, 10% < data retransmission rate ≤ 15%, 15% < data retransmission rate ≤ 30%, and 30% < data retransmission rate. Furthermore, the health scores for the data link layer corresponding to each of the multiple scoring ranges are as follows: When the data retransmission rate is ≤5%, it indicates an extremely low data retransmission rate, which is normal, and the corresponding health score for the data link layer is 100 points; when the data retransmission rate is ≤10%, it indicates a low data retransmission rate, which is slightly abnormal, and the corresponding health score for the data link layer is 80 points; when the data retransmission rate is ≤15%, it indicates a high data retransmission rate, which is moderately abnormal, and the corresponding health score for the data link layer is 60 points; when the data retransmission rate is ≤30%, it indicates an excessive data retransmission rate, which is severely abnormal, and the corresponding health score for the data link layer is 30 points; when the data retransmission rate is ≤30%, it indicates an extremely high data retransmission rate, which is completely abnormal, and the corresponding health score for the data link layer is 0 points.

[0063] Furthermore, the heartbeat latency of the network layer corresponds to several scoring ranges: heartbeat latency ≤ 50ms, 50ms < heartbeat latency ≤ 100ms, 100ms < heartbeat latency ≤ 150ms, 150ms < heartbeat latency ≤ 300ms, and 300ms < heartbeat latency. Furthermore, the health scores of the network layers corresponding to the various scoring ranges are as follows: When the heartbeat delay is ≤50ms, it indicates that the heartbeat delay is extremely low, almost non-existent, and is considered normal, with a corresponding network layer health score of 100; when the heartbeat delay is ≤100ms, it indicates that the heartbeat delay is low, which is considered slightly abnormal, with a corresponding network layer health score of 80; when the heartbeat delay is ≤150ms, it indicates that the heartbeat delay is relatively high, which is considered moderately abnormal, with a corresponding network layer health score of 60; when the heartbeat delay is ≤300ms, it indicates that the heartbeat delay is excessive, which is considered severely abnormal, with a corresponding network layer health score of 30; when the heartbeat delay is <300ms, it indicates that the heartbeat delay is extremely high, which is considered completely abnormal, with a corresponding network layer health score of 0.

[0064] Furthermore, the application layer's application keep-alive capability has several scoring ranges: all application functions are kept alive normally, a small number of application functions are abnormal, most application functions are abnormal, and all application functions are abnormal. The corresponding application layer health scores for each of these scoring ranges are as follows: when all application functions are kept alive normally, it means all application functions are working properly, and the corresponding application layer health score is 100 points; when a small number of application functions are abnormal and most application functions are kept alive normally, it means most application functions are working properly while a small number are not, and the corresponding application layer health score is 80 points; when most application functions are abnormal and a small number of application functions are kept alive normally, it means a small number of application functions are working properly while most are not, and the corresponding application layer health score is 60 points; when all application functions are abnormal, it means all application functions are not working properly, and the corresponding application layer health score is 0 points. Assuming there are 3 application functions, if all 3 application functions are kept alive normally, the application layer health score is 100 points; or, if 1 application function is abnormal but 2 application functions are kept alive normally, the application layer health score is 80 points; or, if 2 application functions are abnormal but 1 application function is kept alive normally, the application layer health score is 60 points; or, if all 3 application functions are abnormal, the application layer health score is 0 points.

[0065] For example, if the RSSI of the physical layer is -70dBm, which falls within the range of -61dBm to -80dBm, then the health score of 80 points corresponding to the range of -61dBm to -80dBm can be determined as the target health score of the physical layer.

[0066] For example, if the data retransmission rate of the data link layer is 14%, and the data retransmission rate is between 10% and 15%, then the health score of 60 points corresponding to the data retransmission rate between 10% and 15% can be determined as the target health score of the data link layer.

[0067] For example, if the heartbeat delay of the network layer is 40ms, and the heartbeat delay is ≤50ms, then the health score of 100 points corresponding to the heartbeat delay ≤50ms can be determined as the target health score of the network layer.

[0068] For example, if the application layer's application keep-alive capability is that a small number of application functions are abnormal, then the health score of 80 points corresponding to the abnormal functions of a small number of applications can be determined as the target health score of the application layer.

[0069] In this embodiment, the target health score corresponding to the health index of each communication layer is determined by defining a score range that corresponds to the health score of each communication layer. This allows for the division of the health index range for each communication layer, providing a criterion for evaluating the impact of the health index of each communication layer on the link quality of the wireless connection. This quantifies the impact of the health index of each communication layer on the link quality of the wireless connection, thus ensuring objectivity and improving the accuracy of the wireless connection link quality assessment. Furthermore, with a more accurate assessment of the wireless connection link quality, more precise and effective maintenance of the wireless connection can be achieved, further preventing wireless connection interruptions.

[0070] In one implementation, the scoring weight of each communication layer is determined based on the degree of positive impact of the health indicators of each communication layer on the link quality of the wireless connection; the above-mentioned fusion of the target health scores of each communication layer to obtain the target score includes: weighting the scoring weight of each communication layer and the target health score of each communication layer to obtain the target score.

[0071] The degree of positive impact is positively correlated with the scoring weight; that is, the degree of positive impact of the health indicators of each communication layer on the link quality of the wireless connection is positively correlated with the scoring weight of each communication layer. In other words, the more beneficial the health indicators of each communication layer are to improving the link quality of the wireless connection, the greater their corresponding scoring weight; conversely, the less beneficial the health indicators of each communication layer are to improving the link quality of the wireless connection, the smaller their corresponding scoring weight.

[0072] For example, the scoring weight of the physical layer is determined by the degree of positive impact of the physical layer's RSSI on the link quality of the wireless connection. Specifically, the physical layer's RSSI is positively correlated with the degree of its positive impact on the link quality of the wireless connection, and the degree of its positive impact on the link quality of the wireless connection is positively correlated with the physical layer's scoring weight; that is, the physical layer's RSSI and its scoring weight are positively correlated.

[0073] Furthermore, the scoring weight of the data link layer is determined by the degree of positive impact of the data retransmission rate on the link quality of the wireless connection. Specifically, the data retransmission rate of the data link layer is negatively correlated with the degree of its positive impact on the link quality of the wireless connection, while the degree of its positive impact on the link quality of the wireless connection is positively correlated with the scoring weight of the data link layer; that is, the data retransmission rate of the data link layer is negatively correlated with its scoring weight.

[0074] Furthermore, the scoring weight of the network layer is determined by the degree of positive impact of the network layer's heartbeat latency on the link quality of the wireless connection. Specifically, the degree of positive impact of the network layer's heartbeat latency on the link quality of the wireless connection is negatively correlated, while the degree of positive impact of the network layer's heartbeat latency on the link quality of the wireless connection is positively correlated with the network layer's scoring weight; that is, the network layer's heartbeat latency and its scoring weight are negatively correlated.

[0075] Furthermore, the scoring weight of the application layer is determined by the degree of positive impact of the application layer's application keep-alive capability on the link quality of the wireless connection. Specifically, the application layer's application keep-alive capability is positively correlated with the degree of positive impact of the application layer's application keep-alive capability on the link quality of the wireless connection, and the degree of positive impact of the application layer's application keep-alive capability on the link quality of the wireless connection is positively correlated with the application layer's scoring weight; that is, the application layer's application keep-alive capability is positively correlated with the application layer's scoring weight.

[0076] For example, when the scores are fused into a weighted score, the weighted score can be obtained by weighting the scores of the physical layer with the target health score of the physical layer, the data link layer with the target health score of the data link layer, the network layer with the target health score of the network layer, and the application layer with the target health score of the application layer. That is, the fused score = physical layer score weight × physical layer target health score + data link layer score weight × data link layer target health score + network layer score weight × network layer target health score + application layer score weight × application layer target health score. This can be illustrated by formula (1):

[0077] In formula (1), S represents the fused score, Score1 represents the target health score of the physical layer, Score2 represents the target health score of the data link layer, Score3 represents the target health score of the network layer, and Score4 represents the target health score of the application layer. α represents the score weight of the physical layer, β represents the score weight of the data link layer, γ represents the score weight of the network layer, and δ represents the score weight of the application layer. α+β+γ+δ=1.

[0078] For example, if α is 0.2, β is 0.3, γ is 0.25, and δ is 0.25, then S = 0.2 × Score1 + 0.3 × Score2 + 0.25 × Score3 + 0.25 × Score4.

[0079] Optionally, when the scores are fused into an unweighted score, the target health scores of the physical layer, data link layer, network layer, and application layer can be accumulated to obtain the accumulated score, i.e., the fused score. That is, the fused score = physical layer target health score + data link layer target health score + network layer target health score + application layer target health score.

[0080] Optionally, when obtaining the weighted score or the accumulated score, in order to avoid score imbalance, the weighted score or the accumulated score can be normalized to obtain the normalized weighted score or the normalized accumulated score, and the normalized weighted score or the normalized accumulated score can be determined as the target score.

[0081] In this embodiment, the target score for wireless connectivity obtained through weighted scoring is more consistent with the actual link quality of the wireless connection, thus improving the accuracy of the target score. Furthermore, with a more accurate target score, the wireless connection can be maintained more precisely and effectively, further preventing wireless connection interruptions.

[0082] In one implementation, multiple score ranges of the wireless connection link quality are obtained; the above-mentioned determination of the target fault tolerance strategy and the target recovery strategy based on the target score includes: determining a second score range in which the target score is located among the multiple score ranges of the wireless connection link quality; and determining the target fault tolerance strategy and the target recovery strategy based on the second score range.

[0083] There is a correspondence between the target score's scoring range and the fault tolerance strategy, and a correspondence between the target score's scoring range and the recovery strategy. The multiple scoring ranges corresponding to the link quality of wireless connections differ from the multiple scoring ranges for various health indicators. For example, when determining the target fault tolerance strategy and / or target recovery strategy, multiple score ranges corresponding to the link quality of the wireless connection can be obtained first, and then the target fault tolerance strategy and / or target recovery strategy can be determined based on the multiple score ranges corresponding to the link quality of the wireless connection.

[0084] Specifically, among multiple scoring ranges of the link quality of wireless connection, the scoring range in which the target score is located (which can be called the "second scoring range") is determined. Then, based on the second scoring range in which the target score is located, the fault tolerance strategy and / or recovery strategy corresponding to the second scoring range in which the target score is located is determined, and the fault tolerance strategy and / or recovery strategy is determined as the target fault tolerance strategy and / or target recovery strategy.

[0085] Optionally, the connection status of the wireless connection corresponding to the second scoring range in which the target score is located is determined by using the second scoring range in which the target score is located. Then, the target fault tolerance strategy and / or target recovery strategy corresponding to the connection status of the wireless connection are determined by using the connection status of the wireless connection. Here, different scoring ranges in which the target score is located correspond to different connection statuses of the wireless connection, and there is a correspondence between the scoring range in which the target score is located and the connection status of the wireless connection. The connection status of a wireless connection can include a near-disconnection state (referred to as the "first connection state"), a deteriorating state (referred to as the "second connection state"), a warning state (referred to as the "third connection state"), and an optimal connection state (referred to as the "fourth connection state"). The upper limit of the scoring range corresponding to the near-disconnection state is less than the lower limit of the scoring range corresponding to the deteriorating state, which in turn is less than the lower limit of the scoring range corresponding to the warning state, which is also less than the lower limit of the scoring range corresponding to the optimal connection state. Furthermore, the link quality of the wireless network corresponding to the near-disconnection state is less than that of the wireless network corresponding to the deteriorating state, which is less than that of the wireless network corresponding to the warning state, which is less than that of the optimal connection state. In other words, the probability of wireless connection interruption in the near-disconnection state is greater than that in the deteriorating state, which is greater than that in the warning state, which is greater than that in the optimal connection state.

[0086] The multiple scoring ranges corresponding to the link quality of the wireless connection can be preset or dynamically adjusted according to the link quality requirements of the wireless connection. This application embodiment does not limit this. The correspondence between the scoring range of the target score and the fault tolerance strategy, the correspondence between the scoring range of the target score and the recovery strategy, and the correspondence between the scoring range of the target score and the connection status of the wireless connection can all be preset or dynamically adjusted according to the link quality requirements of the wireless connection. This application embodiment does not limit this.

[0087] For example, the link quality rating ranges for wireless connections can be: 0 points ≤ rating ≤ 30 points, 30 points < rating ≤ 60 points, 60 points < rating ≤ 80 points, and 80 points < rating ≤ 100 points. When the rating is 0 points ≤ rating ≤ 30 points, it indicates extremely poor link quality, on the verge of disconnection. To avoid disconnection, a target fault tolerance strategy and / or target recovery strategy needs to be implemented. When the rating is 30 points < rating ≤ 60 points, it indicates relatively poor link quality, which is deteriorating and may result in disconnection. To avoid disconnection, a target fault tolerance strategy and / or target recovery strategy needs to be implemented. When the rating is 60 points < rating ≤ 80 points, it indicates relatively good link quality, generally with no possibility of disconnection, and is in a warning state. However, to avoid disconnection, a target fault tolerance strategy and / or target recovery strategy can still be implemented. When the rating is 80 points < rating ≤ 100 points, it indicates extremely good link quality, with no possibility of disconnection, and is in the optimal connection state. No target fault tolerance strategy and / or target recovery strategy needs to be implemented.

[0088] In this embodiment, the target fault tolerance strategy and target recovery strategy for wireless connection are determined by using a scoring range that corresponds to the fault tolerance strategy and recovery strategy. This allows for the division of the target score range for wireless connection, providing a criterion for evaluating the impact of the target score on the link quality of the wireless connection. This quantifies the influence relationship between the target score and the link quality of the wireless connection, thus ensuring objectivity and improving the accuracy of the link quality assessment. Furthermore, with a more accurate assessment of the link quality of the wireless connection, a more accurate target fault tolerance strategy and target recovery strategy can be determined.

[0089] In one implementation, determining the target fault-tolerance strategy based on the second scoring range includes: determining the first fault-tolerance strategy as the target fault-tolerance strategy when the upper limit of the second scoring range is less than or equal to the first scoring threshold and the lower limit of the second scoring range is greater than the second scoring threshold; determining the second fault-tolerance strategy as the target fault-tolerance strategy when the upper limit of the second scoring range is less than or equal to the second scoring threshold and the lower limit of the second scoring range is greater than the third scoring threshold; and determining the third fault-tolerance strategy as the target fault-tolerance strategy when the upper limit of the second scoring range is less than or equal to the third scoring threshold and the lower limit of the second scoring range is greater than the fourth scoring threshold.

[0090] The first fault-tolerance strategy represents a fault-tolerance strategy that maintains the data resolution of the wireless connection; the second fault-tolerance strategy represents a fault-tolerance strategy that reduces the data resolution of the wireless connection; and the third fault-tolerance strategy represents a fault-tolerance strategy that reduces the data resolution of the wireless connection to the minimum allowable resolution. Furthermore, the first scoring threshold is greater than the second scoring threshold, which is greater than the third scoring threshold, which is greater than the fourth scoring threshold. For example, the first scoring threshold is 80, the second scoring threshold is 60, the third scoring threshold is 30, and the fourth scoring threshold is 0. The first, second, third, and fourth scoring thresholds can all be preset or dynamically adjusted according to the link quality requirements of the wireless connection; this embodiment does not limit this.

[0091] For example, when the second score range is (60, 80), it indicates that the wireless connection link quality is relatively good. In this case, it is not necessary to reduce the data resolution of the wireless connection to reduce the transmission load and avoid wireless connection interruption. Therefore, the data resolution of the wireless connection can be maintained unchanged (i.e., the first fault tolerance strategy) to ensure the clarity of the wireless connection data output. In addition, based on determining the first fault tolerance strategy as the target fault tolerance strategy, pre-stored multi-frame data can also be determined as the target fault tolerance strategy; that is, when the second score range is (60, 80), the target fault tolerance strategy includes the first fault tolerance strategy and pre-stored multi-frame data. By pre-stored multi-frame data, the problem of data transmission interruption caused by short-term data loss of the wireless connection when the target score is within the second score range can be avoided, so that the user will not be unable to receive transmitted data due to short-term data loss of the wireless connection, thereby realizing normal use of the wireless connection without the user's awareness. For example, the pre-stored multi-frame data is 3 frames of data or 4 frames of data, which can be preset or dynamically adjusted according to the link quality requirements of the wireless connection. This application embodiment does not limit this.

[0092] Furthermore, when the second scoring range is (60, 80), the target resolution for the reduction in wireless connection data resolution can be determined in advance. This allows for preparation for the reduction in wireless connection data resolution and avoids delays caused by temporarily determining the target resolution, which could lead to wireless connection interruption. It should be understood that the target resolution is lower than the current wireless connection data resolution. For example, if the current wireless connection data resolution is 1080P, the target resolution could be 720P; or, if the current wireless connection data resolution is 720P, the target resolution could be 480P, etc.

[0093] For example, when the second score range is (30, 60), it indicates that the wireless connection link quality is poor. In this case, it is necessary to adaptively reduce the data resolution of the wireless connection to reduce the transmission load of the wireless connection and avoid wireless connection interruption. Therefore, the data resolution of the wireless connection can be adaptively reduced (i.e., the second fault tolerance strategy) to avoid the wireless connection being interrupted due to excessive transmission load. Furthermore, since the wireless connection is not on the verge of interruption when the target score is within the second score range (30, 60), directly reducing the data resolution of the wireless connection to the minimum allowed resolution will not ensure the clarity of the wireless connection's data output. Therefore, in order to ensure the clarity of the wireless connection's data output as much as possible and avoid data output stuttering and black screen, the data resolution of the wireless connection does not need to be reduced to the minimum allowed resolution of the wireless connection. It only needs to be adaptively reduced, that is, the reduced data resolution of the wireless connection is greater than the minimum allowed resolution of the wireless connection and less than the current data resolution of the wireless connection.

[0094] For example, if the current data resolution of the wireless connection is 1080P and the minimum allowed resolution for the wireless connection is 480P, then the reduced data resolution of the wireless connection can be 720P.

[0095] Optionally, there may be a grade gradient between the current data resolution of the wireless connection and the reduced data resolution of the wireless connection. The grade gradient corresponding to the current data resolution of the wireless connection is higher than the grade gradient corresponding to the reduced data resolution of the wireless connection, and the grade gradient is positively correlated with the transmission load of the wireless connection.

[0096] The minimum allowed resolution for the wireless connection refers to the resolution at which normal data output will not be affected. If the reduced data resolution of the wireless connection is lower than the minimum allowed resolution, it may result in abnormal data output, such as poor visibility of the output image data or excessive noise in the output audio data. The minimum allowed resolution for the wireless connection can be 480P or 360P, etc., and can be preset or dynamically adjusted according to the link quality requirements of the wireless connection. This application does not limit this.

[0097] For example, when the second score range is (0, 30), it indicates that the wireless connection link quality is extremely poor. In this case, to avoid high transmission load leading to wireless connection interruption, the data resolution of the wireless connection can be reduced to the minimum resolution allowed by the wireless connection (i.e., the third fault tolerance strategy), thereby minimizing the transmission load of the wireless connection and avoiding wireless connection interruption. Furthermore, based on determining the third fault tolerance strategy as the target fault tolerance strategy, disabling the target application can also be determined as the target fault tolerance strategy; that is, when the third score range is (0, 30), the target fault tolerance strategy includes the third fault tolerance strategy and disabling the target application. Applications. Target applications refer to applications in the vehicle terminal that are unrelated to vehicle driving operations, such as at least one of music playback applications, game applications, weather applications, etc. Applications related to vehicle driving operations must be kept always on, such as at least one of navigation applications, voice control applications, etc. This is because applications related to vehicle driving operations (which can be called "non-target applications") will affect the driving safety of the vehicle. It is not possible to close non-target applications to avoid wireless connection interruption, thereby threatening the driving safety of the vehicle. During vehicle driving operations, it is necessary to ensure that non-target applications are always on to ensure the driving safety of the vehicle.

[0098] It should be noted that when the second score is 0, it means that the wireless connection has been interrupted. At this time, adjusting the data resolution of the wireless connection will not prevent the wireless connection from being interrupted, and the wireless connection needs to be restored.

[0099] In this embodiment, determining the target fault tolerance strategy for the wireless connection by defining the specific interval within which the scoring range falls ensures a match between the target fault tolerance strategy and the scoring range. This allows the target fault tolerance strategy to better reflect the actual link quality of the wireless connection, improving its accuracy. Furthermore, with a more accurate target fault tolerance strategy, the wireless connection can be maintained more precisely and effectively, further preventing wireless connection interruptions.

[0100] In one implementation, determining the target recovery strategy based on the second scoring range includes: determining the first recovery strategy as the target recovery strategy when the upper limit of the second scoring range is less than or equal to the third scoring threshold and the lower limit of the second scoring range is greater than the fourth scoring threshold; and determining the second recovery strategy as the target recovery strategy when the lower limit of the second scoring range is less than or equal to the fourth scoring threshold.

[0101] The first recovery strategy represents a recovery strategy for optimizing the health indicators of each communication layer; the second recovery strategy represents a recovery strategy for reconnecting when the wireless connection is interrupted.

[0102] For example, when the second score range is (0, 30), it indicates that the link quality of the wireless connection is extremely poor. In this case, in order to restore the link quality of the wireless connection, the health indicators of each communication layer can be optimized (i.e., the first recovery strategy) to improve the health indicators of each communication layer.

[0103] Optionally, when optimizing the health indicators of each communication layer, the health indicators of each communication layer can be optimized according to a preset priority. That is, the first recovery strategy is used to represent the recovery strategy for optimizing the health indicators of each communication layer according to the preset priority. The preset priority can represent the priority at which the wireless connection communication link can be successfully established. For example, the priority of the physical layer is higher than that of the data link layer, which is higher than that of the network layer, which is higher than that of the application layer. The health indicators of the communication layers with higher priority are optimized first, and then the health indicators of the communication layers with lower priority are optimized, until the health indicators of multiple communication layers are all optimized. If the health indicators of each communication layer are not optimized according to the preset priority, it may result in the inability to improve the link quality of the wireless connection, and may even lead to a decrease in the link quality of the wireless connection, thereby causing the wireless connection to be interrupted.

[0104] Optionally, when the second score range is (0, 30), in order to optimize the health indicators of each communication layer, preset health indicators of each communication layer can be cached first, namely, the preset RSSI of the physical layer, the preset retransmission rate of the data link layer, the preset heartbeat latency of the network layer, and the preset keep-alive capability of the application layer, so as to optimize the health indicators of each communication layer to the preset health indicators of each communication layer according to the preset priority. That is, the first recovery strategy is used to represent the recovery strategy of optimizing the health indicators of each communication layer to the preset health indicators of each communication layer according to the preset priority. Among them, the wireless connection corresponding to the preset health indicators of each communication layer has excellent link quality, will not be disconnected, and is in the best connection state. The health score corresponding to the preset health indicators of each communication layer is greater than the first score threshold (e.g., 80). The preset health indicators of each communication layer can be preset or dynamically adjusted according to the link quality requirements of the wireless connection. This application embodiment does not limit this.

[0105] For example, when optimizing the RSSI of the physical layer, a signal enhancement algorithm can be used to optimize the current RSSI of the physical layer to a preset RSSI and maintain it for a preset duration. At this point, if the health score of the physical layer's RSSI is greater than or equal to 80 points and maintained for the preset duration, the RSSI optimization is successful. After successful RSSI optimization, the signal enhancement algorithm is stopped. Optimizing RSSI using a signal enhancement algorithm avoids adjusting the transmit power of the wireless data transmitter (e.g., a mobile terminal), preventing electromagnetic compatibility (EMC) conflicts between wireless devices. This allows focus on optimizing the RSSI of the wireless data receiver (e.g., an in-vehicle terminal), thereby improving the sensitivity and accuracy of physical layer signal reception.

[0106] Furthermore, when optimizing the data retransmission rate at the data link layer, a link redundancy coding mechanism can be used to optimize the current data retransmission rate at the data link layer to a preset retransmission rate and maintain it for a preset duration. At this point, if the health score of the data link layer's data retransmission rate is greater than or equal to 80 points and maintained for the preset duration, the data link layer's data retransmission rate optimization is considered successful. After successful optimization of the data link layer's data retransmission rate, the link redundancy coding mechanism should be discontinued. Optimizing the data link layer's data retransmission rate through the link redundancy coding mechanism can reduce the data retransmission rate at the data link layer, ensuring normal data transmission.

[0107] Furthermore, when optimizing the heartbeat latency of the network layer, a link heartbeat mechanism can be used to optimize the current heartbeat latency of the network layer to a preset heartbeat latency and maintain it for a preset duration. At this point, if the health score of the network layer's heartbeat latency is greater than or equal to 80 points and maintained for the preset duration, the network layer heartbeat latency optimization is successful. After successful optimization of the network layer's heartbeat latency, the link heartbeat mechanism is discontinued for further optimization. Optimizing the network layer's heartbeat latency through the link heartbeat mechanism ensures uninterrupted wireless data transmission, meeting the real-time requirements of wireless connections.

[0108] Furthermore, when optimizing the application keep-alive capability of the application layer, an application keep-alive mechanism can be used to optimize the current application keep-alive capability of the application layer to a preset keep-alive capability and maintain it for a preset duration. At this time, if the health score of the application keep-alive capability of the application layer is greater than or equal to 80 points and maintained for the preset duration, the optimization of the application keep-alive capability of the application layer is successful. After the application keep-alive capability of the application layer is successfully optimized, no further optimization of the application keep-alive capability of the application layer will be performed.

[0109] The signal enhancement algorithm can be any one of statistical filtering and smoothing, dynamic gain compensation, or Kalman tracking. The link redundancy coding mechanism can be any one of forward error correction coding and network coding, interleaving coding, or cyclic redundancy check extension. The link heartbeat mechanism can be any one of fixed-interval heartbeat, unidirectional heartbeat + bidirectional ACK, or short-interval heartbeat. The application keep-alive mechanism can be any one of continuous background service wake-up or full multi-process protection.

[0110] The preset duration can represent the minimum safe duration for successful optimization of the health indicators of each communication layer, such as 3 seconds or 5 seconds. It can be preset or dynamically adjusted according to the link quality requirements of the wireless connection. This application embodiment does not limit this.

[0111] Optionally, if the second score range is (0, 30], it indicates that there is a high probability of wireless connection interruption. Therefore, in order to quickly restore the wireless connection after it is interrupted, the current health indicators of each communication layer can be cached first.

[0112] For example, if the second score range is 0, it indicates that the wireless connection has been interrupted. In this case, optimizing the health indicators of each communication layer can no longer prevent the wireless connection from being interrupted. It is necessary to use the health indicators of each communication layer cached before the wireless connection was interrupted to quickly restore the wireless connection and improve the efficiency of wireless connection recovery.

[0113] Optionally, when quickly restoring the wireless connection, Fast Handshake Authentication can be initiated to reconnect the wireless connection, shortening the reconnection time, for example, to less than 300ms. This eliminates the need for manual user intervention to reconnect, thus improving the convenience of wireless connection reconnection and enhancing the user experience.

[0114] Optionally, when optimizing the health indicators of each communication layer, multiple frames of wireless connection data can be pre-stored to ensure continuous output of wireless connection data.

[0115] Optionally, after optimizing the health indicators of each communication layer, the optimized health indicators of each communication layer can be reused as the health indicators for each communication layer used by the wireless connection, and a target score can be determined based on the health indicators of each communication layer. When the target score is obtained, the target data resolution of the wireless connection can be determined using this score, and the data resolution of the wireless connection can be increased to the target resolution to improve the clarity of the wireless connection's data output. Different target scores correspond to different target data resolutions for the wireless connection, and the target score is positively correlated with the target data resolution of the wireless connection. For example, a target score of 85 corresponds to a target resolution of 1080P, and a target score of 80 corresponds to a target resolution of 720.

[0116] For example, if the current wireless connection resolution is 720P, and the target score is 85 points for a preset duration, the wireless connection resolution can be increased from 720P to 1080P. Alternatively, if the current wireless connection resolution is 480P, and the target score is 80 points for a preset duration, the wireless connection resolution can be increased from 480P to 720P.

[0117] In this embodiment, determining the target recovery strategy for the wireless connection by defining the specific interval within the scoring range ensures a match between the target recovery strategy and the scoring range. This allows the target recovery strategy to better reflect the actual link quality of the wireless connection, improving its accuracy. Furthermore, with a more accurate target recovery strategy, the wireless connection can be maintained more precisely and effectively, further preventing wireless connection interruptions. Additionally, a second recovery strategy can proactively reconnect the wireless connection in the event of an interruption, eliminating the need for manual reconnection by the user, thus improving reconnection efficiency and enhancing the user experience.

[0118] Figure 3 This is another flowchart illustrating a wireless connection maintenance method provided in this application. The method can be executed by an electronic device, for example, by... Figure 1 The vehicle-mounted terminal 101 in the vehicle executes the command, or is executed by... Figure 1 The mobile terminal 102 in the middle executes.

[0119] For example, such as Figure 3 As shown, the method 300 includes the following implementation process: S11, obtain the signal reception strength of the physical layer, the data retransmission rate of the data link layer, the heartbeat delay of the network layer, and the application keep-alive capability of the application layer, and obtain the weights of the signal reception strength, the data retransmission rate, the heartbeat delay, and the application keep-alive capability.

[0120] For example, when an electronic device is powered on, in order to avoid interference from wireless interference sources when the electronic device makes a wireless connection, the signal reception strength of the physical layer, the data retransmission rate of the data link layer, the heartbeat delay of the network layer, and the application keep-alive capability of the application layer used by the electronic device in real time during the wireless connection can be obtained, as well as the weights of the signal reception strength (i.e., α above), the data retransmission rate (i.e., β above), the heartbeat delay (i.e., γ above), and the application keep-alive capability (i.e., δ above).

[0121] S12, calculate the physical layer health score (i.e., the aforementioned Score1) based on the signal reception strength of the physical layer.

[0122] S13, calculate the health score of the data link layer (i.e., Score2 above) based on the data retransmission rate of the data link layer.

[0123] S14, calculate the health score of the network layer (i.e., Score3 above) based on the heartbeat delay of the network layer.

[0124] S15, calculate the application layer health score (i.e., the above-mentioned Score 4) based on the application layer's application keep-alive capability.

[0125] It should be understood that S12, S13, S14, and S15 can be executed simultaneously or sequentially, and the embodiments of this application do not limit this.

[0126] S16, a weighted score is calculated for the physical layer health score and the weight of the signal reception strength, the data link layer health score and the weight of the data retransmission rate, the network layer health score and the weight of the heartbeat delay, and the application layer health score and the weight of the application keep-alive capability, to obtain the comprehensive health score of the wireless connection (i.e., S above).

[0127] S17 determines the connection status of the wireless connection based on the score range of the overall health score of the wireless connection.

[0128] For example, first determine the scoring range of the comprehensive health score of the wireless connection (i.e., the second scoring range mentioned above), and then determine the connection status of the wireless connection as a state of imminent disconnection, deterioration, warning, or optimal connection through the scoring range.

[0129] S18, determine the fault tolerance strategy and / or recovery strategy of the wireless connection based on the connection status of the wireless connection.

[0130] For example, the fault tolerance strategy (i.e., the target fault tolerance strategy mentioned above) and / or recovery strategy (i.e., the target recovery strategy mentioned above) corresponding to the connection status of the wireless connection are determined.

[0131] S19, maintain the wireless connection through fault tolerance and / or recovery strategies to ensure wireless connection continuity.

[0132] For example, wireless connections can be maintained through fault tolerance and / or recovery strategies to reduce the probability of wireless connection interruption and ensure continuous wireless connectivity to the greatest extent possible.

[0133] It should be noted that, Figure 3 The relevant steps in Figure 2 The corresponding embodiments are described in detail, and will not be repeated here.

[0134] Figure 4 This is another schematic flowchart illustrating a wireless connection maintenance method provided in an embodiment of this application. This method can be executed by an electronic device, for example, by... Figure 1 The vehicle-mounted terminal 101 in the vehicle executes the command, or is executed by... Figure 1 The mobile terminal 102 in the middle executes.

[0135] For example, such as Figure 4 As shown, the method 400 includes the following implementation process: S21, obtain all fault tolerance policies and all recovery policies for the wireless connection.

[0136] For example, when an electronic device is powered on, in order to avoid interference from wireless interference sources when the electronic device makes a wireless connection, all fault tolerance strategies for the wireless connection can be obtained, namely the first fault tolerance strategy, the second fault tolerance strategy and the third fault tolerance strategy mentioned above, and all recovery strategies for the wireless connection can be obtained, namely the first recovery strategy and the second recovery strategy mentioned above.

[0137] S22, determine whether all fault tolerance strategies and all recovery strategies have passed authentication. If yes, proceed to S23; otherwise, proceed to S26.

[0138] For example, to avoid conflicts between fault tolerance strategies, recovery strategies, and the Protocol Conformance Test Suite (PCTS), certification compatibility design can be implemented for fault tolerance strategies and recovery strategies. This ensures that the fault tolerance strategies and recovery strategies can pass PCTS certification, achieving adaptation and optimization for fault tolerance strategy and recovery strategy certification. This avoids the adverse effects of fault tolerance strategies and recovery strategies on the response speed of wireless connection data input, preventing a decrease in response speed; it also avoids affecting the communication protocol between the application layer and the vehicle terminal, ensuring normal interaction between the communication protocol between the application layer and the vehicle terminal; and it avoids certification failures caused by health indicators of various communication layers exceeding limits, ensuring smooth certification.

[0139] Specifically, in the authentication compatibility design, the fault tolerance and recovery strategies do not modify the standard wireless connection protocol (which can be called the "official core protocol"). For example, the input event forwarding logic is not changed, gestures are not customized, and input priorities are not adjusted. The system strictly matches the PCTS authentication test case standard, thus avoiding authentication conflicts at the protocol level from the root. Furthermore, adjustments to the health indicators of each communication layer are controlled within the range allowed by the standard wireless connection protocol. The system retains standard protocol compatibility options for wireless connections, allowing for rapid switching of the health indicators of each communication layer to their preset health indicators (which can be called "official default parameters") when authentication fails due to health indicators exceeding limits, based on authentication testing requirements.

[0140] Therefore, authentication is considered successful if all fault tolerance strategies and all recovery strategies pass authentication; authentication is considered unsuccessful if any one of the fault tolerance strategies and all recovery strategies fails authentication. If authentication succeeds, execute S23; if authentication fails, execute S26.

[0141] S23 determines the connection status of the wireless connection through a comprehensive health score of the wireless connection.

[0142] For example, the connection status of a wireless connection can be determined by the range of its overall health score.

[0143] S24, determine the fault tolerance strategy and / or recovery strategy of the wireless connection based on the connection status of the wireless connection.

[0144] S25, maintains the wireless connection through fault tolerance and / or recovery strategies to ensure wireless connectivity.

[0145] S26, maintain the wireless connection using the default parameters of the wireless connection to ensure the wireless connection is established.

[0146] For example, preset health indicators for each communication layer are used to maintain the wireless connection, reducing the probability of wireless connection interruption and ensuring continuous wireless connection to the greatest extent possible.

[0147] It should be noted that, Figure 4 The relevant steps in Figure 2 and Figure 3 The corresponding embodiments are described in detail, and will not be repeated here.

[0148] Figure 5 This is another flowchart illustrating a wireless connection maintenance method provided in an embodiment of this application. The method can be executed by an electronic device, for example, by... Figure 1 The vehicle-mounted terminal 101 in the vehicle executes the command, or is executed by... Figure 1 The mobile terminal 102 in the middle executes.

[0149] For example, such as Figure 5 As shown, the method 500 includes the following implementation process: S31, obtains a comprehensive health score for wireless connectivity.

[0150] For example, by Figures 2 to 4 The illustrated embodiment calculates a comprehensive health score for wireless connectivity.

[0151] Optionally, when obtaining the overall health score of the wireless connection, the overall health score of the wireless connection can be obtained at a preset frequency. The preset frequency can be set in advance or dynamically adjusted according to the link quality requirements of the wireless connection; this embodiment does not limit this. For example, the preset frequency is once every 100ms or once every 50ms, etc.

[0152] S32, determine if the overall health score is ≤30. If yes, proceed to S33; otherwise, proceed to S31.

[0153] For example, when obtaining the overall health score, it can be determined whether the overall health score is ≤30. If the overall health score is ≤30, it indicates that the wireless connection link quality is poor and is likely to be interrupted, requiring real-time monitoring of the wireless connection status, thus executing S33. If the overall health score is >30, it indicates that the wireless connection link quality is good and the possibility of interruption is small, but to avoid a decrease in the wireless connection link quality during subsequent use, S31 can continue to be executed.

[0154] S33, determine if the overall health score is 0. If yes, proceed to S36; otherwise, proceed to S34.

[0155] For example, if the overall health score is ≤30, it can be further determined whether the overall health score is 0. If the overall health score is ≤30 and not 0, it indicates that although the wireless connection has poor link quality, it has not been interrupted, and the wireless connection can be restored to improve the link quality, so S34 is executed. However, if the overall health score is 0, it indicates that the wireless connection has been interrupted. At this time, optimizing the health indicators of each communication layer can no longer prevent the wireless connection from being interrupted, and the wireless connection needs to be reconnected, so S36 is executed.

[0156] S34 determines the wireless connection recovery strategy based on the comprehensive health score of the wireless connection.

[0157] For example, the connection status of a wireless connection is determined by the range of its overall health score. Based on this connection status, a recovery strategy for the wireless connection is then determined.

[0158] S35 maintains the wireless connection through a wireless connection recovery strategy to ensure wireless connectivity.

[0159] For example, a wireless connection recovery strategy can be used to maintain the wireless connection, reduce the probability of wireless connection interruption, and ensure continuous wireless connection to the greatest extent possible.

[0160] S36 uses cached health metrics to maintain the wireless connection and ensure it remains connected.

[0161] For example, the wireless connection can be quickly restored by using health indicators of each communication layer cached before the wireless connection was interrupted, so that the wireless connection can be re-established.

[0162] It should be noted that, Figure 5 The relevant steps in Figures 2 to 4 The corresponding embodiments are described in detail, and will not be repeated here.

[0163] Figure 6 This is another flowchart illustrating a wireless connection maintenance method provided in an embodiment of this application. The method can be executed by an electronic device, for example, by... Figure 1 The vehicle-mounted terminal 101 in the vehicle executes the command, or is executed by... Figure 1 The mobile terminal 102 in the middle executes.

[0164] For example, such as Figure 6 As shown, the method 600 includes the following implementation process: S41, When the electronic device starts to make a wireless connection, the wireless connection of the electronic device is initialized.

[0165] For example, when an electronic device is powered on, if it is detected that the electronic device has started to make a wireless connection, the electronic device can be initialized for wireless connection. Wireless connection initialization includes loading at least one of the following: a scoring algorithm for the health score of the wireless connection (i.e., formula (1) above), all fault tolerance strategies and all recovery strategies supported by the wireless connection, PCTS certification, etc.

[0166] S42, obtain a comprehensive health score for wireless connectivity.

[0167] For example, after initialization is complete, it can be done through Figures 2 to 5 The illustrated embodiment calculates a comprehensive health score for wireless connectivity.

[0168] S43 determines the fault tolerance and / or recovery strategies for the wireless connection based on a comprehensive health score of the wireless connection.

[0169] For example, the connection status of a wireless connection is determined by the range of its overall health score. The connection status is then used to determine the fault tolerance and / or recovery strategies for the wireless connection.

[0170] S44 synchronizes the overall health score of wireless connectivity, the fault tolerance strategy and / or recovery strategy of wireless connectivity to the cloud and other electronic devices.

[0171] For example, encryption algorithms are used to synchronize the comprehensive health score, fault tolerance strategy, and / or recovery strategy of the wireless connection to the cloud and other electronic devices, ensuring collaborative operation among multiple electronic devices. By synchronizing wireless connection-related information with other electronic devices, it is possible to control other wireless connections to use this information to adjust the data to be transmitted wirelessly, thereby maintaining the wireless connection through fault tolerance and / or recovery strategies. Specifically, other electronic devices (e.g., mobile terminals) can receive the synchronized wireless connection-related information through their own wireless communication modules. Upon receiving this information, they can adjust their own and the wireless connection's parameters accordingly, cooperating with the electronic device (e.g., an in-vehicle terminal) to execute the wireless connection's fault tolerance and / or recovery strategies. For example, other electronic devices can synchronously adjust the data resolution of the wireless connection. Furthermore, other electronic devices can also feed back the adjusted wireless connection parameters to the electronic device, allowing the electronic device to optimize the wireless connection's health score algorithm, fault tolerance strategy, and / or recovery strategy. Moreover, other electronic devices will adhere to standard wireless connection protocols to avoid PCTS certification failures, thereby ensuring successful wireless connection establishment.

[0172] The wireless connection information includes a comprehensive health score, fault tolerance strategies, and / or recovery strategies. The wireless connection parameters include at least one of the following: the RSSI of other electronic devices, the resolution of the wireless data transmission, and the connection status.

[0173] Furthermore, by synchronizing wireless connection information with the cloud, the cloud can optimize the wireless connection health scoring algorithm, fault tolerance strategy, and / or recovery strategy based on this information. This optimized approach allows for better maintenance of the wireless connection, reducing the probability of interruptions. It should be understood that synchronizing wireless connection information with other electronic devices and the cloud does not synchronize the electronic device's privacy data (also known as "sensitive data"), thus ensuring data security. Privacy data may include at least one of the following: user data, location, and operational data of the electronic device. Specifically, when optimizing the scoring algorithm, fault tolerance strategy, and / or recovery strategy for wireless connections, the cloud can synchronize relevant wireless connection information across multiple electronic devices. This optimization allows the improved algorithms to adapt to different usage scenarios, vehicle models, and operating system versions, thereby enhancing the accuracy of the wireless connection health score and the effectiveness of the fault tolerance and / or recovery strategies in maintaining wireless connections. Furthermore, the cloud can synchronize PCTS certification requirements and push the required certification data to electronic devices to ensure their fault tolerance and / or recovery strategies pass PCTS certification, preventing wireless connection failures due to PCTS certification issues.

[0174] The application scenarios can include at least one of the following: urban commercial districts, highways, underground parking garages, etc. The encryption algorithm can be any one of the following: Advanced Encryption Standard (AES)-128 encryption, Elliptic Curve Cryptography, Secure Hash Algorithm 1, etc.

[0175] S45, determine whether the wireless connection has been disconnected by the user. If yes, proceed to S49; otherwise, proceed to S46.

[0176] For example, determine whether the wireless connection has been disconnected by the user. If the wireless connection is actively disconnected by the user, it means that the user no longer needs the wireless connection and there is no need to maintain the wireless connection, so execute S49. If the wireless connection is not actively disconnected by the user, it means that the user still needs the wireless connection. Even if the wireless connection is interrupted, it may be due to poor link quality, not that the user is no longer using the wireless connection, so execute S46.

[0177] S46, determine whether the fault tolerance strategy and / or recovery strategy have passed authentication. If yes, proceed to S47; otherwise, proceed to S48.

[0178] For example, to avoid conflicts between fault tolerance and / or recovery strategies and the PCTS, the fault tolerance and / or recovery strategies can be certified by the PCTS. If the fault tolerance and / or recovery strategy is certified successfully, it indicates that there is no conflict between the fault tolerance and / or recovery strategy and the PCTS, and the fault tolerance and / or recovery strategy can be executed normally. Therefore, when the fault tolerance and / or recovery strategy is certified, step S47 is executed. If the fault tolerance and / or recovery strategy fails to be certified, it indicates that there may be a conflict between the fault tolerance and / or recovery strategy and the PCTS, and the fault tolerance and / or recovery strategy cannot be executed normally. Therefore, when the fault tolerance and / or recovery strategy fails to be certified, step S48 is executed.

[0179] S47, maintain the wireless connection using fault tolerance and / or recovery strategies to ensure wireless connectivity. Then continue executing S42.

[0180] S48, maintain the wireless connection using the default parameters to ensure the wireless connection is established. Then continue executing S41.

[0181] S49, end this wireless connection.

[0182] For example, when an electronic device begins to make a wireless connection, a connection log of the wireless connection can be recorded and synchronized to the cloud that communicates with the electronic device. This allows the cloud to use the connection log to optimize the scoring algorithm for the health score of the wireless connection, the fault tolerance strategy and / or recovery strategy of the wireless connection.

[0183] Optionally, when the electronic device ends the wireless connection, it can enter a standby state until S41 is executed.

[0184] It should be noted that, Figure 6 The relevant steps in Figures 2 to 5 The corresponding embodiments are described in detail, and will not be repeated here.

[0185] Figure 7 This is a schematic diagram of a wireless connection maintenance architecture provided in an embodiment of this application.

[0186] For example, such as Figure 7 As shown, the wireless connection maintenance architecture 700 in the electronic device includes a scoring module 710, a maintenance module 720, an authentication module 730, and a synchronization module 740.

[0187] The scoring module 710 is used to determine the target score of the wireless connection through the health indicators of the various communication layers used by the wireless connection.

[0188] The maintenance module 720 is used to determine the target fault tolerance strategy and / or target recovery strategy for the wireless connection based on the target score of the wireless connection, and to maintain the wireless connection using the target fault tolerance strategy and / or target recovery strategy to ensure wireless connection connectivity. The maintenance module 720 includes a fault tolerance module and a recovery module. The fault tolerance module determines the target fault tolerance strategy for the wireless connection based on the target score of the wireless connection and maintains the wireless connection using the target fault tolerance strategy. The recovery module determines the target recovery strategy for the wireless connection based on the target score of the wireless connection and maintains the wireless connection using the target recovery strategy to ensure wireless connection connectivity.

[0189] The authentication module 730 (also known as the "authentication compatibility module") is used to perform PCTS authentication on the target fault tolerance policy and / or target recovery policy of the wireless connection.

[0190] The synchronization module 740 (also known as the "status synchronization module") is used to synchronize information related to the wireless connection to other electronic devices and the cloud.

[0191] For ease of understanding Figures 2 to 7 The embodiments shown are illustrated in this application through the following usage scenarios: The system uses an in-vehicle terminal and a mobile terminal as two wirelessly connected devices. Both the in-vehicle terminal and the mobile terminal have the same wireless communication module required by the same wireless communication technology. Both the in-vehicle terminal and the mobile terminal support the Android system and can pass PCTS certification.

[0192] Furthermore, the usage scenarios for in-vehicle terminals and mobile terminals can include at least one of the following: urban commercial areas, highways, and underground parking garages. Wireless interference sources in urban commercial areas, highways, and underground parking garages can lead to poor wireless connection link quality. For example, wireless interference sources in urban commercial areas could be at least one of multiple Wi-Fi devices, public charging stations, or public cameras. Wireless interference sources on highways could be at least one of other vehicles, in-vehicle mobile hotspots, or high-voltage power lines. Wireless interference sources in underground parking garages could be at least one of other Bluetooth devices, vehicle radar, or garage ventilation fans.

[0193] Furthermore, the cloud, which communicates with the vehicle terminal, has synchronized the latest wireless connection health score algorithm, all fault tolerance policies and recovery policies supported by the wireless connection, and PCTS certification. The cloud then sends the wireless connection health score algorithm, all fault tolerance policies and recovery policies supported by the wireless connection, and PCTS certification to the vehicle terminal via Over-the-Air (OTA) remote wireless upgrade. This allows the vehicle terminal to update and load at least one of the following: wireless connection health score algorithm (i.e., S mentioned above), all fault tolerance policies and recovery policies supported by the wireless connection, and PCTS certification. This update and loading does not require additional vehicle hardware, saving the cost of update and loading.

[0194] Use Case 1: Urban Business District When vehicle ignition is detected, the in-vehicle terminal runs its installed Android system. The in-vehicle terminal initializes its wireless connection, loading at least one of the following: the latest wireless connection health score algorithm (i.e., S mentioned above), all fault tolerance strategies and recovery strategies supported by the wireless connection, and PCTS authentication, sent from the cloud connected to the in-vehicle terminal. It then starts the scoring module 710, maintenance module 720, authentication module 730, and synchronization module 740. Simultaneously, the mobile terminal also initializes its wireless connection, loading at least one of the following: the wireless connection health score algorithm (i.e., S mentioned above), all fault tolerance strategies and recovery strategies supported by the wireless connection, and PCTS authentication. Furthermore, when the in-vehicle terminal receives a wireless connection request from the mobile terminal, it can establish a wireless connection with the mobile terminal.

[0195] Assuming the physical layer RSSI is -85dBm, the data retransmission rate of the data link layer is 12%, the heartbeat delay of the network layer is 120ms, and the application keep-alive capability of the application layer is that all application functions are kept alive normally, based on Table 1, we can obtain the following health scores: physical layer RSSI -85dBm = 60 points, data link layer data retransmission rate 12% = 60 points, network layer heartbeat delay 120ms = 60 points, and application layer application keep-alive capability of all application functions being kept alive normally = 100 points. Also, assuming α is 0.2, β is 0.3, γ is 0.25, and δ is 0.25, we can calculate using formula (1): S = 0.2 × 60 + 0.3 × 60 + 0.25 × 60 + 0.25 × 100 = 70 points. A score of 70 corresponds to a wireless connection link quality score range of (60, 80). The wireless connection link quality is in a warning state, and the link quality can be maintained (i.e., the wireless connection is maintained) through the aforementioned first fault-tolerance strategy. Furthermore, the vehicle terminal can synchronize S and the first fault-tolerance strategy to the wireless connection mobile terminal via the synchronization module 740. Upon receiving S and the first fault-tolerance strategy, the mobile terminal can adjust its own and the wireless connection's relevant parameters using S and the first fault-tolerance strategy, cooperating with the vehicle terminal to execute the first fault-tolerance strategy. Additionally, the synchronization module 740 synchronizes S and the first fault-tolerance strategy to the cloud, enabling the cloud to optimize the algorithm of S and the first fault-tolerance strategy.

[0196] In order to avoid the wireless connection link quality deteriorating and failing to maintain and repair the wireless connection in time when S is calculated, S can be recalculated every 100ms until the wireless connection is actively disconnected by the user.

[0197] Assuming that the addition of two public charging piles leads to an increase in wireless interference sources in the city's business district, causing a deterioration in the quality of the wireless connection link, the physical layer RSSI becomes -92dBm, the data retransmission rate of the data link layer becomes 16%, the heartbeat delay of the network layer becomes 160ms, and the application keep-alive capability of the application layer remains normal for all application functions, according to Table 1, the health score corresponding to the physical layer RSSI of -92dBm is 30 points, the health score corresponding to the data retransmission rate of 16% of the data link layer is 30 points, the health score corresponding to the heartbeat delay of 160ms of the network layer is 30 points, and the health score corresponding to the application keep-alive capability of the application layer with normal keep-alive capability for all application functions is 100 points. The result is calculated by formula (1): S = 0.2×30 + 0.3×30 + 0.25×30 + 0.25×100 = 47.5 points. A score of 47.5 corresponds to a wireless connection link quality score range of (30, 60), indicating a deteriorated wireless connection link quality. This quality can be maintained using the aforementioned second fault-tolerance strategy. For example, the wireless connection data resolution can be reduced from 1080P to 720P. Furthermore, the vehicle terminal can synchronize S and the second fault-tolerance strategy to the wireless connection's mobile terminal via the synchronization module 740. Upon receiving S and the second fault-tolerance strategy, the mobile terminal can adjust its own parameters related to the wireless connection using these strategies, cooperating with the vehicle terminal to execute the second fault-tolerance strategy. Additionally, the synchronization module 740 can synchronize S and the second fault-tolerance strategy to the cloud, enabling the cloud to optimize the algorithm for S and the second fault-tolerance strategy.

[0198] When the vehicle leaves the city's business district, that is, away from the wireless interference sources in the city's business district, the quality of the wireless connection will gradually recover. The RSSI of the physical layer becomes -70dBm, the data retransmission rate of the data link layer becomes 4%, the heartbeat delay of the network layer becomes 40ms, and the application keep-alive capability of the application layer remains normal. According to Table 1, the health score corresponding to the RSSI of the physical layer of -70dBm is 80 points, the health score corresponding to the data retransmission rate of the data link layer of 4% is 100 points, the health score corresponding to the heartbeat delay of the network layer of 40ms is 100 points, and the health score corresponding to the application keep-alive capability of the application layer of normal application function is 100 points. The result is calculated by formula (1): S = 0.2×100 + 0.3×100 + 0.25×100 + 0.25×100 = 96 points. A score of 96 corresponds to a wireless connection link quality rating range of (80, 100). This indicates the wireless connection link quality is at its optimal state, meaning it is of extremely high quality and will not experience disconnections. Therefore, fault tolerance and / or recovery strategies are not required. Furthermore, the vehicle terminal can synchronize S and the second fault tolerance strategy to the wirelessly connected mobile terminal and the cloud via the synchronization module 740.

[0199] Subsequently, upon detecting that the wireless connection has been actively disconnected by the user, the recorded wireless connection log can be synchronized to the cloud connected to the electronic device. This allows the cloud to use the connection log to optimize the wireless connection health scoring algorithm, fault tolerance strategy, and / or recovery strategy. Additionally, the wireless connection log recorded by the authentication module 730 facilitates subsequent authentication.

[0200] Use Case 2: Highway When vehicle ignition is detected, the in-vehicle terminal runs its installed Android system. The in-vehicle terminal initializes its wireless connection, loading at least one of the following: the latest wireless connection health score algorithm (i.e., S mentioned above), all fault tolerance strategies and recovery strategies supported by the wireless connection, and PCTS authentication, sent from the cloud connected to the in-vehicle terminal. It then starts the scoring module 710, maintenance module 720, authentication module 730, and synchronization module 740. Simultaneously, the mobile terminal also initializes its wireless connection, loading at least one of the following: the wireless connection health score algorithm (i.e., S mentioned above), all fault tolerance strategies and recovery strategies supported by the wireless connection, and PCTS authentication. Furthermore, when the in-vehicle terminal receives a wireless connection request from the mobile terminal, it can establish a wireless connection with the mobile terminal.

[0201] Assuming the physical layer RSSI is -95dBm, the data retransmission rate of the data link layer is 25%, the heartbeat delay of the network layer is 200ms, and the application keep-alive capability of the application layer is that most application functions are kept alive normally, based on Table 1, we can obtain the following health scores: physical layer RSSI -95dBm = 30 points, data link layer data retransmission rate 25% = 30 points, network layer heartbeat delay 200ms = 30 points, and application layer application keep-alive capability that most application functions are kept alive normally = 80 points. Furthermore, assuming α is 0.2, β is 0.3, γ is 0.25, and δ is 0.25, we can calculate the following using formula (1): S = 0.2 × 30 + 0.3 × 30 + 0.25 × 30 + 0.25 × 80 = 42.5 points. A score of 42.5 corresponds to a wireless connection link quality score range of (30, 60), indicating a deteriorated wireless connection link quality. This quality can be maintained using the aforementioned second fault-tolerance strategy. Furthermore, the vehicle-mounted terminal can synchronize S and the second fault-tolerance strategy to the wirelessly connected mobile terminal via the synchronization module 740. Upon receiving S and the second fault-tolerance strategy, the mobile terminal can adjust its own and the wireless connection's relevant parameters using these strategies, cooperating with the vehicle-mounted terminal to execute the second fault-tolerance strategy. Additionally, the synchronization module 740 synchronizes S and the second fault-tolerance strategy to the cloud, enabling the cloud to optimize the algorithm for S and the second fault-tolerance strategy.

[0202] Suppose that a sharp increase in the number of other vehicles in the surrounding area leads to an increase in wireless interference sources on the highway, causing the link quality of the wireless connection to deteriorate, resulting in S dropping to 15 points. A score of 15 points corresponds to a wireless connection link quality score range of (0, 30], indicating the wireless connection link quality is on the verge of disconnection. The wireless connection link quality can be maintained using the aforementioned third fault-tolerance strategy and first recovery strategy. Furthermore, the vehicle-mounted terminal can synchronize S, the third fault-tolerance strategy, and the first recovery strategy to the wirelessly connected mobile terminal via the synchronization module 740. Upon receiving S, the third fault-tolerance strategy, and the first recovery strategy, the mobile terminal can adjust its own and the relevant parameters of the wireless connection using these strategies, cooperating with the vehicle-mounted terminal to execute the third fault-tolerance strategy and the first recovery strategy. Additionally, the synchronization module 740 synchronizes S, the third fault-tolerance strategy, and the first recovery strategy to the cloud, enabling the cloud to optimize the algorithm for S, the third fault-tolerance strategy, and the first recovery strategy.

[0203] It should be understood that the above examples are provided to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific values ​​or scenarios exemplified. Those skilled in the art can obviously make various equivalent modifications or variations based on the above examples, and such modifications or variations also fall within the scope of the embodiments of this application.

[0204] The above text combined Figures 1 to 7 The wireless connection maintenance method provided in the embodiments of this application is described in detail below; the following will be combined with Figure 8 and Figure 10 The apparatus embodiments of this application are described in detail below. It should be understood that the apparatus in the embodiments of this application can perform the various methods described in the foregoing embodiments of this application, that is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.

[0205] Figure 8 This is a schematic diagram of the structure of the wireless connection maintenance device provided in the embodiments of this application.

[0206] For example, such as Figure 8 As shown, the device 800 includes: The acquisition module 810 is used to acquire the health indicators of each communication layer used by the wireless connection, wherein the health indicators represent the communication characteristics that affect the link quality of the wireless connection. The processing module 820 is used to determine the target fault tolerance strategy and the target recovery strategy for the wireless connection based on the health indicators of each communication layer. The target fault tolerance strategy is used to adjust the data resolution of the wireless connection, and the target recovery strategy is used to optimize the link quality of the wireless connection. Based on the target fault tolerance strategy and the recovery strategy, the wireless connection is maintained to ensure that the wireless connection is connected.

[0207] In one possible implementation, the processing module 820 is used for: Based on the health indicators of each communication layer, a target score is determined. The target score is used to evaluate the link quality of the wireless connection, and the target score is positively correlated with the link quality of the wireless connection. Based on the target score, the target fault tolerance strategy and the target recovery strategy are determined.

[0208] In one possible implementation, the processing module 820 is used for: Based on the health indicators of each communication layer, a target health score for each communication layer is determined. The target health score of each communication layer is used to evaluate the link quality of wireless connections at each communication layer. The target health scores of each communication layer are fused to obtain the target score.

[0209] In one possible implementation, the acquisition module 810 is used for: Obtain multiple score ranges for various health indicators; Processing module 820 is used for: Among the multiple scoring ranges of various health indicators, determine the first scoring range in which the health indicators of each communication layer fall. Based on the first scoring range of the health indicators of each communication layer, the target health score of each communication layer is determined, wherein there is a corresponding relationship between the scoring range of the health indicators of each communication layer and the health score of each communication layer.

[0210] In one possible implementation, the processing module 820 is used for: Based on the degree of positive impact of the health indicators of each communication layer on the link quality of wireless connections, the scoring weight of each communication layer is determined, wherein the degree of positive impact is positively correlated with the scoring weight. The target score is obtained by weighting the score weights of each communication layer and the target health score of each communication layer.

[0211] In one possible implementation, the acquisition module 810 is used for: Obtain multiple score ranges for the link quality of the wireless connection; Processing module 820 is used for: Among multiple rating ranges for the link quality of wireless connectivity, determine the second rating range in which the target rating falls; Based on the second scoring range, the target fault tolerance strategy and the target recovery strategy are determined. There is a correspondence between the scoring range in which the target score is located and the fault tolerance strategy, and there is a correspondence between the scoring range in which the target score is located and the recovery strategy.

[0212] In one possible implementation, the processing module 820 is used for: If the upper limit of the second scoring range is less than or equal to the first scoring threshold, and the lower limit of the second scoring range is greater than the second scoring threshold, then the first fault-tolerance strategy is determined as the target fault-tolerance strategy. If the upper limit of the second scoring range is less than or equal to the second scoring threshold, and the lower limit of the second scoring range is greater than the third scoring threshold, then the second fault-tolerance strategy is determined as the target fault-tolerance strategy. If the upper limit of the second scoring range is less than or equal to the third scoring threshold, and the lower limit of the second scoring range is greater than the fourth scoring threshold, then the third fault-tolerance strategy is determined as the target fault-tolerance strategy. Among them, the first fault-tolerance strategy is used to represent a fault-tolerance strategy that keeps the data resolution of the wireless connection unchanged; the second fault-tolerance strategy is used to represent a fault-tolerance strategy that reduces the data resolution of the wireless connection; and the third fault-tolerance strategy is used to represent a fault-tolerance strategy that reduces the data resolution of the wireless connection to the minimum resolution allowed by the wireless connection.

[0213] In one possible implementation, the processing module 820 is used for: If the upper limit of the second scoring range is less than or equal to the third scoring threshold, and the lower limit of the second scoring range is greater than the fourth scoring threshold, then the first recovery strategy is determined as the target recovery strategy. If the lower limit of the second scoring range is less than or equal to the fourth scoring threshold, the second recovery strategy will be determined as the target recovery strategy. The first recovery strategy represents a recovery strategy for optimizing the health indicators of each communication layer; the second recovery strategy represents a recovery strategy for reconnecting when the wireless connection is interrupted.

[0214] It should be noted that the aforementioned device 800 is embodied in the form of a functional module. The term "module" here can be implemented in software and / or hardware, without specific limitations.

[0215] For example, a "module" can be a software program, hardware circuit, or a combination of both that implements the above functions. Hardware circuits may include application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or combined processors) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions.

[0216] Therefore, the modules of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0217] Figure 9 This is a schematic diagram of the controller provided in the embodiments of this application.

[0218] For example, such as Figure 9 As shown, the vehicle includes a controller 900, which includes a storage module 910 and a processing module 920. The storage module 910 stores executable program code 9101, and the processing module 920 is used to call and execute the executable program code 9101 to perform a wireless connection maintenance method.

[0219] Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.

[0220] For example, such as Figure 10As shown, the electronic device 1000 includes a memory 1010 and a processor 1020, wherein the memory 1010 stores executable program code 1011, and the processor 1020 is used to call and execute the executable program code 1011 to perform a wireless connection maintenance method.

[0221] It should be noted that the electronic device can be a smart device with wireless connectivity, including but not limited to: personal computers, tablets, handheld devices, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to a wireless modem. The electronic device may have different names in different networks, such as: user equipment, access electronic device, user unit, user station, mobile station, mobile station, remote station, remote electronic device, mobile device, user electronic device, electronic device, wireless communication device, user agent or user device, cellular phone, cordless phone, electronic device in a 5G network or future evolved network, etc. The comparison of embodiments in this application is not limited to these terms.

[0222] This application can divide electronic devices into functional modules based on the above method examples. For example, each module can correspond to a separate functional module, or two or more functions can be integrated into a single processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and represents only one logical functional division; in actual implementation, there may be other division methods.

[0223] When functional modules are divided according to their respective functions, the electronic device may include: an acquisition module and a processing module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0224] The electronic device provided in this application is used to perform the above-described wireless connection maintenance method, and thus can achieve the same effect as the above-described implementation method.

[0225] When using integrated units, the electronic device may include a processing module and a storage module. The processing module is used to control and manage the operation of the electronic device. The storage module is used to support the execution of relevant program code and data by the electronic device.

[0226] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and microprocessors, etc., and the storage module may be a memory.

[0227] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described in the foregoing embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs (Digital Video Discs), CD-ROMs (Compact Disc Read-Only Memory), microdrives, magneto-optical disks, ROMs (Read-Only Memory), RAMs (Random Access Memory), EPROMs (Erasable Programmable Read-Only Memory), EEPROMs (Electrically Erasable Programmable Read Only Memory), DRAMs (Dynamic Random Access Memory), VRAMs (Video Random Access Memory), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0228] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a wireless connection maintenance method as described in the above embodiments.

[0229] In addition, the electronic device provided in the embodiments of this application may specifically be a chip, component or module. The electronic device may include a connected processor and a memory. The memory is used to store instructions. When the electronic device is running, the processor may call and execute the instructions to make the chip execute a wireless connection maintenance method in the above embodiments.

[0230] The electronic devices, computer-readable storage media, computer program products or chips provided in this application are all used to perform the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0231] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

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

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

Claims

1. A wireless connection maintenance method, characterized in that, Applied to electronic devices, the method includes: Obtain health indicators for each communication layer used by the wireless connection, wherein the health indicators represent communication characteristics that affect the link quality of the wireless connection; Based on the health indicators of each of the communication layers, a target fault tolerance strategy and a target recovery strategy for the wireless connection are determined, wherein the target fault tolerance strategy is used to adjust the data resolution of the wireless connection, and the target recovery strategy is used to optimize the link quality of the wireless connection. Based on the target fault tolerance strategy and the target recovery strategy, the wireless connection is maintained to ensure that the wireless connection remains connected.

2. The method according to claim 1, characterized in that, The determination of the target fault tolerance strategy and target recovery strategy for the wireless connection based on the health indicators of each of the communication layers includes: Based on the health indicators of each of the communication layers, a target score is determined, wherein the target score is used to evaluate the link quality of the wireless connection, and the target score is positively correlated with the link quality of the wireless connection; Based on the target score, the target fault tolerance strategy and the target recovery strategy are determined.

3. The method according to claim 2, characterized in that, The determination of the target score based on the health indicators of each of the communication layers includes: Based on the health indicators of each of the communication layers, a target health score is determined for each of the communication layers, wherein the target health score of each of the communication layers is used to evaluate the link quality of the wireless connection at each of the communication layers; The target health scores of each of the communication layers are fused to obtain the target score.

4. The method according to claim 3, characterized in that, The method further includes: Obtain multiple score ranges for each of the aforementioned health indicators; The determination of the target health score for each communication layer based on the health indicators of each communication layer includes: Among the multiple scoring ranges of each of the health indicators, determine the first scoring range in which the health indicator of each of the communication layers falls; Based on the first scoring range of the health indicators of each communication layer, a target health score for each communication layer is determined, wherein there is a correspondence between the scoring range of the health indicators of each communication layer and the health score of each communication layer.

5. The method according to claim 3 or 4, characterized in that, The method further includes: The scoring weight of each communication layer is determined based on the degree of positive impact of the health indicators of each communication layer on the link quality of the wireless connection, wherein the degree of positive impact is positively correlated with the scoring weight. The step of fusing the target health scores of each of the communication layers to obtain the target score includes: The target score is obtained by weighting the score weights of each communication layer and the target health score of each communication layer.

6. The method according to any one of claims 1 to 4, characterized in that, Each of the aforementioned communication layers is a physical layer, a data link layer, a network layer, and an application layer. The health indicator for the physical layer is signal reception strength, the health indicator for the data link layer is data retransmission rate, the health indicator for the network layer is heartbeat latency, and the health indicator for the application layer is application keep-alive capability.

7. The method according to any one of claims 2 to 4, characterized in that, The method further includes: Obtain multiple score ranges for the link quality of the wireless connection; The step of determining the target fault tolerance strategy and the target recovery strategy based on the target score includes: Among multiple rating ranges for the link quality of the wireless connection, determine the second rating range in which the target rating falls; Based on the second scoring range, the target fault tolerance strategy and the target recovery strategy are determined, wherein the scoring range in which the target score is located corresponds to the fault tolerance strategy, and the scoring range in which the target score is located corresponds to the recovery strategy.

8. The method according to claim 7, characterized in that, The step of determining the target fault-tolerance strategy based on the second scoring range includes: If the upper limit of the second scoring range is less than or equal to the first scoring threshold, and the lower limit of the second scoring range is greater than the second scoring threshold, then the first fault-tolerance strategy is determined as the target fault-tolerance strategy. If the upper limit of the second scoring range is less than or equal to the second scoring threshold, and the lower limit of the second scoring range is greater than the third scoring threshold, then the second fault-tolerance strategy is determined as the target fault-tolerance strategy. If the upper limit of the second scoring range is less than or equal to the third scoring threshold, and the lower limit of the second scoring range is greater than the fourth scoring threshold, then the third fault-tolerance strategy is determined as the target fault-tolerance strategy. Wherein, the first fault-tolerance strategy is used to represent a fault-tolerance strategy that keeps the data resolution of the wireless connection unchanged; the second fault-tolerance strategy is used to represent a fault-tolerance strategy that reduces the data resolution of the wireless connection; and the third fault-tolerance strategy is used to represent a fault-tolerance strategy that reduces the data resolution of the wireless connection to the minimum resolution allowed by the wireless connection.

9. The method according to claim 7, characterized in that, The step of determining the target recovery strategy based on the second scoring range includes: If the upper limit of the second scoring range is less than or equal to the third scoring threshold, and the lower limit of the second scoring range is greater than the fourth scoring threshold, then the first recovery strategy is determined as the target recovery strategy. If the lower limit of the second scoring range is less than or equal to the fourth scoring threshold, the second recovery strategy will be determined as the target recovery strategy. Wherein, the first recovery strategy is used to represent a recovery strategy for optimizing the health indicators of each of the communication layers; the second recovery strategy is used to represent a recovery strategy for reconnecting when the wireless connection is interrupted.

10. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the electronic device to perform the method as described in any one of claims 1 to 9.