Wireless connection optimization method and device of intelligent cabin car-locomotive interconnection system, electronic equipment and storage medium
By building a candidate channel list for concurrent scanning and asynchronous split initialization, the signal interference problem of Wi-Fi connection in the smart cockpit environment is solved, the connection speed and success rate are improved, the vehicle dynamic environment is adapted, and communication stability and security are ensured.
Patent Information
- Application Number
- CN202511133003.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-09-16
AI Technical Summary
In the smart cockpit environment, the Wi-Fi connection between the vehicle computer and the mobile terminal suffers from severe signal interference, resulting in degraded connection delay and stability. Existing optimization solutions are costly or difficult to be compatible, and scanning blockage and handshake timeout problems are prone to occur in interference scenarios.
Based on the unique network identifier and channel information of historically successfully connected networks, a candidate channel list is constructed, Wi-Fi scans are performed concurrently, channel quality is dynamically evaluated, IP allocation and service layer initialization are asynchronously split, and the wireless connection process is optimized by combining asynchronous handshake interaction and parallel threads, including channel switching and resetting the Wi-Fi driver status to ensure a stable connection.
Through dynamic channel assessment and parallel processing, the time consumption of the Wi-Fi scanning phase is reduced, the connection speed and success rate are improved, the vehicle dynamic environment is adapted, and the communication stability and security are ensured.
Smart Images

