Communication methods and related devices
By optimizing the channel scanning strategy of P2P GC and adjusting the number of scans and the interval, the problem of excessive scanning time for P2P devices was solved, enabling fast connection and efficient service transmission.
Patent Information
- Application Number
- CN202411517582.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In Wi-Fi P2P technology, P2P GC devices take a long time to scan and detect P2P GOs, which cannot meet the service requirements with high connection duration requirements.
By adjusting the channel scanning strategy of P2P GC, optimizing the number of scans and/or the scan interval, the channel scanning time can be made less than or equal to the connection time of P2P services, including the combined use of single-channel scanning and full-channel scanning.
It enables rapid connection of P2P devices, meets the business needs with high connection duration requirements, and improves connection success rate and timeliness.
Smart Images

Figure CN119584331B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a communication method and related apparatus. Background Technology
[0002] In Wi-Fi peer-to-peer (P2P) technology, devices can share media data, enabling applications such as multi-screen collaboration and device sharing. P2P technology defines two roles: the group owner (GO) and the group client (GC). The P2P GO functions similarly to the access point in a traditional Wi-Fi network, while the P2P GC functions similarly to the wireless station in a traditional Wi-Fi network.
[0003] In a traditional P2P group or network, one and only one device acts as the P2P GO (Go-Organizer), while the other devices act as the P2P GC (Collection-Organizer). A P2P connection exists between the P2P GO and the P2P GC, enabling data transmission for P2P services.
[0004] Currently, the P2P connection establishment process mainly involves device negotiation, information transmission, scanning and discovery, and connection procedures. However, during the scanning and discovery process, the P2P GC may not be able to detect the P2P GO, resulting in a long scanning time, which cannot meet the business requirements with high connection duration requirements. Summary of the Invention
[0005] This application provides a communication method and related apparatus. By adjusting the channel scanning strategy in the P2P GC, the frequency of the P2P GO can be quickly determined, enabling the P2P GC and P2P GO to quickly implement P2P services with high connection duration requirements.
[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0007] In a first aspect, a communication method is provided, applied to a first device, the method comprising:
[0008] Receive a first command sent by the second device, wherein the first command includes the first frequency of the second device;
[0009] In response to the first command, a first channel scan is triggered, and the second frequency of the second device is detected. The scanning duration of the first channel scan is less than or equal to the connection duration for the first device and the second device to achieve peer-to-peer service. The scanning duration of the first channel scan is related to the number of scans and / or the scanning interval optimized in the scanning strategy of the first channel scan.
[0010] A peer-to-peer connection is established between the first device and the second device based on the second frequency. The peer-to-peer connection is used by the first device and the second device to implement peer-to-peer services.
[0011] According to the communication method of this application, the second device sends a first command to the first device, which triggers the first device to scan and discover the second device. After receiving the first command, the first device may be unable to receive or use the first frequency. Therefore, the first device can trigger a first channel scan. Because the number of scans and / or the scan interval in the first channel scan strategy are optimized or adjusted, the scan duration of the first channel scan is less than or equal to the connection duration for the first device and the second device to achieve peer-to-peer service. In other words, the scan duration of the first channel scan is adaptable to the actual requirements of the connection duration for P2P services, especially those with high connection duration requirements. Therefore, the first device can quickly detect the correct frequency, i.e., the second frequency, while meeting the high connection duration requirements of P2P services. Thus, the first device can establish a P2P connection between the first device and the second device based on the second frequency, enabling the first device and the second device to quickly achieve instant P2P service.
[0012] In one possible implementation of the first aspect, triggering a first channel scan upon obtaining a first frequency according to a first command includes: triggering a single-channel scan using the first frequency, and then triggering a full-channel scan; or, triggering a single-channel scan using the first frequency; or, triggering a full-channel scan.
[0013] If the first frequency is not obtained according to the first command, triggering the first channel scan includes: triggering a single channel scan using the third frequency, and then triggering a full channel scan; or, triggering a single channel scan using the third frequency; or, triggering a full channel scan.
[0014] It is evident that the first device may be able to receive and use the first frequency, or it may be able to receive but not use the first frequency, or it may not be able to receive the first frequency at all. Therefore, the first channel scan can accommodate all of the aforementioned scenarios, enabling the first device to quickly obtain the second frequency of the second device. Here, the second frequency is the correct frequency, meaning the first device can discover the second device based on the second frequency. The second frequency can be the same as or different from the first frequency. The third frequency can be a frequency pre-negotiated between the first and second devices, or it can be a default frequency.
[0015] In one possible implementation of the first aspect, the first channel scan includes: single-channel scanning and / or full-channel scanning; the scanning strategy of the first channel scan satisfies at least one of the following:
[0016] The number of scans for a single-channel scan is less than or equal to the first value;
[0017] The interval between single-channel scans is less than or equal to the first duration;
[0018] The interval between single-channel scanning and full-channel scanning is less than or equal to the second duration;
[0019] The interval between full-channel scans is less than or equal to the third duration.
[0020] It can be seen that the first device can adjust at least one of the following: the number of scans and the interval duration of a single-channel scan, the interval duration between a single-channel scan and a full-channel scan, and the interval duration of a full-channel scan.
[0021] If the first device is able to scan and use the first frequency, it can adjust its single-channel scanning strategy to quickly enter full-channel scanning, significantly improving the connection success rate. Similarly, the first device can adjust its full-channel scanning strategy, not only enabling it to quickly enter full-channel scanning and significantly improving the connection success rate, but also allowing it to quickly enter the next full-channel scan.
[0022] If the first device cannot scan the first frequency, or if it can scan and use the first frequency, the first device can adjust its scanning strategy between single-channel scanning and full-channel scanning, enabling it to quickly enter full-channel scanning and significantly improving the connection success rate.
[0023] In summary, the first device can quickly establish a P2P connection between the first device and the second device to meet the needs of P2P services with high connection duration requirements.
[0024] In one possible implementation of the first aspect, the first value is set based on the connection success rate between the first device and other devices.
[0025] In one possible implementation of the first aspect, the first value is less than or equal to 4.
[0026] In one possible implementation of the first aspect, the first duration, the second duration, or the third duration is set according to the capabilities of the wireless fidelity module in the first device.
[0027] In one possible implementation of the first aspect,
[0028] The first duration is greater than or equal to 0.1 seconds and less than or equal to 0.5 seconds; and / or,
[0029] The second duration is greater than or equal to 0.1 seconds and less than or equal to 0.5 seconds; and / or,
[0030] The third duration is greater than or equal to 0.1 seconds and less than or equal to 1 second.
[0031] In one possible implementation of the first aspect, triggering the first channel scan includes:
[0032] First, trigger two single-channel scans, then trigger a full-channel scan.
[0033] It is evident that the first device can not only quickly obtain the correct frequency using single-channel scanning, but also avoid wasting the delay caused by multiple single-channel scanning failures, thus ensuring the connection success rate between the first device and the second device and taking into account various situations in which the first device and the second device establish a P2P connection.
[0034] In one possible implementation of the first aspect, the first device acts as a peer group client (P2P GC) and the second device acts as a peer group owner (P2P GO).
[0035] In a second aspect, a communication device is provided for use with a first device, the device comprising: a module for performing the methods described in the first aspect and any possible implementation thereof.
[0036] Thirdly, a communication system is provided, comprising a first device and a second device, wherein the first device is used to perform the methods described in the first aspect and any possible implementation thereof.
[0037] Fourthly, a communication device is provided, comprising: a transceiver, a processor, and a memory. The memory stores computer programs or instructions, and the processor controls the transceiver to transmit and receive signals. The processor also calls and executes the computer programs or instructions stored in the memory, causing the processor to implement the methods described in the first aspect and any possible implementation thereof.
[0038] Fifthly, a communication device is provided, comprising: a processor; the processor being configured to invoke a computer program or instructions in a memory, causing the communication device to execute the methods described in the first aspect and any possible implementation thereof.
[0039] Optionally, the communication device further includes a memory for storing program instructions. The processor is coupled to the memory via an interface.
[0040] In a sixth aspect, a chip device is provided, including a processor for invoking a computer program or instructions in the memory to cause the processor to perform the methods described in the first aspect and any possible implementation thereof.
[0041] Alternatively, the processor may be coupled to the memory via an interface.
[0042] In a seventh aspect, a chip is provided, comprising: an interface circuit and a logic circuit, wherein the interface circuit is used to receive signals from other chips outside the chip and transmit them to the logic circuit, or to send signals from the logic circuit to other chips outside the chip, and the logic circuit is used to implement the methods in the first aspect and any possible implementation thereof.
[0043] Eighthly, a computer-readable storage medium is provided, which stores a computer program or instructions configured to perform the methods described in the first aspect and any possible implementation thereof.
[0044] Ninthly, a computer program product is provided that, when the computer program product is run on a computer, causes the computer to perform the methods described in the first aspect and any possible implementation thereof. Attached Figure Description
[0045] Figure 1 This application provides a schematic diagram of the architecture of a communication system.
[0046] Figure 2 A flowchart illustrating a P2P connection establishment method provided in an embodiment of this application;
[0047] Figure 3 This is a schematic diagram of a channel scanning strategy provided in an embodiment of this application;
[0048] Figure 4 An interactive flowchart of a communication method provided in an embodiment of this application;
[0049] Figure 5 A schematic diagram of a scanning strategy for a first channel scanning provided in an embodiment of this application;
[0050] Figure 6 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;
[0051] Figure 7 This is a schematic diagram of the hardware structure of a communication device provided in an embodiment of this application;
[0052] Figure 8 This is a schematic diagram of the hardware structure of a communication device provided in an embodiment of this application. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature.
[0054] In embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0055] In the embodiments of this application, "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0056] In the description of the embodiments of this application, it should be noted that, unless otherwise explicitly specified and limited, the terms "set", "connected", and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of this application based on the specific circumstances.
[0057] Exemplary, this application provides a communication method. The communication method of this application can be applied to a communication system, which may include, but is not limited to, wireless communication systems, such as narrowband Internet of Things (NB-IoT), Global System for Mobile Communications (GSM), enhanced data rate for GSM Evolution (EDGE), wideband code division multiple access (WCDMA), code division multiple access 2000 (CDMA2000), time division-synchronization code division multiple access (TD-SCDMA), LTE, the 5th generation (5G), the 6th generation (6G), and future systems.
[0058] The scenarios for which this communication system is applicable may include, but are not limited to: terrestrial cellular communication, non-terrestrial network (NTN), satellite communication, high altitude platform station (HAPS) communication, vehicle-to-everything (V2X) communication, integrated access and backhaul (IAB) communication, and reconfigurable intelligent surface (RIS) communication.
[0059] Please see Figure 1 , Figure 1 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application. Figure 1 As shown, the communication system in this application embodiment may include: GO device 10 and GC device 20.
[0060] In this system, GO device 10 and GC device 20 constitute a P2P organization or P2P network. The communication system is the system corresponding to the P2P organization or P2P network. GO device 10 acts as the P2P GO, and GC device 20 acts as the P2P GC. There is one GO device 10 and one or more GC devices 20. There is a P2P connection or P2P link between GO device 10 and each GC device 20, enabling data transmission for P2P services. For ease of explanation, Figure 1 The diagram uses one GC device 20 for illustration.
[0061] GO device 10 or GC device 20 is a device with wireless transceiver capabilities. GO device 10 or GC device 20 can be a wireless terminal or a wired terminal. A wireless terminal can be a device providing voice and / or other service data connectivity to a user, a handheld device with wireless connectivity, or other processing devices connected to a wireless modem. The wireless terminal can communicate with one or more core networks via a radio access network (RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal, for example, a portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile device, which exchanges voice and / or data with the radio access network. Examples include personal communication service (PCS) phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), drones, wearable devices, and terminals in vehicle-to-everything (V2X) networks. Wireless terminals can also be referred to as systems, subscriber units, subscriber stations, mobile stations (MS), mobile stations, remote stations, remote terminals, access terminals, user terminals, user agents, user devices or user equipment (UE), terminal units, terminal stations, remote stations, mobile devices, terminals, wireless communication equipment, terminal agents, or terminal devices, etc., without limitation here.
[0062] Access terminals can be cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, wearable devices, terminal devices in 5G networks, 6G networks or future networks, or terminal devices in future evolved public land mobile networks (PLMNs), etc.
[0063] In addition, the GO device 10 or GC device 20 may use mobile operating systems such as Android, Linux, Windows, and iOS, and this application embodiment does not limit this.
[0064] In some embodiments, GO device 10 is a mobile phone and GC device 20 is a computer. Alternatively, GO device 10 is a mobile phone and GC device 20 is a vehicle.
[0065] Please see Figure 2 , Figure 2 This is a flowchart illustrating a P2P connection establishment method provided in an embodiment of this application. Figure 2 As shown, the P2P connection establishment method may include the following steps:
[0066] In step 11, during the process of GO device 10 and GC device 20, each device negotiates its chip capabilities to determine which device will act as the P2P GO and the remaining devices will act as the P2P GC. Thus, GO device 10 can create a P2P GO role, allowing it to periodically or non-periodically broadcast its information to GC device 20, enabling GC device 20 to discover GO device 10.
[0067] Step 12: After negotiation, GO device 10 sends information about GO device 10 to GC device 20, such as basic service set identifier (BSSID), service set identifier (SSID), frequency (Freq), password, etc., to achieve information transmission.
[0068] Step 13: After receiving the information from GO device 10, the chip component in GC device 20 triggers a channel scan to obtain the frequency of GO device 10 and scan to discover GO device 10.
[0069] Step 14: After the GO device 10 is detected by the scan, the GC device 20 and the GO device 10 can trigger the subsequent connection process to establish a P2P connection based on the frequency of the GO device 10, such as authentication (auth), association (assoc), and four-way handshake.
[0070] Based on the above description, in step 13, in some embodiments, the GC device 20 can receive the correct frequency from the information of the GO device 10. Therefore, the GC device 20 initiates a channel scan at the correct frequency. In this way, the GC device 20 will scan and discover the GO device 10.
[0071] In other embodiments, GC device 20 can receive the correct frequency from the information of GO device 10. However, before triggering a channel scan, GC device 20 may determine that the frequency is unreasonable due to factors such as scanning strategy, and will modify the frequency and initiate a channel scan with the modified frequency. In this way, GC device 20 will not be able to scan GO device 10.
[0072] In some embodiments, compared to GO device 10, the operating system of GC device 20 updates more slowly, resulting in fewer interfaces for its operating system and causing problems with information reception. Therefore, GO device 10 and GC device 20 negotiate a frequency. However, if this frequency is insufficient for its own code logic, GO device 10 will modify the frequency and send the modified frequency to GC device 20. Because GC device 20 has fewer interfaces, it cannot detect the modified frequency through the extra interfaces; that is, GC device 20 cannot receive the correct frequency from the information from GO device 10. Thus, GC device 20 will never be able to scan for GO device 10.
[0073] Based on the above description, the chip components in GC device 20 can adjust the scanning strategy for channel scanning.
[0074] Please see Figure 3 , Figure 3 This is a schematic diagram of a channel scanning strategy provided in an embodiment of this application. Figure 3 As shown, after receiving the command from GO device 10, the chip component first triggers four single-channel scans, followed by a full-channel scan, with intervals of 0.1s, 0.5s, 1s, 5s, 10s, and 10s, respectively. Figure 3 The runtime of single-channel scanning and full-channel scanning is not illustrated in the text.
[0075] However, without considering the time consumption of single-channel scanning and full-channel scanning themselves, only calculating the interval duration, it would take at least 6.6 seconds (s) before a full-channel scan could be triggered. Therefore, for P2P services with high connection duration requirements, such as direct screen mirroring between mobile phones and tablets, image sharing between mobile phones, and direct screen mirroring between mobile phones and large-screen devices, GO device 10 and / or GC device 20 would be set to a shorter connection duration, such as a 5-second timer. In this case, the above scanning strategy would time out, failing to meet the high connection duration requirements of P2P services.
[0076] In view of the above problems, by way of example, this application provides a communication method that uses P2P services with high connection duration requirements to adjust the number of scans and / or the scan interval in the channel scanning strategy, so that the channel scanning strategy meets the service requirements of P2P services with high connection duration.
[0077] The embodiments of this application will be described below with the following examples. Figure 1 Taking the GO device 10 and GC device 20 with the structure shown as examples, the communication method provided in this application embodiment will be described in detail with reference to the accompanying drawings and application scenarios.
[0078] Please see Figure 4 , Figure 4 This is an interactive flowchart illustrating a communication method provided in an embodiment of this application. The method is applied to a first device and a second device, wherein the first device may be... Figure 1 The GC device 20 or the apparatus in the GC device 20, the second device may be Figure 1 The GO device 10 or the apparatus within the GO device 10. For simplicity, let's take the example where the method is executed by the first device and the second device, such as... Figure 4 As shown, the communication method provided in this application embodiment may include:
[0079] S101, The second device sends a first command to the first device.
[0080] Correspondingly, the first device receives the first command sent by the second device.
[0081] The first command includes the first frequency of the second device.
[0082] After negotiation between the second device and the first device, the second device can act as a P2P GO (Peer-to-Peer) and the first device can act as a P2P GGC (Peer-to-Peer) GC (Peer-to-Peer) GC. The second device can create a P2P GO role. Therefore, the second device can send a first command to the first device, triggering the first device to scan and discover the second device.
[0083] In addition to the first frequency, the first command may also include other information about the second device, such as BSSID, SSID, and password. The first command can be sent via broadcast or other signaling methods; this application embodiment does not limit the method of transmission.
[0084] S102. The first device responds to the first command, triggers the first channel scan, and monitors the second frequency of the second device. The scanning duration of the first channel scan is less than or equal to the connection duration for the first device and the second device to achieve peer-to-peer service.
[0085] After the first device receives the first command, the first device may receive the first frequency and be able to use the first frequency, or it may receive the first frequency but be unable to use the first frequency, or it may be unable to receive the first frequency.
[0086] Based on this, regardless of the above scenario, the first device can trigger a first channel scan to detect the second frequency. The scanning strategy for the first channel scan can be optimized or adjusted based on the service requirements of the P2P service, relating the number of scans and / or the scan interval. Thus, the scan duration of the first channel scan can be less than or equal to the connection duration for the first device and the second device to perform the P2P service. The second frequency can be the same as or different from the first frequency; this application embodiment does not limit this.
[0087] The first channel scan may include single-channel scanning and / or full-channel scanning. The scanning strategy for the first channel scan may be configured with at least one of the following: the number of single-channel scans, the interval between single-channel scans, the interval between single-channel scans and full-channel scans, and the interval between full-channel scans.
[0088] When the first device receives and can use the first frequency, the single-channel scanning setting in the first channel scanning strategy can quickly scan and determine that the second frequency is the first frequency.
[0089] If the first device receives the first frequency but cannot use it, the scanning strategy of the first channel scan can quickly scan and determine the second frequency by setting a full channel scan or a combination of single channel scan and full channel scan.
[0090] If the first device cannot receive the first frequency, the scanning strategy of the first channel scan can quickly scan and determine the second frequency by setting full channel scan, or setting single channel scan and full channel scan.
[0091] In addition to detecting the second frequency, the first device can also verify the correctness of the second frequency using various methods. In some embodiments, the first device can also determine whether a media access control (MAC) address matches. If the MAC address matches, the first device can determine that the second frequency is correct. If the MAC address does not match, the first device can determine that the second frequency is incorrect. Therefore, the first device can continue to trigger the first channel scan, or the first device can block the first command, and after a certain period of time, if the second device does not receive the information sent by the second device, then the second device can continue to send the first command to the first device.
[0092] This allows the system to meet the high connection duration requirements of P2P services, making the implementation of P2P services timely and immediate.
[0093] In this application, the specific implementation of the scanning strategy for the first channel scanning is not limited.
[0094] In some embodiments, the scanning strategy of the first channel scan satisfies at least one of the following:
[0095] The number of scans for a single-channel scan is less than or equal to the first value;
[0096] The interval between single-channel scans is less than or equal to the first duration;
[0097] The interval between single-channel scanning and full-channel scanning is less than or equal to the second duration;
[0098] The interval between full-channel scans is less than or equal to the third duration.
[0099] The first value is used to limit the number of scans in a single-channel scan. The specific value of the first value is not limited in this embodiment. In some embodiments, the first value is set based on the connection success rate between the first device and other devices. The first value can be set to less than or equal to 4. For example, the first value can be 4.
[0100] Furthermore, if the scanning strategy of the first channel scan satisfies at least one of the other three conditions, the number of scans for a single channel scan can also be greater than the first value.
[0101] The first duration is used to define the interval between single-channel scans. This application embodiment does not limit the specific value of the first duration. In some embodiments, the first duration is set according to the capability of the Wi-Fi module in the first device. The first duration can be set to be greater than or equal to 0.1 seconds and less than or equal to 0.5 seconds. For example, the first duration can be 0.1 seconds.
[0102] Furthermore, if the scanning strategy of the first channel scan satisfies at least one of the other three conditions, the interval between single-channel scans is longer than the first duration, such as 0.5s.
[0103] The second duration is used to define the interval between single-channel scanning and full-channel scanning. This application embodiment does not limit the specific value of the second duration. In some embodiments, the second duration is set according to the capability of the Wi-Fi module in the first device. The second duration can be set to be greater than or equal to 0.1 seconds and less than or equal to 0.5 seconds. For example, the second duration can be 0.1 seconds.
[0104] Furthermore, if the scanning strategy of the first channel scan satisfies at least one of the other three conditions, the interval between single-channel scanning and full-channel scanning can also be greater than the second interval.
[0105] The third duration is used to define the interval between full-channel scans, and the specific value of the third duration is not limited in this embodiment. In some embodiments, the third duration is set according to the capability of the Wi-Fi module in the first device. The third duration can be set to be greater than or equal to 0.1 seconds and less than or equal to 1 second. Alternatively, the third duration can be set to be less than or equal to 0.5 seconds. For example, the third duration can be 0.25 seconds or 0.5 seconds.
[0106] The Wi-Fi module is a software module and can be located within the chip assembly of the first device. In some embodiments, the Wi-Fi module can be located in the hardware abstraction layer (HAL) of the operating system of the first device. Alternatively, the Wi-Fi module can be understood as the Wi-Fi module included in the P2P GC in Wi-Fi P2P technology.
[0107] Furthermore, if the scanning strategy of the first channel scan satisfies at least one of the other three conditions, the interval between full channel scans can also be greater than the third interval.
[0108] Furthermore, when the number of scans in a full-channel scan is greater than or equal to the second value, the interval between full-channel scans can remain unchanged, still set to be less than or equal to the third duration, or it can be changed, such as setting the interval between full-channel scans to be less than or equal to the fourth duration. In some embodiments, the fourth duration is longer than the third duration. For example, if the third duration is set to 0.25s, then the fourth duration can be set to 0.5s. Additionally, the embodiments of this application do not limit the magnitude of the second value. Furthermore, depending on the different connection duration requirements of the P2P service or device, the scanning strategy for the first channel scan of each P2P GC can be different, such as the first value, the first duration, the second duration, the third duration, or at least one of the second value and the fourth duration being different.
[0109] In addition, it should be understood that the first value, first duration, second duration, third duration, or second value and fourth duration mentioned above can be adopted as empirical values to meet the software and / or hardware requirements of P2P GC, based on satisfying their respective setting rules.
[0110] S103. The first device establishes a peer-to-peer connection between itself and the second device based on the second frequency. The peer-to-peer connection is used by the first device and the second device to implement peer-to-peer services.
[0111] The first device can establish a P2P connection between itself and the second device based on the second frequency obtained by scanning, enabling P2P services to be implemented between the first device and the second device.
[0112] The process of establishing a P2P connection may include, but is not limited to, auth, assoc, 4-way handshake, etc.
[0113] The communication method provided in this application embodiment involves a second device sending a first command to a first device. This first command triggers the first device to scan and discover the second device. After receiving the first command, the first device may be unable to receive or use the first frequency. Therefore, the first device can trigger a first channel scan. Because the number of scans and / or the scan interval in the first channel scan strategy are optimized or adjusted, the scan duration of the first channel scan is less than or equal to the connection duration for the first device and the second device to achieve peer-to-peer service. In other words, the scan duration of the first channel scan is adaptable to the actual requirements of the connection duration for P2P services, especially those with high connection duration requirements. Therefore, the first device can quickly detect the correct frequency, i.e., the second frequency, while meeting the high connection duration requirements of P2P services. Thus, the first device can establish a P2P connection between the first device and the second device based on the second frequency, enabling the first device and the second device to quickly achieve real-time P2P service.
[0114] It should be understood that the embodiments of this application can be applied to various scanning scenarios of P2P GC connections, including scanning scenarios where P2P GC connections are successful or scanning scenarios where P2P GC connections fail.
[0115] In this context, a successful P2P GC connection scan scenario refers to a scenario where the P2P GC receives and can use the first frequency. A failed P2P GC connection scan scenario refers to a scenario where the P2P GC receives the first frequency but cannot use it, or where the P2P GC cannot receive the first frequency at all.
[0116] In addition, embodiments of this application may use methods such as capturing Wi-Fi air interface data or reading logs to determine whether an electronic device has triggered a first channel scan.
[0117] Based on the above description, the first device can determine the triggering method for the first channel scan according to the scanning scenario of the P2P GC connection.
[0118] In some embodiments, when a first frequency is obtained according to a first command, the first device may use the first frequency to trigger a single-channel scan, and then trigger a full-channel scan. Alternatively, the first device may use the first frequency to trigger a single-channel scan. Alternatively, the first device may directly trigger a full-channel scan.
[0119] If the first frequency is not obtained according to the first command, the first device can use the third frequency to trigger a single-channel scan, and then trigger a full-channel scan. Alternatively, the first device can use the third frequency to trigger a single-channel scan. Or, the first device can directly trigger a full-channel scan. The first device and the second device can pre-negotiate a frequency or a frequency range. The third frequency is the previously negotiated frequency. Alternatively, the third frequency is a default frequency, such as the frequency used to establish a P2P connection between the first and second devices in actual circumstances.
[0120] This allows the first device to quickly determine the correct frequency using single-channel scanning, while avoiding delays caused by single-channel scanning failures and the switching between single-channel and full-channel scanning.
[0121] In summary, the first device can adaptively adjust the number of scans and / or the scan interval.
[0122] Please see Figure 5 , Figure 5 This is a schematic diagram of a scanning strategy for a first channel scanning provided in an embodiment of this application. Figure 5As shown, as one possible implementation, the scanning strategy for the first channel scan specifically includes: the first device can first trigger two single-channel scans, and then trigger a full-channel scan. Specifically, the number of single-channel scans is set to 2, the interval between single-channel scans is set to 0.1s, the interval between full-channel scans is set to 0.25s for the first two full-channel scans (including the second full-channel scan), and the interval between full-channel scans starting from the third full-channel scan is set to 0.5s.
[0123] As another possible implementation, the scanning strategy for the first channel scan specifically includes: the first device can first trigger one or three single-channel scans, and then trigger a full-channel scan.
[0124] The interval between single-channel scans is set to 0.1s or 0.5s.
[0125] In addition, the interval between single-channel scanning and full-channel scanning is set to 0.1s.
[0126] In addition, the first device triggers a full-channel scan process. The interval between full-channel scans is set to 0.25s for the first two full-channel scans, including the second full-channel scan, and 0.5s for the third full-channel scan.
[0127] It is evident that the first device can quickly enter the next single-channel scan and also quickly enter the full-channel scan by reducing at least one of the following: the number of single-channel scans, the interval between single-channel scans, or the interval between single-channel scans and full-channel scans. This reduces the time required for full-channel scans and significantly improves the connection success rate.
[0128] In addition, the first device can quickly enter full-channel scanning by reducing the interval between full-channel scans.
[0129] As another possible implementation, the scanning strategy for the first channel scan specifically includes: the first device can trigger a full channel scan.
[0130] Specifically, the number of scans for a single channel scan is set to 0, the interval between single channel scans is set to 0.1s, the interval between a single channel scan and a full channel scan is set to 0.1s, the third interval is set to 0.25s, the number of scans for a full channel scan is 3, and the interval between full channel scans is set to a fourth interval of 0.5s.
[0131] Alternatively, the number of scans for a single channel scan is set to 0, the interval between single channel scans is set to 0.1s, the interval between a single channel scan and a full channel scan is set to 0.1s, the third interval is set to 0.25s, the number of scans for a full channel scan is 3, and the interval between full channel scans is set to a fourth interval of 0.5s.
[0132] It is evident that by canceling single-channel scanning and reducing the interval between full-channel scans, the first device can quickly enter the first full-channel scan and quickly enter the next full-channel scan, thus shortening the full-channel scan time and significantly optimizing the connection success rate.
[0133] By way of example, embodiments of this application also provide a communication device.
[0134] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application.
[0135] like Figure 6 As shown, the communication device 600 can exist independently or be integrated into other devices. It can communicate with the second device mentioned above to implement the operation corresponding to the first device in any of the above method embodiments.
[0136] The communication device 600 may include a transceiver unit 601 and a processing unit 602. The transceiver unit 601 can implement corresponding communication functions, and the processing unit 602 is used for data processing. The transceiver unit 601 may also be referred to as a communication interface or a communication unit.
[0137] Optionally, the communication device 600 may further include a storage unit, which can be used to store instructions and / or data. The processing unit can read the instructions and / or data in the storage unit so that the communication device 600 can implement the aforementioned method embodiments.
[0138] The communication device 600 can be used to perform the actions performed by the first device in the preceding method embodiments. The communication device 600 can be the first device or a component configurable on the first device. The transceiver unit 601 is used to perform reception-related operations of the first device in the preceding method embodiments, and the processing unit is used to perform processing-related operations of the first device in the preceding method embodiments.
[0139] Optionally, the transceiver unit 601 may include a sending unit and a receiving unit. The sending unit is used to perform the sending operation in the above method embodiments. The receiving unit is used to perform the receiving operation in the above method embodiments.
[0140] It should be noted that the communication device 600 may include a transmitting unit but not a receiving unit. Alternatively, the communication device 600 may include a receiving unit but not a transmitting unit. Specifically, it depends on whether the above-described scheme executed by the communication device 600 includes both transmitting and receiving actions.
[0141] As an example, the communication device 600 is used to perform the aforementioned... Figures 1-5 The actions performed by the first device in the illustrated embodiment.
[0142] The communication device 600 may include a transceiver unit 601 and a processing unit 602.
[0143] The transceiver unit 601 is used to receive a first command sent by the second device, wherein the first command includes the first frequency of the second device.
[0144] The processing unit 602 is configured to respond to the first command, trigger a first channel scan, monitor and obtain the second frequency of the second device, wherein the scanning duration of the first channel scan is less than or equal to the connection duration for the first device and the second device to achieve peer-to-peer service, and the scanning duration of the first channel scan is associated with the optimized number of scans and / or scanning interval in the scanning strategy of the first channel scan.
[0145] The processing unit 602 is also used to establish a peer-to-peer connection between the first device and the second device based on the second frequency. The peer-to-peer connection is used for the first device and the second device to implement peer-to-peer services.
[0146] In some embodiments, the processing unit 602 is specifically configured to, upon obtaining a first frequency according to a first command, use the first frequency to trigger a single-channel scan and then trigger a full-channel scan; or, use the first frequency to trigger a single-channel scan; or, trigger a full-channel scan.
[0147] If the first frequency is not obtained according to the first command, a single-channel scan is triggered using the third frequency, followed by a full-channel scan; or, a single-channel scan is triggered using the third frequency; or, a full-channel scan is triggered.
[0148] In some embodiments, the first channel scan includes: single-channel scanning and / or full-channel scanning; the scanning strategy of the first channel scan satisfies at least one of the following:
[0149] The number of scans for a single-channel scan is less than or equal to the first value;
[0150] The interval between single-channel scans is less than or equal to the first duration;
[0151] The interval between single-channel scanning and full-channel scanning is less than or equal to the second duration;
[0152] The interval between full-channel scans is less than or equal to the third duration.
[0153] In some embodiments, the first value is set based on the connection success rate between the first device and other devices.
[0154] In some embodiments, the first value is less than or equal to 4.
[0155] In some embodiments, the first duration, the second duration, or the third duration is set according to the capabilities of the wireless fidelity module in the first device.
[0156] In some embodiments, the first duration is greater than or equal to 0.1 seconds and less than or equal to 0.5 seconds; and / or,
[0157] The second duration is greater than or equal to 0.1 seconds and less than or equal to 0.5 seconds; and / or,
[0158] The third duration is greater than or equal to 0.1 seconds and less than or equal to 1 second.
[0159] In some embodiments, the processing unit 602 is specifically configured to first trigger two single-channel scans, and then trigger a full-channel scan.
[0160] In some embodiments, the first device is the peer group client (P2P GC) and the second device is the peer group owner (P2P GO).
[0161] It should be understood that the corresponding processes performed by each unit have been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.
[0162] The processing unit in the preceding embodiments can be implemented by at least one processor or processor-related circuitry. The transceiver unit 601 can be implemented by a transceiver or transceiver-related circuitry. The transceiver unit can also be referred to as a communication unit or communication interface. The storage unit can be implemented by at least one memory.
[0163] This application embodiment can divide the communication device into functional modules according to the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0164] By way of example, this application also provides a communication device.
[0165] Please see Figure 7 , Figure 7This is a schematic diagram of the hardware structure of a communication device provided in an embodiment of this application.
[0166] The communication device 700 includes a processor 701 coupled to a memory 702. The memory 702 is used to store computer programs or instructions and / or data. The processor 701 is used to execute the computer programs or instructions and / or data stored in the memory 702, so that the methods in the preceding method embodiments are executed.
[0167] Optionally, the communication device 700 may include one or more processors 701.
[0168] Optionally, such as Figure 7 As shown, the communication device 700 may also include a memory 702.
[0169] Optionally, the communication device 700 may include one or more memory 702.
[0170] Alternatively, the memory 702 may be integrated with the processor 701, or it may be set separately.
[0171] like Figure 7 As shown, the communication device 700 may further include a transceiver 703 for receiving and / or transmitting signals. For example, the processor 701 controls the transceiver 703 to receive and / or transmit signals.
[0172] As one approach, the communication device 700 is used to implement the operations performed by the first device in the aforementioned method embodiments.
[0173] For example, processor 701 is used to implement the processing-related operations performed by the first device in the aforementioned method embodiment, and transceiver 703 is used to implement the transmission-reception-related operations performed by the first device in the aforementioned method embodiment.
[0174] As an alternative, the communication device 700 is used to implement the operations performed by the first device in the method embodiments described above.
[0175] For example, processor 701 is used to implement the processing-related operations performed by the first device in the aforementioned method embodiment, and transceiver 703 is used to implement the transmission-reception-related operations performed by the first device in the aforementioned method embodiment.
[0176] The above Figure 7In the communication device shown, the device in transceiver 703 used for receiving power can be considered a receiving unit, and the device in transceiver 703 used for transmitting can be considered a transmitting unit. That is, transceiver 703 can include a receiver and a transmitter. Transceiver 703 can also be called a transceiver unit, transceiver circuit, etc. Receiver can also be called a receiver, receiving unit, receiver, or receiving circuit, etc. Transmitter can also be called a transmitter, transmitter, transmitting unit, or transmitting circuit, etc. Processor 701 has processing functions and can be called a processing unit. Memory 702 is used to store computer program code and data; memory 702 can also be called a storage unit.
[0177] By way of example, embodiments of this application also provide a communication device.
[0178] Please see Figure 8 , Figure 8 This is a schematic diagram of the hardware structure of a communication device provided in an embodiment of this application.
[0179] like Figure 8 As shown, the communication device 800 can be the first device or a chip of the first device. The communication device 800 can be used to perform the operations performed by the first device in the above method embodiments.
[0180] The communication device 800 includes sections 810, 820, and 830. Section 810 is mainly used for baseband processing and controlling the base station; section 810 is typically the control center of the base station, often referred to as a processor or processing unit, used to control the first device to perform the processing operations of the first device in the above method embodiments. Section 820 is mainly used for storing computer program code and data, and can typically be called a memory or storage unit. Section 830 is mainly used for transmitting and receiving radio frequency signals and converting radio frequency signals to baseband signals; section 830 can typically be called a transceiver unit, transceiver, transceiver circuit, or transceiver. The transceiver unit of section 830, also called a transceiver, includes an antenna 833 and a radio frequency circuit (not shown in the figure), wherein the radio frequency circuit is mainly used for radio frequency processing. Optionally, the device in section 830 used to implement the receiving function can be regarded as a receiver, and the device used to implement the transmitting function can be regarded as a transmitter; that is, section 830 includes a receiver 832 and a transmitter 831. A receiver can also be called a receiving unit, receiver circuit, or receiving circuit, while a transmitter can be called a transmitting unit, transmitting unit, transmitter, or transmitting circuit.
[0181] Sections 810 and 820 may include one or more circuit boards, each of which may include one or more processors and one or more memories. The processors are used to read and execute programs from the memories to implement baseband processing functions and control the base station. If multiple circuit boards exist, they can be interconnected to enhance processing capabilities. As an alternative implementation, multiple circuit boards may share one or more processors, multiple circuit boards may share one or more memories, or multiple circuit boards may simultaneously share one or more processors.
[0182] In one implementation, the transceiver unit of section 830 is used to perform... Figures 1-5 The transmit / receive related processes are performed by the first device in the illustrated embodiment. The processor in part 810 is used to execute... Figures 1-5 The process related to the processing performed by the first device in the illustrated embodiment.
[0183] It should be understood that Figure 8 This is merely an example and not a limitation; the first device described above, including the processor, memory, and transceiver, may be independent of... Figure 8 The structure shown.
[0184] When the communication device 800 is a chip, the chip includes a transceiver, a memory, and a processor. The transceiver can be an input / output circuit or a communication interface; the processor is a processor, microprocessor, or integrated circuit integrated on the chip. In the above method embodiments, the transmitting operation of the first device can be understood as the chip's output, and the receiving operation of the first device in the above method embodiments can be understood as the chip's input.
[0185] By way of example, embodiments of this application also provide a computer-readable storage medium having stored thereon computer instructions for implementing the method executed by the first device in the above method embodiments.
[0186] For example, when the computer program is executed by the computer, it enables the computer to implement the method executed by the first device in the above method embodiments.
[0187] For example, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to implement the method executed by the first device in the above method embodiments.
[0188] By way of example, this application also provides a communication system, which includes a first device and a second device. The first device is used to execute the process performed by the first device in the preceding embodiments. The second device is used to execute the process performed by the second device in the preceding embodiments.
[0189] For example, embodiments of this application also provide a chip device, including a processor, for calling computer programs or computer instructions stored in the memory to cause the processor to execute the methods of the above embodiments.
[0190] In one possible implementation, the input of the chip device corresponds to the above. Figures 1-5 In the embodiment of the receiving operation, the output of the chip device corresponds to the above. Figures 1-5 The sending operation in the illustrated embodiment.
[0191] Optionally, the processor is coupled to the memory via an interface.
[0192] Optionally, the chip device may also include a memory that stores computer programs or computer instructions.
[0193] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of a program that controls the communication methods described in the preceding embodiments. The memory mentioned above can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).
[0194] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the explanations and beneficial effects of the relevant content in any of the communication devices provided above can be referred to the corresponding method embodiments provided above, and will not be repeated here.
[0195] In this embodiment, the first device may include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system layer. The hardware layer may include hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system layer may be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer may include applications such as browsers, address books, word processing software, and instant messaging software.
[0196] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0197] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0198] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0199] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0200] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the part of the technical solution that essentially contributes to the present application's embodiments, or all or part 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 to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the processes of the methods in the various embodiments of the present application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.
[0201] The above embodiments are only used to illustrate the technical solutions of the embodiments of this application, and are not intended to limit them. Although the embodiments of this application have been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A communication method, characterized in that, Applied to a first device, the method includes: Receive a first command sent by a second device, wherein the first command includes a first frequency of the second device; In response to the first command, a first channel scan is triggered, and the second frequency of the second device is detected. The scanning duration of the first channel scan is less than or equal to the connection duration for the first device and the second device to achieve peer-to-peer service. The scanning duration of the first channel scan is related to the number of scans and / or the scanning interval optimized in the scanning strategy of the first channel scan. A peer-to-peer connection is established between the first device and the second device based on the second frequency. The peer-to-peer connection is used for the first device and the second device to implement peer-to-peer services.
2. The method according to claim 1, characterized in that, When the first frequency is obtained according to the first command, triggering a first channel scan includes: triggering a single-channel scan using the first frequency, and then triggering a full-channel scan; or, triggering a single-channel scan using the first frequency; or, triggering a full-channel scan. If the first frequency is not obtained according to the first command, triggering a first channel scan includes: triggering a single-channel scan using a third frequency, and then triggering a full-channel scan; or, triggering a single-channel scan using a third frequency; or, triggering a full-channel scan.
3. The method according to claim 1 or 2, characterized in that, The first channel scan includes: single-channel scanning and / or full-channel scanning; the scanning strategy of the first channel scan satisfies at least one of the following: The number of scans for a single-channel scan is less than or equal to the first value; The interval between single-channel scans is less than or equal to the first duration; The interval between single-channel scanning and full-channel scanning is less than or equal to the second duration; The interval between full-channel scans is less than or equal to the third duration.
4. The method according to claim 3, characterized in that, The first value is set based on the connection success rate between the first device and other devices.
5. The method according to claim 3 or 4, characterized in that, The first value is less than or equal to 4.
6. The method according to claim 3, characterized in that, The first duration, the second duration, or the third duration is set according to the capabilities of the Wi-Fi module in the first device.
7. The method according to claim 3 or 6, characterized in that, The first duration is greater than or equal to 0.1 seconds and less than or equal to 0.5 seconds; and / or, The second duration is greater than or equal to 0.1 seconds and less than or equal to 0.5 seconds; and / or, The third duration is greater than or equal to 0.1 seconds and less than or equal to 1 second.
8. The method according to any one of claims 1-4, characterized in that, Triggering the first channel scan includes: First, trigger two single-channel scans, then trigger a full-channel scan.
9. The method according to any one of claims 1-7, characterized in that, The first device is the peer group client P2PGC, and the second device is the peer group owner P2P GO.
10. A communication device, characterized in that, include: A module for performing the method as described in any one of claims 1-9.
11. A communication system, characterized in that, include: The second device and the first device for performing the method as described in any one of claims 1-9.
12. A communication device, characterized in that, include: At least one processor and an interface circuit, the interface circuit being configured to receive signals from other communication devices besides the communication device and transmit them to the processor, or to send signals from the processor to other communication devices besides the communication device, the processor being configured to implement the method as described in any one of claims 1-9 via logic circuits or execution code instructions.
13. A computer-readable storage medium, characterized in that, It includes a computer program or instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 1-9.
14. A chip, characterized in that, include: An interface circuit and a logic circuit, wherein the interface circuit is used to receive signals from other chips besides the chip and transmit them to the logic circuit, or to send signals from the logic circuit to other chips besides the chip, and the logic circuit is used to implement the method as described in any one of claims 1-9.
15. A computer program product, characterized in that, The computer program product includes: a computer program or instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Method and apparatus for establishing and maintaining peer-to-peer (p2p) communication on unlicensed spectrum
CN102812772A
Zero latency BSS transition with on-channel tunneling (OCT)
CN113055964A