Wireless communication reconnection method and device, equipment and storage medium
By adding a flag bit to the probe request frame and response frame for PMKSA presence detection, the reconnection failure problem caused by access point restart is solved, and more efficient wireless communication reconnection is achieved.
Patent Information
- Application Number
- CN202511597022.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-03
AI Technical Summary
Under the WPA3 protocol framework, if the access point clears the PMKSA due to reasons such as device restart, the PMKSA state saved by the wireless client will be inconsistent, resulting in reconnection failure and low reconnection success rate and efficiency.
Before the wireless client and access point reconnect, a flag is added to the probe request frame and probe response frame to detect the presence of PMKSA, and a reconnection or re-authentication process is initiated directly, with the connection method determined based on the PMKSA status of the access point.
It improves the success rate and efficiency of wireless communication reconnection and avoids connection failures caused by the absence of PMKSA in the access point.
Smart Images

Figure CN121463264A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technology, and in particular to a wireless communication reconnection method, apparatus, device, and storage medium. Background Technology
[0002] WPA3 (Wi-Fi Protected Access 3), a new generation security protocol launched by the Wi-Fi Alliance, significantly improves the security of wireless network access by introducing mechanisms such as encryption suites and peer-to-peer authentication, and has become the mainstream security standard for terminal access to wireless networks.
[0003] In related technologies, under the WPA3 protocol framework, when a wireless client and an access point connect for the first time, they first authenticate each other. After authentication is completed, a Pairwise Master Secret Key Session Association (PMKSA) is generated before the connection is established. When the wireless client needs to reconnect to the network, it will preferentially try to initiate a reconnection using the PMKSA generated during the previous connection, skipping the authentication process.
[0004] However, in the above method, the access point may clear the PMKSA due to reasons such as device restart, resulting in an inconsistency between its state and the PMKSA saved by the wireless client. In this case, the wireless client still uses the invalid PMKSA to initiate the connection according to the protocol, which will lead to connection failure. The wireless client will then re-initiate the authentication process, resulting in problems with low reconnection success rate and low efficiency. Summary of the Invention
[0005] This application provides a wireless communication reconnection method, apparatus, device, and storage medium to improve the success rate and efficiency of wireless communication reconnection.
[0006] In a first aspect, embodiments of this application provide a wireless communication reconnection method, including:
[0007] Send a probe request frame to the access point. The probe request frame includes a first status flag, which is used to ask the access point whether it has saved the key session association (PMKSA).
[0008] The system receives a probe response frame sent by the access point. The probe response frame includes a second status flag, which is used to indicate whether the access point has saved the PMKSA.
[0009] Based on the probe response frame, determine whether the access point has saved the PMKSA;
[0010] When the access point stores the PMKSA, a connection request is initiated to the access point based on the PMKSA.
[0011] If the access point does not store the PMKSA, an authentication request is sent to the access point, and a connection request is sent to the access point after successful authentication.
[0012] In one possible implementation, the first and second status flags are defined in a vendor-defined field of the information element.
[0013] In one possible implementation, the second status flag is a multi-bit flag used to indicate the storage status of the PMKSA, which includes at least one of the following: unsaved status, soon-to-expire status, or long-term valid status.
[0014] In one possible implementation, the method further includes the following before sending a probe request frame to the access point:
[0015] Based on the historical connection data of the access point, predict whether the access point saves PMKSA, and obtain the prediction result;
[0016] Based on the prediction results, determine whether the access point saves PMKSA;
[0017] When the prediction result indicates that the access point has not saved the PMKSA, an authentication request is sent to the access point, and a connection request is sent to the access point after successful authentication.
[0018] When the prediction result indicates that the access point stores a PMKSA, the step of sending a probe request frame to the access point is executed.
[0019] In one possible implementation, the wireless client stores a PMKSA cache table, which records the PMKSA status of the access point. Before sending a probe request frame to the access point, the method further includes:
[0020] Determine the PMKSA status of the access point based on the PMKSA cache table;
[0021] When the PMKSA cache table indicates that the PMKSA stored by the access point is invalid, an authentication request is sent to the access point, and a connection request is sent to the access point after successful authentication.
[0022] When the PMKSA cache table indicates that the PMKSA stored by the access point is valid, the step of sending a probe request frame to the access point is executed.
[0023] Secondly, embodiments of this application provide a wireless communication reconnection method, including:
[0024] Receive probe request frames sent by wireless clients. The probe request frames include a first status flag, which is used to ask the access point whether to save the key session association (PMKSA).
[0025] Based on the probe request frame, a probe response frame is generated. The probe response frame includes a second status flag, which is used to indicate whether the access point saves the PMKSA.
[0026] Send a probe response frame to the wireless client.
[0027] Thirdly, embodiments of this application provide a wireless communication reconnection device, comprising:
[0028] The first sending module is used to send a probe request frame to the access point. The probe request frame includes a first status flag bit, which is used to ask the access point whether it has saved the key session association PMKSA.
[0029] The first receiving module is used to receive the probe response frame sent by the access point. The probe response frame includes a second status flag bit, which is used to indicate whether the access point saves the PMKSA.
[0030] The processing module is used to determine whether the access point has saved the PMKSA based on the probe response frame;
[0031] The connection control module is used to initiate a connection request to the access point based on the PMKSA when the processing module determines that the access point has stored the PMKSA; and to initiate an authentication request to the access point when the processing module determines that the access point does not store the PMKSA, and to initiate a connection request to the access point after successful authentication.
[0032] In one possible implementation, the first and second status flags are defined in a vendor-defined field of the information element.
[0033] In one possible implementation, the second status flag is a multi-bit flag used to indicate the storage status of the PMKSA, which includes at least one of the following: unsaved status, soon-to-expire status, or long-term valid status.
[0034] In one possible implementation, the wireless communication reconnection device is also used for:
[0035] Based on the historical connection data of the access point, predict whether the access point saves PMKSA, and obtain the prediction result;
[0036] Based on the prediction results, determine whether the access point saves PMKSA;
[0037] When the prediction result indicates that the access point has not saved the PMKSA, an authentication request is sent to the access point, and a connection request is sent to the access point after successful authentication.
[0038] When the prediction result indicates that the access point stores a PMKSA, the step of sending a probe request frame to the access point is executed.
[0039] In one possible implementation, the wireless communication reconnection device is also used for:
[0040] Determine the PMKSA status of the access point based on the PMKSA cache table;
[0041] When the PMKSA cache table indicates that the PMKSA stored by the access point is invalid, an authentication request is sent to the access point, and a connection request is sent to the access point after successful authentication.
[0042] When the PMKSA cache table indicates that the PMKSA stored by the access point is valid, the step of sending a probe request frame to the access point is executed.
[0043] Fourthly, embodiments of this application provide a wireless communication reconnection device, comprising:
[0044] The second receiving module is used to receive a probe request frame sent by a wireless client. The probe request frame includes a first status flag bit, which is used to ask the access point whether to save the key session association PMKSA.
[0045] The generation module is used to generate a probe response frame based on the probe request frame. The probe response frame includes a second status flag bit, which is used to indicate whether the access point saves the PMKSA.
[0046] The second sending module is used to send probe response frames to the wireless client.
[0047] Fifthly, this application provides a chip on which a computer program is stored. When the computer program is executed by the chip, it implements the wireless communication reconnection method as described in any of the first aspects, or when the computer program is executed by the chip, it implements the wireless communication reconnection method as described in any of the second aspects.
[0048] Sixthly, this application provides a chip module on which a computer program is stored. When the computer program is executed by the chip module, it implements the wireless communication reconnection method as described in any of the first aspects, or when the computer program is executed by the chip module, it implements the wireless communication reconnection method as described in any of the second aspects.
[0049] In a seventh aspect, embodiments of this application provide an electronic device, including: a memory, a processor, and a transceiver;
[0050] The memory stores the instructions that the computer executes;
[0051] The processor executes computer execution instructions stored in memory to implement the wireless communication reconnection method as described in any of the first aspects; or, the processor executes computer execution instructions stored in memory to implement the wireless communication reconnection method as described in any of the second aspects.
[0052] Eighthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the wireless communication reconnection method of any one of the first aspects, or, when executed by a processor, are used to implement the wireless communication reconnection method of any one of the second aspects.
[0053] Ninthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the wireless communication reconnection method of any one of the first aspects, or, when executed by a processor, implements the wireless communication reconnection method of any one of the second aspects.
[0054] The wireless communication reconnection method, apparatus, device, and storage medium provided in this application add a flag bit to the probe request frame and probe response frame generated during the scanning process before the wireless client and access point reconnect. This enables PMKSA presence detection. If the access point stores the PMKSA, reconnection is initiated directly; if the access point does not store the PMKSA, a re-authentication process is performed and the connection is completed. This avoids connection failures caused by the absence of the PMKSA in the access point, improving the success rate and efficiency of reconnection. Attached Figure Description
[0055] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0056] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0057] Figure 2 A flowchart illustrating the wireless communication reconnection method provided in the embodiments of this application. Figure 1 ;
[0058] Figure 3 A flowchart illustrating the wireless communication reconnection method provided in the embodiments of this application. Figure 2 ;
[0059] Figure 4 Signaling diagram of the wireless communication reconnection method provided in the embodiments of this application;
[0060] Figure 5 A flowchart illustrating the wireless communication reconnection method provided in the embodiments of this application. Figure 3 ;
[0061] Figure 6 A flowchart illustrating the wireless communication reconnection method provided in the embodiments of this application. Figure 4 ;
[0062] Figure 7 Schematic diagram of the wireless communication reconnection device provided in the embodiments of this application Figure 1 ;
[0063] Figure 8 Schematic diagram of the wireless communication reconnection device provided in the embodiments of this application Figure 2 ;
[0064] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0065] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0066] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0067] First, let me explain the terms used in this application:
[0068] WPA3 (Wi-Fi Protected Access 3): Wi-Fi Security Access Version 3, a Wi-Fi security protocol released by the Wi-Fi Alliance in 2018. It adopts 192-bit encryption and the Galois CounterMode Protocol (GCMP) encryption algorithm to improve security.
[0069] PMKSA (Pairwise Master Secret Key Session Association): A security context association established between a wireless client (Station, STA) and an access point (AP) during WPA3 authentication. It contains the paired master secret key (PMK) generated during the authentication process and its associated session parameters. After establishing the PMKSA, the client can skip the authentication process and achieve fast reconnection upon reconnection.
[0070] PMKID (Pairwise Master Key Identifier): A unique identifier generated during the establishment of a PMKSA, used for quick lookup and referencing of the corresponding PMKSA in subsequent connections. Its data portion typically contains the access point's Media Access Control (MAC) address and the client's MAC address.
[0071] Probe Frame: A management frame used in the discovery process of a wireless network. This application mainly involves two types: Probe Request and Probe Response. The Probe Request frame is actively sent by the STA to scan or search for surrounding wireless networks; the Probe Response frame is sent by the AP after receiving a Probe Request frame from its network to inform the client of its network capabilities and parameters.
[0072] Figure 1 This is a schematic diagram of an application scenario provided in an embodiment of this application, such as... Figure 1 As shown, it includes a wireless client 101 and an access point 102.
[0073] Wireless client 101 is a terminal device with Wi-Fi capability and support for the WPA3 encryption protocol, such as a smartphone or tablet. Access point 102 is a network infrastructure device that provides network access services to the wireless client, also supporting the WPA3 encryption protocol, such as a home wireless router, enterprise-level wireless access point, or public hotspot gateway. Wireless client 101 and access point 102 can establish a connection and transmit information to each other.
[0074] In related technologies, during the initial connection, the wireless client 101 and access point 102 establish a connection through complete WPA3 authentication and generate a PMKSA for subsequent fast reconnection. When a reconnection is required after a connection is lost, the PMKSA generated during the initial connection is used first, skipping the authentication process and completing the connection process more quickly.
[0075] However, in real-world usage scenarios, access points may fail to save or discard the PMKSA of wireless clients due to restarts, full loads, or memory limits. In such cases, the wireless client still initiates a reconnection using the PMKSA as required by the protocol. Since the access point does not have a corresponding PMKSA, the connection will fail, and the wireless client will have to reconnect, increasing the reconnection time and worsening the user experience.
[0076] Based on this, this application provides a wireless communication reconnection method. Before the wireless client and access point reconnect, a flag bit is added to the probe request frame and probe response frame generated during the scanning process to perform PMKSA presence detection. If the access point has a PMKSA stored, reconnection is initiated directly; if the access point does not have a PMKSA stored, the re-authentication process is performed and the connection is completed. This avoids connection failures caused by the absence of a PMKSA in the access point, improving the success rate and efficiency of reconnection.
[0077] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0078] Figure 2 A flowchart illustrating the wireless communication reconnection method provided in the embodiments of this application. Figure 1 Applied to wireless clients, such as Figure 2 As shown, the method includes:
[0079] S201, Send a probe request frame to the access point.
[0080] The probe request frame includes a first status flag, which is used to ask the access point whether it has saved the key session association PMKSA.
[0081] The Probe Request frame is a Probe Request frame sent by a wireless client when scanning access points. An extra flag bit, the first status flag bit, is added to the standard Probe Request frame to ask whether the access point has saved the PMKSA.
[0082] Optionally, the probe request frame may also include a Service Set Identifier (SSID) and a source MAC address. The SSID specifies the SSID of the target network that the wireless client wants to connect to, and is used to send a probe request to the access point. The source MAC address is the wireless client's own MAC address, used to instruct the access point to query whether a PMKSA corresponding to the wireless client exists.
[0083] In one possible implementation, the first status flag can be defined in a vendor-specific field of the information element. An information element (IE) is a structured data field in Wi-Fi management frames (such as Probe Request / Response) used to carry specific information. An IE typically contains an element ID, length, and a variable-length data body. Vendor-specific fields are vendor-defined extensions reserved by the IEEE standard for implementing special functions outside the standard protocol or transmitting proprietary information. The first status flag can be defined in the vendor-specific field of the IE. The first status flag can be, for example, 1 or 0.
[0084] S202, Receive the probe response frame sent by the access point.
[0085] The probe response frame includes a second status flag, which is used to indicate whether the access point has saved the PMKSA.
[0086] The probe response frame is a Probe Response frame generated by the access point based on the probe request frame. The access point sends the probe response frame to the wireless client, and the wireless client receives the probe response frame. One or more additional flag bits, known as the second status flag bits, are added to the standard Probe Response frame to indicate whether the access point has saved the PMKSA.
[0087] The second status flag is defined in a vendor-defined field of the same information element as the first status flag.
[0088] In one possible implementation, the second status flag is a single bit used to indicate whether the access point has saved the PMKSA. For example, when the second status flag is 0, it means that the access point has not saved the PMKSA, and when the second status flag is 1, it means that the access point has saved the PMKSA.
[0089] In one possible implementation, the second status flag is a multi-bit flag used to indicate the storage status of the PMKSA. The storage status includes at least one of the following: not saved, about to expire, or long-term valid. For example, when the second status flag is 00, it indicates that the access point has not saved the PMKSA; when the second status flag is 01, it indicates that the access point has saved the PMKSA but it is about to expire; when the second status flag is 10, it indicates that the access point has saved the PMKSA and it is long-term valid.
[0090] In the above-mentioned scheme where the second state flag is a multi-bit bit, the wireless client's decision-making can be refined. This includes the wireless client being able to dynamically adjust its strategy based on the validity of the PMKSA (such as initiating full authentication in advance when the PMKSA is about to expire); and redundant state queries can be reduced, such as the wireless client not needing to frequently send PROBE frames to verify whether the PMKSA is still valid.
[0091] S203. Based on the probe response frame, determine whether the access point has saved PMKSA.
[0092] The second flag bit in the probe response frame is detected, and the specific value of the second flag bit is used to determine whether the access point has saved the PMKSA. For example, if the second status flag bit is detected as 0, it is determined that the access point has not saved the PMKSA; if the second status flag bit is detected as 1, it is determined that the access point has saved the PMKSA.
[0093] S204. When the access point has a PMKSA, initiate a connection request to the access point based on the PMKSA.
[0094] When the access point stores the PMKSA, it means that the wireless client can connect directly to the access point, skipping the authentication process. The wireless client then initiates a connection request to the access point based on the PMKSA. The connection request is a request from the wireless client to the access point to establish a connection, used to establish a communication connection between the wireless client and the access point.
[0095] S205. When the access point does not store the PMKSA, initiate an authentication request to the access point, and initiate a connection request to the access point after successful authentication.
[0096] When the access point does not save the PMKSA, it means that the wireless client needs to re-authenticate with the access point before a connection can be established. In this case, the wireless client needs to first send an authentication request to the access point to initiate the authentication process. Once authentication is successful, the wireless client then sends a connection request to the access point to establish a communication connection between the wireless client and the access point.
[0097] The wireless communication reconnection method provided in this application adds a flag bit to the probe request frame and probe response frame generated during the scanning process before the wireless client and access point reconnect. This allows for PMKSA presence detection. If the access point has a PMKSA stored, reconnection is initiated directly. If the access point does not have a PMKSA stored, the re-authentication process is performed and the connection is completed. This avoids connection failures caused by the absence of a PMKSA in the access point, improving the success rate and efficiency of reconnection.
[0098] Figure 3 A flowchart illustrating the wireless communication reconnection method provided in the embodiments of this application. Figure 2 Applied to access points, such as Figure 3 As shown, the method includes:
[0099] S301, Receive probe request frames sent by wireless clients.
[0100] The probe request frame includes a first status flag, which is used to ask the access point whether it has saved the key session association PMKSA.
[0101] S302. Generate a probe response frame based on the probe request frame.
[0102] The probe response frame includes a second status flag, which is used to indicate whether the access point has saved the PMKSA.
[0103] Optionally, the probe response frame may also include a source MAC address and a destination MAC address. The source MAC address is the MAC address of the access point, used by the wireless client to determine which access point the probe response frame originated from, thus associating the PMKSA information with the correct access point. The destination MAC address is the MAC address of the wireless client that sent the Probe Request, used to ensure that the probe response is sent to the correct wireless client.
[0104] After receiving a probe request frame, the access point checks the frame. If the first status flag is detected in the probe request frame, it checks whether the PMKSA of the wireless client is stored in the local storage according to the MAC address of the wireless client indicated by the Probe Request frame. Based on the result of the check, one or more additional flag bits, namely the second status flag bits, are added to the standard Probe Response frame to indicate whether the access point has saved the PMKSA.
[0105] In one possible implementation, the second status flag is a single bit used to indicate whether the access point has saved the PMKSA. For example, when the second status flag is 0, it means that the access point has not saved the PMKSA, and when the second status flag is 1, it means that the access point has saved the PMKSA.
[0106] In one possible implementation, the second status flag is a multi-bit flag used to indicate the storage status of the PMKSA. The storage status includes at least one of the following: not saved, about to expire, or long-term valid. For example, when the second status flag is 00, it indicates that the access point has not saved the PMKSA; when the second status flag is 01, it indicates that the access point has saved the PMKSA but it is about to expire; when the second status flag is 10, it indicates that the access point has saved the PMKSA and it is long-term valid.
[0107] S303, Send a probe response frame to the wireless client.
[0108] The wireless communication reconnection method provided in this application adds a flag bit to the probe request frame and probe response frame generated during the scanning process before the wireless client and access point reconnect. This flag bit is used to detect the presence of the PMKSA. If the access point has the PMKSA stored, reconnection is initiated directly. If the access point does not have the PMKSA stored, a re-authentication process is performed, and the connection is completed. This avoids connection failures caused by the absence of the PMKSA in the access point, improving the success rate and efficiency of reconnection.
[0109] Figure 4 The signaling diagram for the wireless communication reconnection method provided in the embodiments of this application is as follows: Figure 4 As shown, it includes:
[0110] S401, The wireless client sends a probe request frame to the access point.
[0111] The probe request frame includes a first status flag. The wireless client uses the probe request frame to ask the access point whether it has stored the PMKSA.
[0112] S402. The access point receives the probe request frame sent by the wireless client and generates a probe response frame based on the probe request frame.
[0113] The access point receives a probe request frame, checks whether PMKSA is stored locally, and generates a probe response frame containing the second status flag.
[0114] S403, The access point sends a probe response frame to the wireless client.
[0115] The access point sends a probe response frame to the wireless client to reply whether the access point stores a PMKSA.
[0116] S404. The wireless client receives the probe response frame and initiates a connection request and / or authentication request to the access point based on the probe response frame.
[0117] After receiving the probe response frame, the wireless client checks the second status flag and determines whether the access point stores the PMKSA based on the value of the second status flag. If the access point stores the PMKSA, the client initiates a connection request to the access point based on the PMKSA. If the access point does not store the PMKSA, the client initiates an authentication request to the access point and initiates a connection request to the access point after successful authentication.
[0118] Figure 5 A flowchart illustrating the wireless communication reconnection method provided in the embodiments of this application. Figure 3 Applied to wireless clients, such as Figure 5 As shown, the method includes:
[0119] S501. Based on the historical connection data of the access point, predict whether the access point saves PMKSA and obtain the prediction result.
[0120] Historical connection data is data collected and recorded during multiple interactions between the wireless client and the access point, and is stored locally on the wireless client.
[0121] Historical connection data may include at least one of the following: PMKSA failure probability, access point restart frequency, and network congestion index. The PMKSA failure probability is the percentage of times a wireless client has failed to reconnect to the access point using PMKSA out of the total number of reconnections. For example, if 4 out of 10 reconnection attempts fail because the access point did not save the PMKSA, the failure probability is 40%. The access point restart frequency is the recorded frequency at which a wireless client detects an unexpected disconnection from the access point and then quickly receives a deauthentication broadcast frame from the access point. For example, if the access point restarted 3 times in the past hour. The network congestion index is calculated based on recorded channel utilization, packet retransmission rate, latency, and other indicators when a wireless client historically connected to the access point. Prolonged high congestion levels may be related to the access point clearing its PMKSA cache due to overload. The network congestion index can be a weighted sum of the various indicators.
[0122] In one possible implementation, a prediction threshold can be set to obtain the prediction result. For example, when the PMKSA failure probability is higher than a set threshold (e.g., 30%), the prediction result is that the access point has not saved the PMKSA; otherwise, the prediction result is that the access point has saved the PMKSA. Similarly, when the access point restart frequency is higher than a set threshold (e.g., 3 times per hour), the prediction result is that the access point has not saved the PMKSA; otherwise, the prediction result is that the access point has saved the PMKSA. For example, when the network congestion index is higher than a set threshold of 3 (dimensionless, based on a 0-10 scale), the prediction result is that the access point has not saved the PMKSA; otherwise, the prediction result is that the access point has saved the PMKSA.
[0123] In one possible implementation, prediction results can be obtained by setting multiple prediction thresholds. For example, when the PMKSA failure probability is higher than a first set threshold (e.g., 30%) and the access point restart frequency is higher than a second set threshold (e.g., 3 times per hour), the prediction result is that the access point has not saved the PMKSA; otherwise, the prediction result is that the access point has saved the PMKSA, and so on.
[0124] S502. Based on the prediction results, determine whether the access point saves PMKSA.
[0125] When the prediction result indicates that the access point has not saved the PMKSA, step S506 is executed to initiate an authentication request to the access point, and after successful authentication, a connection request is initiated to the access point.
[0126] When the prediction result indicates that the access point has a PMKSA, step S503 is executed to further verify the prediction result through probe request frames and probe response frames to ensure the connection success rate.
[0127] S503, Receive the probe response frame sent by the access point.
[0128] S504. Based on the probe response frame, determine whether the access point has saved PMKSA.
[0129] If the access point has a PMKSA, proceed to step S505; if the access point does not have a PMKSA, proceed to step S506.
[0130] S505, Initiate a connection request to the access point based on PMKSA.
[0131] S506. Initiate an authentication request to the access point, and after successful authentication, initiate a connection request to the access point.
[0132] The wireless communication reconnection method provided in this application predicts in advance whether the access point has stored the PMKSA. When the PMKSA is predicted to be highly likely to fail, the authentication process is initiated directly, which avoids invalid fast reconnection and redundant status queries, reduces air interface overhead, and improves reconnection efficiency.
[0133] Figure 6 A flowchart illustrating the wireless communication reconnection method provided in the embodiments of this application. Figure 4 Applied to wireless clients, such as Figure 6 As shown, the method includes:
[0134] S601. Determine the PMKSA status of the access point based on the PMKSA cache table.
[0135] When the PMKSA cache table indicates that the PMKSA stored by the access point is invalid, step S605 is executed to initiate an authentication request to the access point, and after successful authentication, a connection request is initiated to the access point.
[0136] When the PMKSA cache table indicates that the PMKSA stored by the access point is valid, step S602 is executed to send a probe request frame to the access point.
[0137] The wireless client stores a PMKSA cache table, which records the status of the PMKSA saved by the access point, indicating whether the PMKSA is valid or invalid.
[0138] For example, the PMKSA cache table includes an access point identifier, a PMKSA status, and a timestamp, wherein the access point identifier is the MAC address of the access point; the PMKSA status is such that VALID is valid and INVALID is invalid; and the timestamp is the time when the status was written or last verified.
[0139] In one possible implementation, the PMKSA cache table can be updated event-triggered. For example, when a wireless client explicitly learns that the access point PMKSA is invalid through a probe response frame, it will mark the access point's state as INVALID in the cache table. Conversely, if the wireless client detects that the access point may be restarting, it will set the access point's state to INVALID.
[0140] In one possible implementation, the PMKSA cache table can be updated time-driven. For example, a time-to-live (TTL) can be pre-set; after the TTL expires, the state automatically becomes invalid, and the wireless client needs to retrieve the latest state again via a probe request frame.
[0141] When the PMKSA recorded in the PMKSA cache table is valid, it means that the access point has stored the PMKSA. The prediction result is further verified by probe request frames and probe response frames to ensure the connection success rate.
[0142] When the PMKSA recorded in the PMKSA cache table is invalid, it means that the access point has not saved the PMKSA. An authentication request is sent to the access point, and a connection request is sent to the access point after successful authentication.
[0143] S602, Receive the probe response frame sent by the access point.
[0144] S603. Based on the probe response frame, determine whether the access point has saved PMKSA.
[0145] If the access point has a PMKSA, proceed to step S604; if the access point does not have a PMKSA, proceed to step S605.
[0146] S604. Initiate a connection request to the access point based on PMKSA.
[0147] S605. Initiate an authentication request to the access point, and after successful authentication, initiate a connection request to the access point.
[0148] The wireless communication reconnection method provided in this application introduces a PMKSA cache table in the wireless client. During reconnection, the local cache is queried first instead of immediately interacting with the access point. This reduces unnecessary probe request frame transmission, saves air interface resources, and improves reconnection efficiency.
[0149] Figure 7Schematic diagram of the wireless communication reconnection device provided in the embodiments of this application Figure 1 ,like Figure 7 As shown, the wireless communication reconnection device 70 provided in this embodiment includes:
[0150] The first sending module 701 is used to send a probe request frame to the access point. The probe request frame includes a first status flag bit, which is used to ask the access point whether it has saved the key session association PMKSA.
[0151] The first receiving module 702 is used to receive a probe response frame sent by the access point. The probe response frame includes a second status flag bit, which is used to indicate whether the access point saves the PMKSA.
[0152] Processing module 703 is used to determine whether the access point has saved PMKSA based on the probe response frame;
[0153] The connection control module 704 is used to initiate a connection request to the access point based on the PMKSA when the processing module determines that the access point has stored the PMKSA; and to initiate an authentication request to the access point when the processing module determines that the access point does not store the PMKSA, and to initiate a connection request to the access point after successful authentication.
[0154] In one possible implementation, the first and second status flags are defined in a vendor-defined field of the information element.
[0155] In one possible implementation, the second status flag is a multi-bit flag used to indicate the storage status of the PMKSA, which includes at least one of the following: unsaved status, soon-to-expire status, or long-term valid status.
[0156] In one possible implementation, the wireless communication reconnection device 70 is further used for:
[0157] Based on the historical connection data of the access point, predict whether the access point saves PMKSA, and obtain the prediction result;
[0158] Based on the prediction results, determine whether the access point saves PMKSA;
[0159] When the prediction result indicates that the access point has not saved the PMKSA, an authentication request is sent to the access point, and a connection request is sent to the access point after successful authentication.
[0160] When the prediction result indicates that the access point stores a PMKSA, the step of sending a probe request frame to the access point is executed.
[0161] In one possible implementation, the wireless communication reconnection device 70 is further used for:
[0162] Determine the PMKSA status of the access point based on the PMKSA cache table;
[0163] When the PMKSA cache table indicates that the PMKSA stored by the access point is invalid, an authentication request is sent to the access point, and a connection request is sent to the access point after successful authentication.
[0164] When the PMKSA cache table indicates that the PMKSA stored by the access point is valid, the step of sending a probe request frame to the access point is executed.
[0165] The wireless communication reconnection device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0166] Figure 8 Schematic diagram of the wireless communication reconnection device provided in the embodiments of this application Figure 2 ,like Figure 8 As shown, the wireless communication reconnection device 80 provided in this embodiment includes:
[0167] The second receiving module 801 is used to receive a probe request frame sent by a wireless client. The probe request frame includes a first status flag bit, which is used to ask the access point whether to save the key session association PMKSA.
[0168] The generation module 802 is used to generate a detection response frame based on the detection request frame. The detection response frame includes a second status flag bit, which is used to indicate whether the access point saves the PMKSA.
[0169] The second transmitting module 803 is used to send a probe response frame to the wireless client.
[0170] The wireless communication reconnection device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0171] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 As shown, the electronic device 90 provided in this embodiment includes at least one processor 901 and a memory 902. The processor 901 and the memory 902 are connected via a bus 903.
[0172] In a specific implementation, at least one processor 901 executes computer execution instructions stored in memory 902, causing at least one processor 901 to perform the above-described method.
[0173] The specific implementation process of processor 901 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0174] This application also provides a chip on which a computer program is stored. When the computer program is executed by the chip, it implements the above-mentioned wireless communication reconnection method. The corresponding content and effects can be referred to the method embodiment section, and will not be repeated here.
[0175] This application also provides a chip module on which a computer program is stored. When the computer program is executed by the chip module, it implements the above-mentioned wireless communication reconnection method. The corresponding content and effects can be referred to the embodiment section of the wireless communication reconnection method, which will not be repeated here.
[0176] This application also provides a computer program product that can be executed by a processor. When the computer program product is executed, the above-mentioned wireless communication reconnection method can be implemented.
[0177] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0178] All or part of the steps in the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-described method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disc, and any combination thereof.
[0179] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0180] These computer-executable instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0181] These computer-executable instructions may also be loaded onto a computer or other programmable data processing equipment, causing a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0182] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method of reconnecting for wireless communication, the method comprising: The method applied to a wireless client comprises: sending a probe request frame to an access point, wherein the probe request frame comprises a first status flag, and the first status flag is used to inquire whether the access point saves a PMKSA; receiving a probe response frame sent by the access point, wherein the probe response frame comprises a second status flag, and the second status flag is used to indicate whether the access point saves the PMKSA; judging whether the access point saves the PMKSA according to the probe response frame; when the access point saves the PMKSA, initiating a connection request to the access point according to the PMKSA; when the access point does not save the PMKSA, initiating an authentication request to the access point, and initiating a connection request to the access point after the authentication is passed.
2. The wireless communication reconnection method of claim 1, wherein, The first status flag and the second status flag are defined in a vendor-defined field of an information element.
3. The method of claim 1, wherein, The second status flag is a multi-bit flag, and the second status flag is used to indicate a storage state of the PMKSA, and the storage state comprises at least one of the following: an unsaved state, an about-to-expire state, and a long-term valid state.
4. The method of claim 1, wherein, Before the step of sending the probe request frame to the access point, the method further comprises: predicting whether the access point saves the PMKSA according to historical connection data of the access point, to obtain a prediction result; judging whether the access point saves the PMKSA according to the prediction result; when the prediction result indicates that the access point does not save the PMKSA, initiating an authentication request to the access point, and initiating a connection request to the access point after the authentication is passed; when the prediction result indicates that the access point saves the PMKSA, performing the step of sending the probe request frame to the access point.
5. The method of claim 1, wherein, The wireless client stores a PMKSA cache table, and the PMKSA cache table is used to record a PMKSA state of the access point, and before the step of sending the probe request frame to the access point, the method further comprises: determining the PMKSA state of the access point according to the PMKSA cache table; when the PMKSA cache table indicates that the PMKSA saved by the access point is invalid, initiating an authentication request to the access point, and initiating a connection request to the access point after the authentication is passed; when the PMKSA cache table indicates that the PMKSA saved by the access point is valid, performing the step of sending the probe request frame to the access point.
6. A method of reconnecting for wireless communication, the method comprising: The method applied to an access point comprises: receiving a probe request frame sent by a wireless client, wherein the probe request frame comprises a first status flag, and the first status flag is used to inquire whether the access point saves a PMKSA; generating a probe response frame according to the probe request frame, wherein the probe response frame comprises a second status flag, and the second status flag is used to indicate whether the access point saves the PMKSA; sending the probe response frame to the wireless client.
7. A wireless communication reconnection apparatus, comprising: comprises: The first sending module is configured to send a probe request frame to an access point, wherein the probe request frame comprises a first status flag, and the first status flag is used to inquire whether the access point saves a PMKSA (Pairwise Master Key Security Association); The first receiving module is configured to receive a probe response frame sent by the access point, wherein the probe response frame comprises a second status flag, and the second status flag is used to indicate whether the access point saves the PMKSA; The processing module is configured to determine whether the access point saves the PMKSA according to the probe response frame; The connection control module is configured to initiate a connection request to the access point according to the PMKSA when the processing module determines that the access point saves the PMKSA, and initiate an authentication request to the access point when the processing module determines that the access point does not save the PMKSA, and initiate a connection request to the access point after the authentication is passed.
8. A wireless communication reconnection apparatus, comprising: The second receiving module is configured to receive a probe request frame sent by a wireless client, wherein the probe request frame comprises a first status flag, and the first status flag is used to inquire whether the access point saves a PMKSA (Pairwise Master Key Security Association); The generating module is configured to generate a probe response frame according to the probe request frame, wherein the probe response frame comprises a second status flag, and the second status flag is used to indicate whether the access point saves the PMKSA; The second sending module is configured to send the probe response frame to the wireless client. The memory and the processor; 9. An electronic device, comprising: The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the method in any one of claims 1-5, or the processor executes the method in claim 6. The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method in any one of claims 1-5, or the computer execution instructions are executed by the processor to implement the method in claim 6. 10. A computer-readable storage medium, characterized in that,