Figure CN120659076A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automotive communication technology, and in particular to a wireless connection optimization method, device, electronic equipment, and storage medium for an intelligent cockpit vehicle-machine interconnection system. Background Art
[0002] Vehicle-to-machine connectivity solutions, represented by Huawei's HiCar SDK, have become core tools for automotive hardware manufacturers and in-vehicle system developers by providing full-link API interfaces for device access authentication, service discovery, data transmission, and session management. As HiCar has evolved to version 4.0, its connectivity performance and cross-platform adaptability have continued to improve. In this context, the Android-based HiCar client application has become a key component of the smart cockpit software stack, and its wireless connection efficiency directly affects the user's real-time interactive experience and functional responsiveness while driving. In a typical smart cockpit environment, multiple wireless protocols (including Wi-Fi, Bluetooth BLE / BR-EDR, V2X, etc.) need to be processed in parallel between the vehicle and mobile terminal. Because multiple protocols share the 2.4GHz frequency band, signal interference is severe, resulting in a significant degradation in the latency and stability of the Wi-Fi connection.
[0003] Current mainstream optimization solutions often rely on hardware upgrades (such as adding multi-mode RF chips) or parallel communication channel designs, which are costly and difficult to integrate with existing vehicle models. Alternatively, they focus on improving user interaction processes (such as simplifying the connection interface) but lack systematic software optimization for Wi-Fi's underlying parameter configuration, channel selection, and anti-interference mechanisms. In particular, in the Android-based HiCar interconnection process, the Wi-Fi Direct networking and authentication phase (including parameter negotiation, channel bonding, and WPA2 handshake) plays a key role in connection efficiency. This phase is prone to scanning blockages and handshake timeouts in interference scenarios, resulting in connection delays or even failures. Summary of the Invention
[0004] In view of this, the object of the present invention is to provide a wireless connection optimization method, device, electronic equipment and storage medium for an intelligent cockpit vehicle-machine interconnection system.
[0005] In a first aspect, an embodiment of the present invention provides a method for optimizing wireless connections in a smart cockpit vehicle-machine interconnection system, the method comprising: Build a candidate channel list based on the network unique identifier and channel information of the historically successfully connected networks; concurrently performing Wi-Fi scans on a plurality of commonly used channels in the candidate channel list to identify at least one candidate wireless connection link; The candidate channel with the highest channel quality score in the candidate channel list is selected as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength and interference parameters of the candidate channel; After asynchronous handshake interaction with the mobile terminal through the target channel, IP allocation and service layer initialization are split into parallel threads; Based on the candidate wireless connection links, service registration is triggered after the service layer initialization is completed to establish a wireless connection link with the mobile terminal.
[0006] In combination with the first aspect, the method further includes: When performing Wi-Fi scan tasks concurrently on multiple commonly used channels in the candidate channel list, the scanning frequency is adjusted based on the current vehicle movement speed.
[0007] In combination with the first aspect, the method further includes: During the process of establishing the wireless connection link or after the wireless connection link is established, sending a network detection packet to the wireless connection link based on a preconfigured detection interval and a number of retries; If the number of consecutive timeouts reaches the threshold, it is determined that the wireless connection link is abnormal.
[0008] In conjunction with the first aspect, if the number of consecutive timeouts reaches a threshold, after the step of determining that the wireless connection link is abnormal, the method further includes: Reset the Wi-Fi driver status and WPA2 authentication information of the target channel; Verify that the session key and server certificate cached in the local cache space during the previous wireless connection link establishment are valid; If so, the session key and server certificate are reused, and an asynchronous handshake interaction with the mobile terminal is triggered to re-establish the wireless connection link.
[0009] In combination with the first aspect, after reusing the session key and server certificate and triggering the asynchronous handshake interaction, the following steps are included: If the number of consecutive failures of asynchronous handshake interaction reaches the preset threshold, switch to a new candidate channel; Re-initiate the asynchronous handshake interaction including the session key on the new candidate channel.
[0010] In combination with the first aspect, after the step of re-initiating the asynchronous handshake interaction including the session key, the method further includes: If the asynchronous handshake interaction performed on the new candidate channel still fails, Wi-Fi scanning tasks are performed concurrently on multiple commonly used channels to rebuild the wireless connection link between the mobile terminal and the vehicle terminal.
[0011] In combination with the first aspect, after the step of re-establishing the wireless connection link between the mobile terminal and the vehicle terminal, the method further includes: Get the current server certificate and the generated current session key; Update the current server certificate and current session key to the local cache space.
[0012] In the second aspect, the present application provides a wireless connection optimization device for an intelligent cockpit vehicle-machine interconnection system, which includes: a list construction module, a concurrent scanning module, a channel screening module, an interaction splitting module and a connection link construction module.
[0013] A list building module, configured to build a candidate channel list based on the network unique identifier and channel information of historically successfully connected networks; a concurrent scanning module, configured to concurrently perform Wi-Fi scanning on a plurality of commonly used channels in the candidate channel list to identify at least one candidate wireless connection link; a channel screening module, configured to select a candidate channel with the highest channel quality score in the candidate channel list as a target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength, and interference parameters of the candidate channel; An interaction splitting module is used to split IP allocation and service layer initialization into parallel threads after asynchronous handshake interaction with the mobile terminal through the target channel; The connection link construction module is used to trigger service registration after the service layer initialization is completed based on the candidate wireless connection link to build a wireless connection link with the mobile terminal.
[0014] In conjunction with the second aspect, the device further includes: The scanning frequency adjustment module is used to adjust the scanning frequency based on the current vehicle moving speed during the process of concurrently executing Wi-Fi scanning tasks on multiple commonly used channels in the candidate channel list.
[0015] In conjunction with the second aspect, the device further includes: A detection module is used to send a network detection packet to the wireless connection link based on a preconfigured detection interval and a number of retries during or after the wireless connection link is established; The abnormality determination module is used to determine that the wireless connection link is abnormal if the number of consecutive timeouts reaches a threshold.
[0016] In conjunction with the second aspect, after the abnormality determination module, it also includes: Reset module, used to reset the Wi-Fi driver status and WPA2 authentication information of the target channel; A valid verification module is used to verify whether the session key and server certificate cached in the local cache space when the wireless connection link was last established are valid; The multiplexing module is used to reuse the session key and server certificate when the session key and server certificate cached during the previous wireless connection link establishment are valid, and trigger an asynchronous handshake interaction with the mobile terminal to establish the wireless connection link again.
[0017] Combined with the second aspect, after reusing the module, it includes: The switching module is used to switch to a new candidate channel if the number of consecutive failures of asynchronous handshake interaction reaches a preset threshold.
[0018] The reconnection module is used to re-initiate an asynchronous handshake interaction including a session key on a new candidate channel.
[0019] In combination with the second aspect, after reconnecting the module, the method further includes: The reconstruction module is used to concurrently execute Wi-Fi scanning tasks on multiple commonly used channels to rebuild the wireless connection link between the mobile terminal and the vehicle end when the asynchronous handshake interaction performed on the new candidate channel still fails.
[0020] Combined with the second aspect, after rebuilding the module, it also includes: The acquisition module is used to obtain the current server certificate and the generated current session key; The update module is used to update the current server certificate and the current session key to the local cache space.
[0021] In a third aspect, the present application provides an electronic device, which includes a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the above method.
[0022] In a fourth aspect, the present application provides a storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the above-mentioned method is executed.
[0023] The embodiments of the present invention bring the following beneficial effects: The present application provides a wireless connection optimization method, device, electronic device, and storage medium for a smart cockpit vehicle-machine interconnection system, the method comprising: constructing a candidate channel list based on the network unique identifier and channel information of historically successfully connected networks; concurrently performing Wi-Fi scans on multiple commonly used channels in the candidate channel list to identify at least one candidate wireless connection link; selecting the candidate channel with the highest channel quality score in the candidate channel list as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength, and interference parameters of the candidate channel; after asynchronous handshake interaction with the mobile terminal through the target channel, splitting IP allocation and service layer initialization into parallel threads; based on the candidate wireless connection link, triggering service registration after the service layer initialization is completed to establish a wireless connection link with the mobile terminal. The method is based on historical channel weights and a multi-level concurrent scanning mechanism to reduce the time consumption of the Wi-Fi scanning phase, quickly determine the target channel through dynamic channel evaluation, and combine the asynchronously split WPA2 handshake and service initialization parallelization to improve the connection speed and connection success rate of the entire process.
[0024] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0025] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 A schematic flow chart of a wireless connection optimization method for a smart cockpit vehicle-machine interconnection system provided in Example 1 of the present invention; Figure 2 A schematic flow chart of a wireless connection optimization method for a smart cockpit vehicle-machine interconnection system according to embodiment 2 of the present invention; Figure 3 A schematic flow chart of a wireless connection optimization method for a smart cockpit vehicle-machine interconnection system provided in Example 3 of the present invention; Figure 4A schematic flow chart of a wireless connection optimization method for a smart cockpit vehicle-machine interconnection system according to a fourth embodiment of the present invention; Figure 5 A schematic flow chart of a wireless connection optimization method for a smart cockpit vehicle-machine interconnection system according to Embodiment 5 of the present invention; Figure 6 A schematic flow chart of a wireless connection optimization method for a smart cockpit vehicle-machine interconnection system according to embodiment 6 of the present invention; Figure 7 A schematic diagram of the structure of a wireless connection optimization device for a smart cockpit vehicle-machine interconnection system provided in Example 7 of the present invention; Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0028] Reference numerals: 10-list building module, 20-concurrent scanning module, 30-channel screening module, 40-interaction splitting module, 50-connection link building module; 130 - processor, 131 - memory, 132 - bus, 133 - communication interface. DETAILED DESCRIPTION
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0030] To facilitate understanding of this embodiment, the application scenarios and design concepts of the embodiment of this application are briefly introduced below.
[0031] Existing vehicle-to-machine interconnection systems are prone to problems such as scanning blockage and handshake timeout in interference scenarios, causing connection delays or even failures.
[0032] Based on this, the embodiments of the present application provide a wireless connection optimization method, device, electronic device, and storage medium for an intelligent cockpit vehicle-machine interconnection system to improve the efficiency and stability of the wireless connection between the vehicle and the mobile terminal.
[0033] Example 1 This application provides a wireless connection optimization method for an intelligent cockpit vehicle-machine interconnection system. Figure 1 As shown, the method includes: S110 , constructing a candidate channel list based on the network unique identifier and channel information of the historically successfully connected networks.
[0034] S120 : Concurrently perform Wi-Fi scanning on multiple common channels in the candidate channel list to identify at least one candidate wireless connection link.
[0035] S130 , selecting the candidate channel with the highest channel quality score in the candidate channel list as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength, and interference parameters of the candidate channel. S140 , after asynchronous handshake interaction with the mobile terminal through the target channel, splitting IP allocation and service layer initialization into parallel threads.
[0036] S150 , based on the candidate wireless connection link, triggering service registration after the service layer initialization is completed to establish a wireless connection link with the mobile terminal.
[0037] The wireless connection optimization method for the smart cockpit vehicle-machine interconnection system provided in this application builds a candidate channel list by recording historical successful network connections and screening high-probability channels to reduce invalid scanning time, then simultaneously initiates Wi-Fi scans on multiple channels to compress scanning time, and accurately selects the target channel based on the dynamic channel quality assessment results to improve the success rate of the link connection. After initiating a handshake request on the target channel, the service layer is initialized in parallel to break the serial bottleneck and eliminate dependency delays, thereby improving the efficiency of the wireless connection.
[0038] Step S110 includes: S111 , reading historical successful network connection information from a preset storage unit to obtain at least one network unique identifier and channel information corresponding to the network unique identifier.
[0039] S112 , based on the network unique identifier and the channel information corresponding to the network unique identifier, calculate the historical connection weight of each channel according to an exponential decay model to generate a weighted candidate channel list.
[0040] In this embodiment, the storage unit is a local encrypted storage module, which can be a SQLite database or EncryptedSharedPreferences. Data is read from the local encrypted storage module to obtain the most recently connected network unique identifier (SSID) and channel information. It is understood that multiple network unique identifiers and corresponding channel information may be obtained.
[0041] Subsequently, each channel is dynamically time-weighted using an exponential decay model to calculate the channel weight. Specifically, each channel is grouped and the latest timestamp is extracted. Subsequently, the exponential decay weight of the channel is calculated based on the preconfigured decay coefficient, and then a list of candidate channels is generated by sorting them in descending order of weight. In this way, candidate channels with better connection success rate, number of times, or stability in the current environment are provided for selection, so as to prioritize the candidate channels with successful historical connections for wireless network connection. Among them, the weighting method using the exponential decay model can avoid over-reliance on historical connection records (for example, when the vehicle has left the original network environment), thereby improving the network connection adaptability in the dynamic environment of vehicle operation.
[0042] It is worth noting that, in this embodiment, channels with weights lower than a preset weight threshold are considered invalid channels and are not included in the candidate channel list, so as to reduce the time consumed in subsequent invalid scanning.
[0043] Subsequently, step S120 establishes a concurrent scan task on a common channel and calls `WifiManager.startScan()` to start a Wi-Fi scan to discover available wireless networks (i.e., candidate wireless connection links) in the surrounding area.
[0044] It can be understood that the traditional scanning process is: calling `WifiManager.startScan()` multiple times, scanning each channel one by one according to the candidate channel list constructed in step S110, and the time to complete the entire scan is the sum of the time required for scanning each channel. The hardware resources for scanning each channel only require its corresponding single RF front-end to work, and other hardware resources are idle. There are defects such as long scanning time and delays caused by frequent RF switching. In this application, a single call to `WifiManager.startScan()` is used to initiate scanning on multiple channels simultaneously to shorten the overall scanning time. At this time, the overall scanning time is the maximum value of the time required for scanning each channel, which can preferably shorten the scanning time. In addition, the simultaneous initiation of scanning on multiple channels requires multiple RF front-ends to work in parallel (5GHz / 2.4GHz / 6GHz) independent RFs, and there is no RF switching delay. Therefore, the concurrent execution of Wi-Fi scanning adopted in this application can effectively reduce the scanning time and improve scanning efficiency.
[0045] In actual applications, when the maximum number of concurrent channels is smaller than the number of candidate channels due to hardware limitations, concurrent scanning is performed in batches. For example, if the maximum number of concurrent channels is limited to 3 due to hardware limitations, but the actual number of channels to be concurrently scanned is 5, concurrent scanning is performed in two batches: the first batch concurrently scans three of the channels, and the second batch concurrently scans the remaining two channels. In actual applications, batches and the number of concurrent channels in each batch can be adjusted as needed. This is only an example and is not intended to be limiting.
[0046] The S130 then calculates a channel quality score based on transmission reliability (packet loss rate), signal strength (RSSI), and interference parameters (such as channel occupancy and co-channel interference) to characterize the network connection reliability and stability of each candidate channel. The candidate channel with the best channel quality score is then selected as the target channel.
[0047] Subsequently, after initiating a handshake request on the target channel determined in step S130, IP address allocation (network layer) and service layer initialization (application layer) are performed simultaneously. Compared with the prior art method of serial IP allocation and service layer initialization after initiating a handshake request, parallel IP allocation and service layer initialization are performed to shorten the service readiness time. After the service layer initialization is completed, service registration is triggered, the wireless connection link with the mobile terminal is established, and the communication connection with the mobile terminal is realized.
[0048] Service Registration is the core step in establishing a stable communication link. Its essence is to declare the mobile terminal's service capabilities to the vehicle-mounted device and complete the protocol handshake process for two-way service discovery. In this embodiment, service registration also includes Hi-Car service registration. The mobile terminal's service capabilities refer to the mobile terminal's own service type (such as CarPlay / Android Auto / MirrorLink), and the vehicle-mounted device identifies available services and matches compatible protocols. This process also includes security authentication, namely two-way certificate verification and session key generation (TLS-PSK), to prevent man-in-the-middle attacks, encrypt session transmission, and enhance communication security.
[0049] In combination with the first aspect, the step of calculating the channel quality score of each candidate channel before step S130 includes: performing weighted summation on the packet loss rate, signal strength and interference parameter to obtain the channel quality score.
[0050] First, for each candidate channel, Beacon frames of the candidate channel are collected several times (3 times in this embodiment) continuously, and the packet loss rate is calculated using a moving average algorithm.
[0051] Subsequently, the signal strength is collected and filtered to generate a smoothed value.
[0052] After that, call `WifiManager.getScanResults()` to obtain the number of APs on the same channel and their signal strength, and construct a channel occupancy and interference heat map to determine the channel interference parameters.
[0053] Finally, a weighted summation is performed based on pre-configured weighting information to obtain a channel quality score. In this way, the quality of candidate channels is evaluated across different dimensions, allowing for rapid and accurate selection of target channels.
[0054] In combination with the first aspect, after step S150, the method further includes: S160, which uses elliptic curve Diffie–Hellman to quickly negotiate session keys; S161, combined with the AES-GCM encryption mode and the initialization vector generated by the serial number, performs symmetrical encryption and authentication on the data to be transmitted.
[0055] In scenarios where a new session needs to be established or a new key needs to be negotiated (including the initial connection or reconnection after cache expiration), the highly computationally efficient session key and the "encryption + authentication" two-in-one AES-GCM are used to establish a secure communication link with minimal overhead.
[0056] In combination with the first aspect, the method provided in this embodiment further includes: S170 , compressing and formatting the collected key performance indicator data to obtain a compressed log.
[0057] S171 uploads the compressed log to the cloud RESTful interface via the HTTPS protocol.
[0058] S172: Receive a policy package including weight parameters and scanning thresholds sent by the cloud.
[0059] S173: Update the wireless connection link based on the weight parameter and the scanning threshold.
[0060] In this embodiment, key performance indicator data is collected, normalized, and outliers removed before being converted to a unified format (JSON in this embodiment). This data is then uploaded to the cloud-based RESTful interface and awaited for a response. After receiving the log data containing these key performance indicators, the cloud-based interface combines device attributes (vehicle model, system version, and region tag) to generate an optimization strategy package. This package is then dynamically distributed to target vehicles via OTA for OTA parameter updates.
[0061] In combination with the first aspect, the method further includes: S180: Obtain the current battery level of the vehicle.
[0062] S181: If the current battery level is less than the battery threshold, execute the low-frequency scanning mode.
[0063] It is understandable that scanning will consume energy. If the current battery level of the vehicle is less than the battery threshold, that is, the battery level is low, a low-frequency scanning mode will be executed to balance the endurance performance and communication performance.
[0064] In combination with the first aspect, the method further includes: S190: If the vehicle is stationary and the stationary time exceeds a preset time threshold, exit the scanning mode and the key performance data collection mode.
[0065] It's understandable that if a vehicle is stationary for an extended period, i.e., with the engine off or waiting in place, it can exit scanning mode and key performance data collection mode to reduce no-load energy consumption and alleviate range anxiety. The vehicle's state (running, stationary, accelerating, decelerating, etc.) can be calculated using a combination of multi-sensor fusion and machine learning. This is achievable in existing technology and will not be elaborated on here.
[0066] Example 2 This application provides another wireless connection optimization method for an intelligent cockpit vehicle-machine interconnection system, combining Figure 2 As shown, the method includes: S210 , constructing a candidate channel list based on the network unique identifier and channel information of the historically successfully connected networks.
[0067] S220 , concurrently performing Wi-Fi scanning on multiple common channels in the candidate channel list to identify at least one candidate wireless connection link, and at the same time, adjusting the scanning frequency based on the current speed of the vehicle.
[0068] S230 , selecting the candidate channel with the highest channel quality score in the candidate channel list as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength, and interference parameters of the candidate channel. S240 , after asynchronous handshake interaction with the mobile terminal through the target channel, splitting IP allocation and service layer initialization into parallel threads.
[0069] S250 , based on the candidate wireless connection link, triggering service registration after the service layer initialization is completed to establish a wireless connection link with the mobile terminal.
[0070] The wireless connection optimization method of the vehicle-machine interconnection system provided in this embodiment is different from that in embodiment 1 in step S220: during the concurrent scanning of multiple commonly used channels, the scanning frequency is adjusted based on the current speed of the vehicle to adapt to the fusion scene perception at different vehicle speeds, thereby realizing dynamic optimization of scanning parameters and improving the effectiveness of the wireless connection.
[0071] The current speed of the vehicle may be calculated by collecting and fusing data from an accelerometer, gyroscope, GPS, and wheel speed sensors installed in the vehicle. This is merely an example and is not intended to be limiting.
[0072] In step S220, the scanning frequency is adjusted based on the current speed of the vehicle, specifically including: S221 , when the vehicle speed is lower than a first threshold, enter a low-speed scanning mode, select the first N high-weighted candidate channels in the candidate channel list, and perform concurrent Wi-Fi scanning at a dynamically adjusted first scanning interval.
[0073] S222: When the vehicle speed reaches or exceeds the first threshold, enter the high-speed scanning mode, perform concurrent Wi-Fi scanning on a predefined full-band channel set at a fixed second scanning interval, and enable Doppler shift compensation.
[0074] Wherein, N is a positive integer dynamically adjusted according to the historical connection time-consuming sliding window, and the second scanning interval is smaller than the first scanning interval.
[0075] In this embodiment, the step of dynamically adjusting the first scanning interval in step S221 includes: S2210, calculating the mean and standard deviation of historical connection times in the sliding window.
[0076] S2211, if the standard deviation is less than the stability threshold, increase the N value and decrease the first scanning interval; S2212: If the standard deviation reaches or exceeds the stability threshold, reduce the N value and increase the first scanning interval.
[0077] It is understandable that during the vehicle wireless connection process, the system calculates the mean of two key statistics in real time through a sliding window mechanism (recording the time taken for the last few connections) and standard deviation ,when If the value is less than the stability threshold, it indicates that the signal is in a stable state. At this time, the signal capture capability can be improved by increasing the batch size or reducing the interval. When the stability threshold is reached or exceeded, it indicates a fluctuating state. In this case, the conflict risk can be reduced by reducing batches or increasing intervals, ultimately achieving Pareto optimization of connection speed and stability.
[0078] The low-speed scanning mode further includes: reversely adjusting the first scanning interval based on the current signal strength, for example, when the signal strength decreases by 10 dBm, the scanning interval is shortened by 30%-50%.
[0079] In addition, in the vehicle wireless connection optimization system, the dynamic adjustment of the scan batch size N (i.e., the number of channels scanned concurrently in a single time) follows the dual-mode adaptive mechanism driven by environmental stability. In the above-mentioned stable state, according to the mean Calculate the theoretical batch and take the upper integer to determine N. It is understandable that The larger the value, the higher the connection delay, and the efficiency needs to be compensated by increasing the number of scan channels (such as =220ms, N increases from 2 to 3); correspondingly, after the current batch is attenuated based on the preset attenuation coefficient in the wave dynamics, the lower limit integer value is removed to reduce the scanning scale in the case of high signal fluctuation caused by the high vehicle speed scene to avoid resource waste.
[0080] Example 3 This application provides another wireless connection optimization method for the intelligent cockpit vehicle-machine interconnection system, combining Figure 3 As shown, the method includes: S310 , constructing a candidate channel list based on the network unique identifier and channel information of the historically successfully connected networks.
[0081] S320 : Concurrently perform Wi-Fi scanning on multiple common channels in the candidate channel list to identify at least one candidate wireless connection link.
[0082] S330 , selecting the candidate channel with the highest channel quality score in the candidate channel list as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength, and interference parameters of the candidate channel. S340: After asynchronous handshake interaction with the mobile terminal through the target channel, IP allocation and service layer initialization are split into parallel threads.
[0083] S350, triggering service registration based on the candidate wireless connection link after the service layer initialization is completed.
[0084] S360: During the process of establishing the wireless connection link or after the wireless connection link is established, a network detection packet is sent to the wireless connection link based on a preconfigured detection interval and a number of retries.
[0085] S370: If the number of consecutive timeouts reaches a threshold, it is determined that the wireless connection link is abnormal.
[0086] The wireless connection optimization method of the smart cockpit vehicle-machine interconnection system provided in this embodiment differs from that of embodiments 1 and 2 in that steps S360-S370 perform real-time health monitoring of the wireless connection link during and after the wireless connection link is established, so as to facilitate timely detection of abnormal conditions in the wireless connection link, reduce the time spent on tracing and reconnecting after information transmission failure, and facilitate reconnection as soon as possible based on the monitoring results to ensure the stability of information transmission.
[0087] In this embodiment, the "network detection packet" includes "TCP KeepAlive" and "ICMP Echo". "TCPKeepAlive" is used to detect whether the transport layer connection is valid, and "ICMP Echo" is used to detect whether the network bottom layer is connected (such as whether the router is faulty).
[0088] Specifically, if the connection remains idle for longer than the probe interval, TCP KeepAlive and ICMP Echo probe packets are sent. If no ACK is received within the probe interval, the above steps are retried. If N consecutive ACK timeouts occur, the link is considered unhealthy. If no consecutive timeouts occur or the number of consecutive timeouts does not reach the threshold, the link is considered healthy.
[0089] It can be understood that when an abnormality is detected in the wireless connection link, the abnormality is handled based on the preset processing rules. The processing rules include but are not limited to reporting the abnormality, re-executing the full-frequency scan, initiating a handshake request on the target channel, and performing parallel IP allocation and service layer registration until a new wireless connection link is established.
[0090] Example 4 The present application embodiment provides another wireless connection optimization method for a smart cockpit vehicle-machine interconnection system. Figure 4 As shown, the method includes: S410 , constructing a candidate channel list based on the network unique identifier and channel information of the historically successfully connected networks.
[0091] S420 : Concurrently perform Wi-Fi scanning on multiple common channels in the candidate channel list to identify at least one candidate wireless connection link.
[0092] S430 , selecting the candidate channel with the highest channel quality score in the candidate channel list as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength, and interference parameters of the candidate channel. S440 , after asynchronous handshake interaction with the mobile terminal through the target channel, splitting IP allocation and service layer initialization into parallel threads.
[0093] S450 , triggering service registration based on the candidate wireless connection link after the service layer initialization is completed.
[0094] S460: During the process of establishing the wireless connection link or after the wireless connection link is established, a network detection packet is sent to the wireless connection link based on a preconfigured detection interval and a number of retries.
[0095] S470: If the number of consecutive timeouts reaches a threshold, it is determined that the wireless connection link is abnormal.
[0096] S480: Reset the Wi-Fi driver status and WPA2 authentication information corresponding to the target channel.
[0097] S481: Verify whether the session key and server certificate cached in the local cache space when the wireless connection link was last established are valid.
[0098] If so, execute step S482.
[0099] S482: Reuse the session key and the server certificate, and trigger an asynchronous handshake interaction with the mobile terminal to re-establish the wireless connection link.
[0100] Compared with Example 3, the wireless connection optimization method of the smart cockpit vehicle-machine interconnection system provided in this application performs soft reconnection through steps S480-S482 after determining that the wireless connection link is abnormal.
[0101] The Wi-Fi driver state is the real-time operating state maintained by the wireless network card driver in the operating system kernel, including hardware control parameters, data queues, and radio frequency configuration. WPA2 authentication information is the set of authentication credentials and key material required to establish a secure connection. In this embodiment, resetting the Wi-Fi driver state clears abnormalities caused by invalid connections (such as DMA deadlocks), radio frequency parameter drift (such as frequency deviation caused by temperature), or queue congestion, thereby restoring radio frequency stability. Resetting the WPA2 authentication information deletes the association process, forces re-authentication, and discards the current Pairwise Transient Key (PTK) session key to defend against man-in-the-middle attacks.
[0102] Subsequently, the validity of the session key and server certificate cached in the local cache space during the previous wireless connection link establishment is verified, that is, the validity of the certificate validity period, certificate chain integrity, session key timeliness, and forward security assurance are verified. When the above verification items are all valid, step S482 is executed. Based on the current session key and service certificate, a one-step handshake interaction and parallel IP allocation and service layer registration are initiated again to rebuild the wireless connection link. By reusing valid session keys and service certificates to reduce the reconnection time and the time required for re-authentication, it is beneficial for scenarios such as rapid recovery after loss of high-speed vehicle signal and recovery of transaction interruptions (avoiding repeated entry of PIN codes). This process resolves physical layer anomalies through a complete reset of the driver layer, skips complex authentication by using secure session multiplexing, and achieves sub-second recovery in combination with asynchronous handshake interaction. It can effectively balance security and real-time performance and is suitable for mobile Internet of Things scenarios with strict requirements on connection reliability.
[0103] It is understandable that when one of the above verification items is invalid, the session key and server certificate cannot be reused, and re-authentication, generation of a new DH key exchange, upgrading of the key negotiation algorithm, and other operations are required, followed by re-concurrent scanning, channel quality scoring, and other operations to rebuild the wireless connection link.
[0104] Example 5 The present application embodiment provides another wireless connection optimization method for a smart cockpit vehicle-machine interconnection system. Figure 5 As shown, the method includes: S510 , constructing a candidate channel list based on the network unique identifier and channel information of the historically successfully connected networks.
[0105] S520 : Concurrently perform Wi-Fi scanning on multiple common channels in the candidate channel list to identify at least one candidate wireless connection link.
[0106] S530 , selecting the candidate channel with the highest channel quality score in the candidate channel list as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength, and interference parameters of the candidate channel. S540: After asynchronous handshake interaction with the mobile terminal through the target channel, IP allocation and service layer initialization are split into parallel threads.
[0107] S550 , triggering service registration based on the candidate wireless connection link after the service layer initialization is completed.
[0108] S560: During the process of establishing the wireless connection link or after the wireless connection link is established, a network detection packet is sent to the wireless connection link based on a preconfigured detection interval and a number of retries.
[0109] S570: If the number of consecutive timeouts reaches a threshold, it is determined that the wireless connection link is abnormal.
[0110] S580: Reset the Wi-Fi driver status and WPA2 authentication information corresponding to the target channel.
[0111] S581: Verify whether the session key and server certificate cached in the local cache space when the wireless connection link was last established are valid.
[0112] If so, execute step S582.
[0113] S582: Reuse the session key and the server certificate, and trigger an asynchronous handshake interaction with the mobile terminal to re-establish the wireless connection link.
[0114] S583: If the number of consecutive failures of the asynchronous handshake interaction reaches a preset threshold, switch to a new candidate channel.
[0115] S584: Re-initiate an asynchronous handshake interaction including the session key on the new candidate channel.
[0116] The wireless connection optimization method for the smart cockpit vehicle-machine interconnection system provided in this embodiment is different from that in Example 4 in that after soft reconnection is performed in steps S580-S582, if multiple soft reconnections fail, step S583 is executed to switch to a new candidate channel, and then a one-step handshake interaction is re-initiated on the new candidate channel to build a wireless connection link.
[0117] It is understandable that if multiple soft reconnection attempts on a candidate channel fail consecutively, it means that the signal strength and interference level of the candidate channel make it impossible to establish an effective and stable wireless connection link through the candidate channel. Therefore, the wireless connection link is established after reselecting the candidate channel.
[0118] It is understood that during the reselection of candidate channels, the order of the candidate channel list is prioritized to select the candidate channel with the best channel quality score in the current situation. In this embodiment, when the screen is off or the device is idle, the PNO assist function enables Android Preferred Network Offline Scan (PNO) to maintain an updated ranking of candidate SSIDs. This allows for pre-scanning results even when the device is unattended, and allows for real-time updates to the candidate channel list.
[0119] In combination with the first aspect, after step S584, the method further includes: S585: If the asynchronous handshake interaction performed on the new candidate channel still fails, Wi-Fi scanning tasks are performed concurrently on multiple common channels to re-establish the wireless connection link between the mobile terminal and the vehicle terminal.
[0120] Understandably, if the asynchronous handshake interaction and wireless link establishment still cannot be successfully completed after reselecting a new candidate channel, steps S520-S550 are triggered to trigger a complete scan and reconnection, and log reports are also generated. Health checks are then performed during and after the wireless link establishment process, forming a logical closed loop.
[0121] Example 6 This application provides another wireless connection optimization method for the intelligent cockpit vehicle-machine interconnection system, combining Figure 6 As shown, the method includes: S610: Construct a candidate channel list based on the network unique identifier and channel information of the historically successfully connected networks.
[0122] S620: Concurrently perform Wi-Fi scanning on multiple common channels in the candidate channel list to identify at least one candidate wireless connection link.
[0123] S630 , selecting the candidate channel with the highest channel quality score in the candidate channel list as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength, and interference parameters of the candidate channel. S640: After asynchronous handshake interaction with the mobile terminal through the target channel, IP allocation and service layer initialization are split into parallel threads.
[0124] S650 , triggering service registration based on the candidate wireless connection link after the service layer initialization is completed.
[0125] S660: During the process of establishing the wireless connection link or after the wireless connection link is established, a network detection packet is sent to the wireless connection link based on a preconfigured detection interval and a number of retries.
[0126] S670: If the number of consecutive timeouts reaches a threshold, it is determined that the wireless connection link is abnormal.
[0127] S680: Reset the Wi-Fi driver status and WPA2 authentication information corresponding to the target channel.
[0128] S681: Verify whether the session key and server certificate cached in the local cache space when the wireless connection link was last established are valid.
[0129] If so, execute step S682.
[0130] S682: Reuse the session key and the server certificate, and trigger an asynchronous handshake interaction with the mobile terminal to re-establish the wireless connection link.
[0131] S683: If the number of consecutive failures of the asynchronous handshake interaction reaches a preset threshold, switch to a new candidate channel.
[0132] S684: Re-initiate an asynchronous handshake interaction including the session key on the new candidate channel.
[0133] S690: Obtain the current server certificate and the generated current session key.
[0134] S691: Update the current server certificate and the current session key to the local cache space.
[0135] The wireless connection optimization method for the intelligent cockpit vehicle-machine interconnection system provided in this embodiment differs from that in Example 5 in that, after triggering a full scan and reconnection to establish a wireless connection link with the mobile terminal based on the aforementioned health check, soft reconnection failure, and reconnection failure after channel switching, the current server certificate, namely the generated current session key, is cached to update the local cache space. By caching a summary of key information, the most time-consuming authentication steps (CA chain verification and full key negotiation) are skipped in reconnection scenarios within a known security context, achieving extremely fast reconnection.
[0136] It is understandable that steps S690-S691 will also be performed after the wireless connection link is established for the first time.
[0137] Example 7 In the second aspect, the present application provides a wireless connection optimization device for an intelligent cockpit vehicle-machine interconnection system, combining Figure 7As shown, the device includes: a list building module 10, a concurrent scanning module 20, a channel screening module 30, an interaction splitting module 40 and a connection link building module 50.
[0138] The list building module 10 is used to build a candidate channel list based on the network unique identifier and channel information of the historically successfully connected networks.
[0139] The concurrent scanning module 20 is configured to concurrently perform Wi-Fi scanning on a plurality of common channels in the candidate channel list to identify at least one candidate wireless connection link.
[0140] The channel screening module 30 is configured to select the candidate channel with the highest channel quality score in the candidate channel list as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength and interference parameters of the candidate channel.
[0141] The interaction splitting module 40 is used to split IP allocation and service layer initialization into parallel threads after asynchronous handshake interaction with the mobile terminal through the target channel.
[0142] The connection link building module 50 is used to trigger service registration based on the candidate wireless connection link after the service layer initialization is completed, so as to build a wireless connection link with the mobile terminal.
[0143] In combination with the second aspect, the device further includes: a scanning frequency adjustment module.
[0144] The scanning frequency adjustment module is used to adjust the scanning frequency based on the current vehicle moving speed during the process of concurrently executing Wi-Fi scanning tasks on multiple commonly used channels in the candidate channel list.
[0145] In combination with the second aspect, the device further includes a detection module and an abnormality determination module.
[0146] The detection module is used to send a network detection packet to the wireless connection link based on a preconfigured detection interval and a number of retries during the process of building the wireless connection link or after the wireless connection link is built.
[0147] The abnormality determination module is used to determine that the wireless connection link is abnormal if the number of consecutive timeouts reaches a threshold.
[0148] In combination with the second aspect, after the abnormality determination module, it also includes: a reset module, a valid verification module, and a reuse module.
[0149] The reset module is used to reset the Wi-Fi driver status and WPA2 authentication information of the target channel.
[0150] The valid verification module is used to verify whether the session key and server certificate cached in the local cache space when the wireless connection link was last established are valid.
[0151] The multiplexing module is used to reuse the session key and server certificate when the session key and server certificate cached during the previous wireless connection link establishment are valid, and trigger an asynchronous handshake interaction with the mobile terminal to re-establish the wireless connection link.
[0152] In combination with the second aspect, the multiplexing module includes: a switching module and a reconnection module.
[0153] The switching module is used to switch to a new candidate channel if the number of consecutive failures of asynchronous handshake interaction reaches a preset threshold.
[0154] The reconnection module is used to re-initiate the asynchronous handshake interaction including the session key on the new candidate channel.
[0155] In combination with the second aspect, after reconnecting the module, the method further includes: The reconstruction module is used to concurrently execute Wi-Fi scanning tasks on multiple commonly used channels to rebuild the wireless connection link between the mobile terminal and the vehicle end when the asynchronous handshake interaction performed on the new candidate channel still fails.
[0156] In combination with the second aspect, after rebuilding the module, it also includes: obtaining the module and updating the module.
[0157] The acquisition module is used to obtain the current server certificate and the generated current session key.
[0158] The update module is used to update the current server certificate and the current session key to the local cache space.
[0159] In a third aspect, the present application provides an electronic device, Figure 8 As shown, the electronic device includes a memory 131 and a processor 130. The memory 131 is used to store computer programs, and the processor 130 runs the computer programs to enable the electronic device to perform the above method.
[0160] Further, combined with Figure 8 The electronic device shown further includes a bus 132 and a communication interface 133 , and the processor 130 , the communication interface 133 and the memory 131 are connected via the bus 132 .
[0161] The memory 131 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 133 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 132 may be an ISA bus, a PCI bus, or an EISA bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0162] The processor 130 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 130 or by software instructions. The processor 130 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 131, and processor 130 reads information in memory 131 and, in conjunction with its hardware, completes the steps of the method of the aforementioned embodiment.
[0163] In a fourth aspect, an embodiment of the present application provides a readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the above-mentioned method is executed.
[0164] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0165] In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0166] If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0167] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0168] Finally, it should be noted that the above embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A wireless connection optimization method for an intelligent cockpit vehicle-machine interconnection system, characterized in that: The method comprises: Build a candidate channel list based on the network unique identifier and channel information of the historically successfully connected networks; concurrently performing Wi-Fi scanning on a plurality of commonly used channels in the candidate channel list to identify at least one candidate wireless connection link; Selecting the candidate channel with the highest channel quality score in the candidate channel list as the target channel; wherein the channel quality score is calculated based on the packet loss rate, signal strength and interference parameters of the candidate channel; After asynchronous handshake interaction with the mobile terminal through the target channel, splitting IP allocation and service layer initialization into parallel threads; Based on the candidate wireless connection link, service registration is triggered after the service layer initialization is completed to establish a wireless connection link with the mobile terminal.
2. The method according to claim 1, characterized in that The method further comprises: During the process of concurrently executing Wi-Fi scanning tasks on multiple common channels in the candidate channel list, the scanning frequency is adjusted based on the current vehicle moving speed.
3. The method according to claim 1, characterized in that The method further comprises: During the process of establishing the wireless connection link or after the wireless connection link is established, sending a network detection packet to the wireless connection link based on a preconfigured detection interval and a number of retries; If the number of consecutive timeouts reaches a threshold, it is determined that the wireless connection link is abnormal.
4. The method according to claim 3, characterized in that If the number of consecutive timeouts reaches a threshold, after determining that the wireless connection link is abnormal, the method further includes: Reset the Wi-Fi driver status and WPA2 authentication information of the target channel; Verify whether the session key and server certificate cached in the local cache space when the wireless connection link was last established are valid; If yes, the session key and server certificate are reused, and an asynchronous handshake interaction with the mobile terminal is triggered to re-establish the wireless connection link.
5. The method according to claim 4, characterized in that After reusing the session key and server certificate and triggering the asynchronous handshake interaction, the following steps are included: If the number of consecutive failures of asynchronous handshake interaction reaches the preset threshold, switch to a new candidate channel; Re-initiating an asynchronous handshake interaction including the session key on the new candidate channel.
6. The method according to claim 5, characterized in that After the step of re-initiating the asynchronous handshake interaction including the session key, the method further includes: If the asynchronous handshake interaction performed on the new candidate channel still fails, Wi-Fi scanning tasks are concurrently performed on the multiple common channels to re-establish the wireless connection link between the mobile terminal and the vehicle terminal.
7. The method according to claim 6, characterized in that After the step of re-establishing the wireless connection link between the mobile terminal and the vehicle terminal, the method further includes: Get the current server certificate and the generated current session key; The current server certificate and the current session key are updated to the local cache space.
8. A wireless connection optimization device for an intelligent cockpit vehicle-machine interconnection system, characterized in that: The device comprises: A construction module, configured to construct a candidate channel list based on a unique network identifier and channel information of historical successful connections; A scanning module, configured to concurrently execute Wi-Fi scanning tasks on multiple commonly used channels in the candidate channel list; an evaluation module, configured to calculate, for each candidate channel in the candidate channel list, a channel quality score based on a packet loss rate, a signal strength, and an interference parameter of the candidate channel; A selection module, configured to select the candidate channel with the highest channel quality score as the target channel; The connection module is used to split the IP allocation and service layer initialization into parallel threads to execute trigger service registration after the target channel handshake interaction, so as to build a wireless connection link between the mobile terminal and the vehicle terminal.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the method according to any one of claims 1 to 7 is executed.
Citation Information
Cited By
Vehicle and background server interaction method, system and device and medium
CN121509457A
Intelligent roadside terminal security processing method and system based on multimode communication cooperation and dynamic key chain
CN121692149A