WO2024139374A1 - Communication method - Google Patents

Communication method Download PDF

Info

Publication number
WO2024139374A1
WO2024139374A1 PCT/CN2023/117246 CN2023117246W WO2024139374A1 WO 2024139374 A1 WO2024139374 A1 WO 2024139374A1 CN 2023117246 W CN2023117246 W CN 2023117246W WO 2024139374 A1 WO2024139374 A1 WO 2024139374A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
communication
channel
information
scoring
Prior art date
Application number
PCT/CN2023/117246
Other languages
French (fr)
Chinese (zh)
Inventor
闫生辉
赵辰
丛扬
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024139374A1 publication Critical patent/WO2024139374A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Definitions

  • the present application relates to the field of communication technology, and in particular to a communication method.
  • electronic devices can achieve fast data transmission between devices by establishing WIFI P2P communication.
  • functions such as file sharing, multi-screen collaboration, and screen projection can be realized between devices.
  • the embodiment of the present application provides a communication method to improve the quality of P2P communication.
  • a communication method is provided, which is applied to a communication system, the communication system comprising a first electronic device and a second electronic device, and the method is used to establish a first point-to-point P2P communication between the first electronic device and the second electronic device.
  • the method comprises: the first electronic device sends P2P request information to the second electronic device, the P2P request information comprises first device information, the first device information comprises at least one of the following: a first available channel set, a communication service type of the first P2P communication, and first capability information of the first electronic device.
  • the first available channel set is used to indicate at least one channel, and the at least one channel indicated by the first available channel set can be used for the first electronic device to perform P2P communication.
  • the method includes: the second electronic device receives P2P request information from the first electronic device, the P2P request information includes first device information, and the first device information includes at least one of the following: a first available channel set, a communication service type of the first P2P communication, and first capability information of the first electronic device; wherein the first available channel set is used to indicate at least one channel, and the at least one channel indicated by the first available channel set can be used for the first electronic device to perform P2P communication; the second electronic device determines a P2P communication configuration based on at least the P2P request information; the P2P communication configuration is used to establish the first P2P communication; the second electronic device sends a P2P response information to the first electronic device, and the P2P corresponding information includes the P2P communication configuration.
  • the P2P communication configuration is used to indicate a channel for performing the first P2P communication, and/or a device as a manager GO or a managed GC in the first P2P communication.
  • the second electronic device can determine the channel and/or device setting information for performing the P2P communication by determining the communication configuration, thereby improving the quality of the P2P communication established based on the P2P configuration.
  • the communication service type of the first P2P communication includes: file sharing, screen projection, or multi-screen collaboration.
  • the communication service type of the first P2P communication includes: high-throughput communication priority, or low-latency communication priority.
  • the first electronic device sending the P2P request information to the second electronic device includes: the P2P request information carries a first identifier.
  • the communication service type corresponding to the first P2P communication is different.
  • the first electronic device sending the P2P request information to the second electronic device includes: the P2P request information carries a second identifier.
  • the second identifier is different, it corresponds to the difference in the first capability information.
  • an evaluation example of device information For example, whether the device supports DBDC, so that a P2P connection that is more in line with the current P2P communication can be established based on the established STA communication. Another example is whether the device supports CSA, so that when the STA communication channel is switched, the device can implement the follow-up switching of P2P communication based on the CSA capability.
  • the P2P configuration information includes a first available channel set and a communication service type of the first P2P communication.
  • the P2P communication configuration includes a channel used for the first P2P communication.
  • the method further includes: the second electronic device determines second device information, the second device information includes a second available channel set of the second electronic device, and the second electronic device determines the P2P communication configuration according to the P2P request information, including: the second electronic device determines the channel used for the first P2P communication according to the first available channel set, the second available channel set, and the communication service type of the first P2P communication.
  • a corresponding channel is selected to establish a P2P connection, so that the communication channel can be better matched to the current P2P communication, thereby providing a better throughput rate and/or delay.
  • the second electronic device determines the device as a GO or a GC in the first P2P communication according to the first capability information and the second capability information, including: when the first capability information indicates that the first electronic device supports DBDC and the second capability information indicates that the second electronic device does not support DBDC, the second electronic device determines the first electronic device as a GO device for the first P2P communication.
  • the second electronic device determines the second electronic device as a GO device for the first P2P communication.
  • the first capability information indicates that the first electronic device does not support DBDC
  • the second capability information indicates that the second electronic device supports DBDC
  • the second electronic device determines the second electronic device as a GO device for the first P2P communication.
  • the first capability information indicates that the first electronic device does not support DBDC, but the first electronic device supports GO CSA.
  • connection information of the first communication connection indicates that the first communication connection is established on a first STA channel of 5G or 6G WIFI.
  • the second electronic device determines the P2P communication configuration according to the P2P request information, including: the second electronic device determines that the channel for performing the first P2P communication is the first STA channel.
  • the established STA channel can also be referenced. It can be understood that when the P2P communication channel is set to follow the STA channel, the same frequency and channel operation of P2P communication and STA communication can be achieved. This reduces the switching overhead of the transmitting device, and at the same time, even if the device does not support DBDC, STA communication and P2P communication can be performed simultaneously.
  • a scoring rule is preset in the second electronic device, and the scoring rule includes M preconfigured items.
  • the second electronic device scores the first electronic device according to the first device information and the scoring rule, and obtains the scoring result corresponding to the first electronic device.
  • the second electronic device scores the second electronic device according to the second device information, and obtains the scoring result corresponding to the second electronic device.
  • the second device information includes at least one of the following: a second available channel set, and second capability information of the second electronic device. Among them, the second available channel set is used to indicate at least one channel, and the at least one channel indicated by the second available channel set can be used for the second electronic device to perform P2P communication.
  • the second electronic device determines the P2P communication configuration according to the scoring result corresponding to the first electronic device and the scoring result corresponding to the second electronic device.
  • the second electronic device can score the first electronic device and the second electronic device respectively. According to the scoring results, the first electronic device and the second electronic device can be accurately determined. Efficient determination of P2P configuration is now possible.
  • the second electronic device scores the first electronic device.
  • the preset scoring rules only need to be deployed in the second electronic device. At the same time, it can avoid the situation where the scoring rules in the first electronic device are inconsistent with the scoring rules of the second electronic device, resulting in low score confidence caused by the scoring of the two-end devices.
  • the first electronic device can also score itself in the first electronic device based on the same scoring rules as the second electronic device. As a result, the first electronic device can directly send the scoring results of the first electronic device to the second electronic device. The second electronic device only needs to score the second electronic device.
  • the second electronic device scores the first electronic device according to the first device information and the scoring rule to obtain a scoring result corresponding to the first electronic device, including: for each channel in the first intersection, the second electronic device scores the first electronic device according to the scoring rule and the first device information to obtain M scoring results corresponding to each pre-configuration item in the M pre-configuration items. Based on the M scoring results, determine the first scoring result corresponding to the channel.
  • the scoring result corresponding to the first electronic device includes N first scoring results corresponding to N channels.
  • the first electronic device When the first electronic device supports GO CSA, the first electronic device is used as the GO device of the P2P communication connection. When the first electronic device supports GC CSA, the first electronic device or the second electronic device is used as the GO device of the P2P communication connection.
  • FIG13 is a schematic diagram of selecting a GO device according to device capabilities provided in an embodiment of the present application.
  • Electronic devices can be interconnected with other devices based on wireless communication protocols.
  • the device 21 and the router can establish STA communication based on 2.4G or 5G.
  • the first electronic device and the second electronic device may share files via P2P communication.
  • one of the two devices can be a manager (group owner, GO), and the other corresponding device can be a managed (group client, GC).
  • GO can be used to manage the current P2P communication. For example, GO can determine the channel used for P2P communication and notify GC to use the channel to establish P2P communication with GO. For another example, GO can also notify GC to perform the corresponding channel switching operation when channel switching is required.
  • the device that initiates the multi-screen collaboration operation can serve as a GO, and the corresponding device 41 can serve as a GC in the P2P communication.
  • device 31 as a GO, can have the function of determining the channel used for P2P communication.
  • device 31 can set the P2P communication channel to the STA communication channel.
  • device 31 can set the communication channel with device 32 to the channel in the 2.4G frequency band in which STA communication is ongoing.
  • the STA communication between device 31 and the router and the P2P communication process with device 32 can be implemented through data transmission of one channel.
  • the router can filter the data corresponding to STA communication from the data in the channel
  • device 32 can filter the data corresponding to P2P communication from the data in the channel. In this way, the data transmission overhead of device 31 can be saved.
  • device 42 before device 42 initiates multi-screen collaborative communication to device 41, device 42 as GO can establish STA communication with the router through channel A (such as channel 36). Then, combined with the description in FIG. 6, assume The device 42 may determine the channel A as the channel for P2P communication based on the following strategy for communicating with the STA. That is, the device 42 may instruct the device 41 to establish P2P communication based on the channel A.
  • the channel used for STA communication may change. For example, after establishing P2P communication based on channel A, the STA communication channel between device 42 and the router may be switched from channel A to channel B (eg, channel 48).
  • channel B eg, channel 48
  • CSA Channel Switch Announcement
  • CSA includes GO CSA and GC CSA.
  • the current P2P communication channel can be switched accordingly to follow the STA channel based on the GO CSA to ensure that the STA communication and P2P communication work on the same frequency and channel, thereby ensuring the latency of P2P communication.
  • the embodiments of the present application provide a communication method, which can flexibly determine the roles (such as GO and GC) in P2P communication according to the capabilities of the devices and the current communication needs before establishing P2P communication between devices.
  • the channel that is more conducive to the current communication can also be optimized.
  • the P2P communication established between devices can be more convenient for the corresponding business.
  • the technical solution provided in the embodiment of the present application can be applied to a P2P communication system between electronic devices.
  • the electronic devices participating in the P2P communication may be two or more.
  • the specific implementation can refer to the solution implementation of establishing P2P communication between two electronic devices.
  • the communication system includes two electronic devices, such as a first electronic device and a second electronic device.
  • the first electronic device and/or the second electronic device may include at least one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, or a smart city device.
  • PDA personal digital assistant
  • AR augmented reality
  • VR virtual reality
  • AI artificial intelligence
  • the embodiments of the present application do not impose any special restrictions on the specific types of the first electronic device and the second electronic device.
  • the present application provides a specific hardware composition of an electronic device.
  • the electronic device can correspond to On the first electronic device and/or the second electronic device.
  • the sensor module may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
  • the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device.
  • the electronic device may include more or fewer components than the above examples, or combine certain components, or split certain components, or arrange the components differently.
  • the components involved in the above composition diagram may be implemented in hardware, software, or a combination of software and hardware.
  • the first electronic device and the second electronic device can achieve one or more functions of file sharing, multi-screen collaboration and screen projection by establishing WIFI P2P communication.
  • the first device may exchange information with the second device to determine a P2P communication configuration, wherein the P2P communication configuration may include at least one of the following: a GO and a GC in P2P communication, and a channel used in P2P communication.
  • the first device is an initiating device of P2P communication.
  • the information interaction for determining the P2P communication configuration may include:
  • a first device may send P2P request information to a second device.
  • the P2P request information may include at least one of the following: available channel information of the first device, the type of P2P communication to be initiated by the first device, capability information of the first device, etc.
  • the available channel information of the device may be used to indicate a channel that the current device can use for P2P communication.
  • the device when the device supports no more than two WIFI communications at the same time, if the first device has established one STA communication and one P2P communication, it cannot support more P2P communications. Then, the available channel of the first device is empty.
  • the available channel information may include the channel number of each available channel.
  • the channel numbers of the available channels are all available channel numbers for 2.4G WIFI communication.
  • the channel numbers of the available channels may include the available channel numbers for 2.4G WIFI communication and the available channel numbers for 5G WIFI communication.
  • the available channel information of the device may include all available channel numbers in 2.4G WIFI, 5G WIFI and 6G WIFI.
  • the first device when the first device has established STA communication with the routing device, the first device can mark the channel used for STA communication so that the second device can know that the first device has currently established STA communication and the channel used for the STA communication.
  • the types of devices that are going to initiate P2P communication may include various types.
  • the P2P request information when the P2P request information includes the type of P2P communication that the first device is going to initiate, the P2P request may carry a first identifier indicating the type of P2P communication.
  • the first identifier is identifier 1, which is used to indicate that P2P communication for file sharing is going to be initiated.
  • the first identifier is identifier 2, which is used to indicate that P2P communication for screen projection is going to be initiated.
  • the first identifier is identifier 3, which is used to indicate that P2P communication for multi-screen collaboration is going to be initiated.
  • the type of P2P communication may also be different from the above classification. It is understandable that the throughput requirement of file sharing P2P communication takes precedence over the latency requirement during communication. In P2P communication processes such as screen projection and multi-screen collaboration, the amount of data to be transmitted is generally not large, but the latency requirement is higher. Therefore, in this example, the type of P2P communication may also include high-throughput communication priority and low-latency communication priority.
  • the P2P request may carry a first identifier indicating the type of P2P communication.
  • the first identifier is identifier 3, indicating that high-throughput communication is to be initiated first.
  • the first identifier is identifier 4, indicating that low-latency communication is to be initiated first.
  • the device capability information may be used to indicate the communication capabilities that the current device can support, such as whether the device supports DBDC, whether the device supports CSA, etc.
  • the P2P request information may carry a second identifier in a preset identifier position to indicate whether the first device supports the above-mentioned communication capability.
  • the second identifier is the first value
  • it indicates that the first device supports DBDC.
  • the second identifier is the second value
  • it indicates that the first device supports GO CSA.
  • the second identifier is the third value
  • it indicates that the first device supports both DBDC and GO CSA.
  • the second identifier is the fourth value, it indicates that the first device supports GC CSA.
  • the P2P request information may include the available channel information of the first device, and/or the type of P2P communication to be initiated by the first device, and/or the capability information of the first device.
  • the first device may also transmit this information to the second device in other forms.
  • the first device may score one or more pre-configured items corresponding to this information, and carry the scoring result in the P2P request information to the second device. This scheme will be illustrated later and will not be repeated here.
  • the second device generates P2P response information according to the P2P request information and sends it to the first device.
  • the second device can comprehensively determine the P2P communication configuration based on the various parameters included in the P2P request information and the parameters of the second device itself.
  • the second device can carry the P2P communication configuration in the P2P response information and send it to the first device.
  • the P2P communication configuration can include the GO and GC in the P2P communication, and/or the channel used in the P2P communication.
  • the second device may select a channel corresponding to the current communication based on the available channel information of the first device in the P2P request information, the type of P2P communication to be initiated, and the available channels of the second device.
  • the second device may carry the determined P2P communication configuration in the P2P response information and send it to the first device, so that the first device can establish P2P communication with the second device according to the P2P communication configuration carried in the P2P response information.
  • the first device and the second device can understand the relevant information of the opposite device before establishing P2P communication, and determine more P2P communication configurations for each other.
  • the P2P communication configuration may correspond to the first device and the second device.
  • a device with stronger capabilities can be configured as a GO.
  • this solution can better utilize the device capabilities and improve the quality of P2P communication.
  • the P2P communication configuration may also reflect the characteristics of the current P2P communication (such as higher requirements for throughput, higher latency, etc.), and the P2P communication established accordingly may also be more in line with the P2P communication scenario's demands for data transmission.
  • a first device determines first available channel information of the first device and a P2P communication service type.
  • the first available channel information when the first device supports 2.4G WIFI communication, the first available channel information may include a set of 2.4G channels currently available for P2P communication.
  • the first available channel information when the first device also supports 5G WIFI communication, the first available channel information may include a set of 2.4G channels and 5G channels currently available for P2P communication.
  • S902 The first device sends P2P request information to the second device.
  • the first device may carry the first available channel information and the P2P communication service type in the P2P request information and send the information to the second device.
  • the second available channel information may include a set of 4G WIFI available channels of the second device.
  • the second available channel information may include a set of 5G WIFI available channels of the second device.
  • the second available channel information may include a set of 2.4G WIFI available channels of the second device, and a set of 5G WIFI available channels of the second device.
  • the second device determines that the first identifier in the P2P request is set to identifier 3 or identifier 2, it means that the P2P communication has a high requirement for the delay during the communication process. Therefore, the second device can select a channel that can provide a lower delay from the channels included in the intersection of the first available channel information and the second available channel information.
  • a channel can be randomly selected from the multiple channels as the P2P communication channel.
  • the second device can determine the channel for P2P communication based on the working conditions of the first device and the second device and the related information of the P2P communication to be initiated.
  • the channel determined for P2P communication can be the first channel.
  • the second device sends P2P response information to the first device.
  • the second device may carry the channel information determined as the P2P communication channel in the P2P response information and send it to the first device.
  • the second device may carry the channel number of the first channel in the P2P response information and send it to the first device.
  • the first device can cooperate with the second device according to the P2P response information to establish P2P communication with the second device on the first channel.
  • the channels that the first device can use for P2P communication include channels in the 2.4G frequency band and channels in the 5G frequency band
  • the channels that the second device can use for P2P communication include channels in the 2.4G frequency band and channels in the 5G frequency band.
  • the second device when it needs to initiate P2P communication for screen projection, it can select a suitable channel from the intersection of the available channel set of the first device and the available channel set of the second device to establish a P2P communication connection.
  • FIG. 12 is a schematic diagram of a device interaction process of another communication method provided in an embodiment of the present application.
  • the first device is still taken as an initiating device.
  • the P2P request information may include the first capability information of the first device, and the P2P communication configuration includes the selection of the GO and GC corresponding devices in the P2P communication.
  • the scheme may include:
  • the capabilities of the first device and the second device may be the same or similar.
  • non-DFS channels are preferred. It is a P2P communication channel.
  • the preconfiguration items applicable to the above different scenarios are not limited to the ones in the above examples.
  • the preconfiguration items used in each scenario can be configured with different weights to enhance the importance of the key preconfiguration items in the corresponding scenario (such as the preconfiguration items corresponding to each scenario in the above examples) in the final channel/GO selection.
  • the first device and the second device can score each of the channels that can be used for P2P communication according to the pre-configured items, thereby obtaining the scoring results corresponding to each channel on each device.
  • the pre-configured items include both the judgment conditions for the current channel (such as whether it is a 4G/5G/6G WIFI channel, etc.) and the judgment conditions for the current device (such as whether the device supports DBDC, etc.)
  • the scoring results based on the channel granularity can reflect the comprehensive capabilities of the channel and the device at the same time.
  • the first device may score each of channels 1 to n according to preset configuration items.
  • the preset configuration items include whether the channel is a 4G/5G/6G WIFI channel, the current STA, P2P0 and/or P2P1 connection status and channel, and whether the device supports DBDC.
  • channel 1 Take channel 1 as an example.
  • the score for this item is 20 points.
  • the score for this item is 10 points.
  • the score for this item is 5 points.
  • Other channels are similar. It can be seen that in the example in Table 1, 6G with the maximum communication rate has the highest score, 5G has a lower score than 6G, and 4G has the lowest score. In this way, channels with higher communication protocols can be selected for P2P communication, thereby obtaining a better communication experience.
  • the first device can score each channel in the current pre-configuration items (such as the current STA, P2P0 and/or P2P1 connection status, whether the device supports DBDC) based on the example in Table 2.
  • each preconfiguration item may also be provided with a corresponding weight, which is used to adjust the proportion of each preconfiguration item in the overall score in different scenarios.
  • the weight of the preconfiguration item "the channel is a 4G/5G/6G WIFI channel” may be set to 31.
  • the final scoring result of the preconfiguration item may be obtained by multiplying the score shown in Table 1 by the weight (31).
  • the weight of the preconfiguration item "the current connection status of STA, P2P0 and/or P2P1, whether the device supports DBDC” may be set to 8. Then, the final scoring result of the preconfiguration item may be obtained by multiplying the score shown in Table 2 by the weight (8).
  • the second device can determine the channel for initiating P2P communication and the device serving as the GO according to the scoring results of each device on each channel.
  • the second device can add score a1 to score b1 to obtain the score of the two-end device of channel 1: score c1.
  • the second device can add score a2 to score b2 to obtain the score of the two-end device of channel 2: score c2.
  • the second device can add score an to score bn to obtain the score of the two-end device of channel n: score cn.
  • the second device can compare score c1-score cn to determine the item with the largest score of the two-end device, thereby determining the channel for P2P communication. For example, among score c1-score cn, score c2 is the maximum value. Then, channel 2 corresponding to score c2 can be determined as the channel for P2P communication.
  • the first device does not need to perform scoring, so the first device does not need to set the scoring mechanism shown in Figure 1 or Table 2.
  • the implementation of scoring by the second device can also avoid the problem of low scoring confidence and inability to compare with each other due to different scoring mechanisms (and/or pre-configured items) in each device.
  • FIG. 17 is a flow chart of another device-to-device interaction method provided in an embodiment of the present application.
  • the scoring mechanism described in the above-mentioned FIG. 15-FIG. 16 can be implemented.
  • the P2P communication channel corresponding to the P2P communication to be initiated and the device serving as the GO are determined.
  • the first device is taken as the initiating device as an example.
  • the second device may be used to score each device (such as the first device and the second device).
  • the scoring operation may be performed on a channel-by-channel basis on each device based on pre-configured items set in the second device and a preset scoring mechanism.
  • the preset scoring mechanism may indicate the score size and/or weight size of the current device and channel corresponding to different pre-configured items.
  • the solution may include:
  • the first capability information can be used to indicate whether the first device supports DBDC, and/or whether it supports GO CSA, and/or whether it supports GC CSA.
  • the second device obtains a second scoring result corresponding to the second device according to the second capability information of the second device.
  • the first scoring result may include: a scoring result obtained by scoring each channel in the available P2P channel combination according to the first capability information and according to a preset scoring mechanism and pre-configured items.
  • the second scoring result may include: a result obtained by scoring the channels in each available P2P channel combination according to the second capability information and according to a preset scoring mechanism and pre-configured items.
  • the second device determines a P2P communication configuration according to the first scoring result and the second scoring result.
  • the second device can determine the scores of the two-end devices corresponding to each channel according to the scores of each device on each channel. According to the scores of the two-end devices, the channel with the largest score is determined as the channel for P2P communication. Based on the P2P communication channel, the device with a higher score can be used as the GO device.
  • the second device sends P2P response information to the first device.
  • the P2P communication configuration can be quickly and accurately determined. It can be understood that in the scoring mechanism, the objects to be processed by the second device are all size judgments based on numbers, which is simpler than the logical judgment process in the above description and has less computational overhead for the second device.
  • the pre-configuration items and scoring mechanisms involved may be preset in the second device, so that the technical solution shown in Figure 17 can be executed before the P2P communication needs to be established.
  • the pre-configuration items may also be issued by a cloud server that is simultaneously connected to the second device.
  • the scoring operation for the first device may also be performed in the first device.
  • the same pre-configuration items and scoring mechanism may be preset in the first device and the second device, so that the first device can perform a scoring operation according to the first capability information to obtain a first scoring result, and carry the first scoring result in the P2P request information to send to the second device for subsequent processing.
  • the preconfiguration items may include M items. Before each establishment of P2P communication, according to the type of P2P communication service to be established and the network environment in which the current device is located, the first device and the second device may negotiate to select at least part of the M preconfiguration items as the preconfiguration items for this scoring.
  • the scores and/or weights corresponding to the preconfiguration items may also be flexibly adjusted by the device according to actual conditions. The embodiments of the present application are not limited to this.
  • the electronic device can also optimize and adjust the P2P communication according to the changes in the device capabilities and the surrounding communication environment.
  • the above mainly introduces the solution provided by the embodiment of the present application from the perspective of electronic equipment.
  • it includes hardware structures and/or software modules corresponding to the execution of each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
  • the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that a computer can access or may include one or more servers, data centers and other data storage devices that can be integrated with the medium.
  • the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Embodiments of the present application relate to the technical field of communications. Disclosed is a communication method, for enabling devices to rationally select, according to information such as the capability of each device and P2P communication service types before establishing a P2P connection, a channel and a device serving as GO, thereby improving the quality of P2P communication. The specific solution is as follows: a first electronic device sends P2P request information to a second electronic device, the P2P request information comprising at least one of the following: a first available channel set, a communication service type of first P2P communication, and first capability information of the first electronic device; the second electronic device receives the P2P request information; the second electronic device determines a P2P communication configuration according to the P2P request information, the P2P communication configuration being used for establishing the first P2P communication; and the second electronic device sends P2P response information to the first electronic device, the P2P response information comprising the P2P communication configuration.

Description

一种通信方法A communication method
本申请要求于2022年12月30日提交国家知识产权局、申请号为202211736057.9、发明名称为“一种通信方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on December 30, 2022, with application number 202211736057.9 and invention name “A Communication Method”, all contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及通信技术领域,尤其涉及一种通信方法。The present application relates to the field of communication technology, and in particular to a communication method.
背景技术Background technique
目前,电子设备之间可以通过建立WIFI P2P通信,实现设备间的快速数据传输。比如,基于该WIFI P2P通信,可以实现设备之间的文件分享、多屏协同、投屏等功能。At present, electronic devices can achieve fast data transmission between devices by establishing WIFI P2P communication. For example, based on this WIFI P2P communication, functions such as file sharing, multi-screen collaboration, and screen projection can be realized between devices.
合理地建立WIFI P2P通信连接,则是保证WIFI P2P通信质量的关键。Properly establishing WIFI P2P communication connection is the key to ensuring the quality of WIFI P2P communication.
发明内容Summary of the invention
本申请实施例提供一种通信方法,以提升P2P通信的质量。The embodiment of the present application provides a communication method to improve the quality of P2P communication.
为了达到上述目的,本申请实施例采用如下技术方案:In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
第一方面,提供一种通信方法,该方法应用于通信系统,该通信系统包括第一电子设备和第二电子设备,该方法用于在该第一电子设备和该第二电子设备之间建立第一点对点P2P通信。该方法包括:该第一电子设备向该第二电子设备发送P2P请求信息,该P2P请求信息包括第一设备信息,该第一设备信息包括以下中的至少一项:第一可用信道集合,该第一P2P通信的通信业务类型,该第一电子设备的第一能力信息。其中,该第一可用信道集合用于指示至少一个信道,该第一可用信道集合指示的该至少一个信道能够用于该第一电子设备进行P2P通信。该第二电子设备接收该P2P请求信息。该第二电子设备根据该P2P请求信息,确定P2P通信配置。该P2P通信配置用于建立该第一P2P通信。该第二电子设备向该第一电子设备发送P2P响应信息,该P2P相应信息包括该P2P通信配置。In a first aspect, a communication method is provided, which is applied to a communication system, the communication system comprising a first electronic device and a second electronic device, and the method is used to establish a first point-to-point P2P communication between the first electronic device and the second electronic device. The method comprises: the first electronic device sends P2P request information to the second electronic device, the P2P request information comprises first device information, the first device information comprises at least one of the following: a first available channel set, a communication service type of the first P2P communication, and first capability information of the first electronic device. The first available channel set is used to indicate at least one channel, and the at least one channel indicated by the first available channel set can be used for the first electronic device to perform P2P communication. The second electronic device receives the P2P request information. The second electronic device determines a P2P communication configuration according to the P2P request information. The P2P communication configuration is used to establish the first P2P communication. The second electronic device sends a P2P response information to the first electronic device, and the P2P response information comprises the P2P communication configuration.
从第二电子设备的角度,该方法包括:该第二电子设备接收来自该第一电子设备的P2P请求信息,该P2P请求信息包括第一设备信息,该第一设备信息包括以下中的至少一项:第一可用信道集合,该第一P2P通信的通信业务类型,该第一电子设备的第一能力信息;其中,该第一可用信道集合用于指示至少一个信道,该第一可用信道集合指示的该至少一个信道能够用于该第一电子设备进行P2P通信;该第二电子设备至少根据该P2P请求信息,确定P2P通信配置;该P2P通信配置用于建立该第一P2P通信;该第二电子设备向该第一电子设备发送P2P响应信息,该P2P相应信息包括该P2P通信配置。From the perspective of the second electronic device, the method includes: the second electronic device receives P2P request information from the first electronic device, the P2P request information includes first device information, and the first device information includes at least one of the following: a first available channel set, a communication service type of the first P2P communication, and first capability information of the first electronic device; wherein the first available channel set is used to indicate at least one channel, and the at least one channel indicated by the first available channel set can be used for the first electronic device to perform P2P communication; the second electronic device determines a P2P communication configuration based on at least the P2P request information; the P2P communication configuration is used to establish the first P2P communication; the second electronic device sends a P2P response information to the first electronic device, and the P2P corresponding information includes the P2P communication configuration.
该示例中,第一电子设备以及第二电子设备可以在建立P2P通信之前,获取对端设备的设备信息。比如,以第一电子设备为发起端设备为例。第一电子设备可以在接收到用户输入的发起P2P通信的操作后,执行该示例中的方案。即将第一设备信息发送给第二电子设备,以便于第二电子设备根据第一设备信息以及第二设备信息,合理判断选取作为GO的设备以及进行P2P通信的信道。 In this example, the first electronic device and the second electronic device can obtain the device information of the opposite device before establishing P2P communication. For example, take the first electronic device as the initiating device. The first electronic device can execute the scheme in this example after receiving the operation of initiating P2P communication input by the user. That is, the first device information is sent to the second electronic device, so that the second electronic device can reasonably judge the device selected as the GO and the channel for P2P communication based on the first device information and the second device information.
可选的,该P2P通信配置用于指示用于进行该第一P2P通信的信道,和/或作为在该第一P2P通信中作为管理者GO或者被管理者GC的设备。由此,第二电子设备通过确定该通信配置,能够确定进行P2P通信的信道和/或设备设置信息。进而提升基于该P2P配置建立的P2P通信的质量。Optionally, the P2P communication configuration is used to indicate a channel for performing the first P2P communication, and/or a device as a manager GO or a managed GC in the first P2P communication. Thus, the second electronic device can determine the channel and/or device setting information for performing the P2P communication by determining the communication configuration, thereby improving the quality of the P2P communication established based on the P2P configuration.
可选的,该第一P2P通信的通信业务类型包括:文件分享,投屏,或多屏协同。Optionally, the communication service type of the first P2P communication includes: file sharing, screen projection, or multi-screen collaboration.
可选的,该第一P2P通信的通信业务类型包括:高吞吐率通信优先,或低时延通信优先。Optionally, the communication service type of the first P2P communication includes: high-throughput communication priority, or low-latency communication priority.
这样,提供了两种不同维度的通信业务类型的划分示例。在具体实现中,可以选取上述示例中的任一种,或者结合上述两种示例进行P2P通信的划分。In this way, two examples of dividing communication service types in different dimensions are provided. In a specific implementation, any one of the above examples can be selected, or the above two examples can be combined to divide P2P communication.
可选的,该第一电子设备向该第二电子设备发送P2P请求信息,包括:该P2P请求信息中携带有第一标识。该第一标识的值不同时,对应于该第一P2P通信的通信业务类型不同。Optionally, the first electronic device sending the P2P request information to the second electronic device includes: the P2P request information carries a first identifier. When the value of the first identifier is different, the communication service type corresponding to the first P2P communication is different.
可选的,该第一电子设备的第一能力信息包括以下中的至少一项:该第一电子设备是否支持双频双发DBDC,该第一电子设备是否支持GO信道切换宣告GO CSA,该第一电子设备是否支持GC CSA。Optionally, the first capability information of the first electronic device includes at least one of the following: whether the first electronic device supports dual-band dual-transmit DBDC, whether the first electronic device supports GO channel switching declaration GO CSA, and whether the first electronic device supports GC CSA.
可选的,该第一电子设备向该第二电子设备发送P2P请求信息,包括:该P2P请求信息中携带有第二标识。该第二标识不同时,对应于该第一能力信息的不同。Optionally, the first electronic device sending the P2P request information to the second electronic device includes: the P2P request information carries a second identifier. When the second identifier is different, it corresponds to the difference in the first capability information.
基于此,提供了设备信息的评价示例。如设备是否支持DBDC,以便于在已经建立的STA通信基础上建立更符合当前P2P通信的P2P连接。又如设备是否支持CSA,以便于在STA通信信道切换时,设备可以基于CSA能力实现P2P通信的跟随切换。Based on this, an evaluation example of device information is provided. For example, whether the device supports DBDC, so that a P2P connection that is more in line with the current P2P communication can be established based on the established STA communication. Another example is whether the device supports CSA, so that when the STA communication channel is switched, the device can implement the follow-up switching of P2P communication based on the CSA capability.
可选的,该P2P配置信息包括第一可用信道集合,该第一P2P通信的通信业务类型。该P2P通信配置包括用于进行该第一P2P通信的信道。在该第二电子设备根据该P2P请求信息,确定P2P通信配置之前,该方法还包括:该第二电子设备确定第二设备信息,该第二设备信息包括第二电子设备的第二可用信道集合,该第二电子设备根据该P2P请求信息,确定P2P通信配置,包括:该第二电子设备根据该第一可用信道集合,该第二可用信道集合,以及该第一P2P通信的通信业务类型,确定用于进行该第一P2P通信的信道。Optionally, the P2P configuration information includes a first available channel set and a communication service type of the first P2P communication. The P2P communication configuration includes a channel used for the first P2P communication. Before the second electronic device determines the P2P communication configuration according to the P2P request information, the method further includes: the second electronic device determines second device information, the second device information includes a second available channel set of the second electronic device, and the second electronic device determines the P2P communication configuration according to the P2P request information, including: the second electronic device determines the channel used for the first P2P communication according to the first available channel set, the second available channel set, and the communication service type of the first P2P communication.
可选的,该第二电子设备根据该第一可用信道集合,该第二可用信道集合,以及该第一P2P通信的通信业务类型,确定用于进行该第一P2P通信的信道,包括:该第二电子设备确定该第一可用信道集合与该第二可用信道集合的第一交集,该第一交集中包括至少一个信道。该第二电子设备根据该第一P2P通信的通信业务类型,在该第一交集中选取用于进行该第一P2P通信的信道。Optionally, the second electronic device determines the channel for performing the first P2P communication according to the first available channel set, the second available channel set, and the communication service type of the first P2P communication, including: the second electronic device determines a first intersection of the first available channel set and the second available channel set, the first intersection including at least one channel. The second electronic device selects a channel for performing the first P2P communication from the first intersection according to the communication service type of the first P2P communication.
这样,基于将要发起的P2P通信的类型,选取对应的信道建立P2P连接。能够使得通信信道可以更好的匹配到当前的P2P通信,从而提供较好的吞吐率和/或时延。In this way, based on the type of P2P communication to be initiated, a corresponding channel is selected to establish a P2P connection, so that the communication channel can be better matched to the current P2P communication, thereby providing a better throughput rate and/or delay.
可选的,该P2P配置信息包括该第一电子设备的第一能力信息。该P2P通信配置包作为在该第一P2P通信中作为管理者GO或者被管理者GC的设备。在该第二电子设备根据该P2P请求信息,确定P2P通信配置之前,该方法还包括:该第二电子设备确定第二设备信息,该第二设备信息包括该第二电子设备的第二能力信息。该第二电子设备根据该P2P请求信息,确定P2P通信配置,包括:该第二电子设备根据该第一能力信息,以 及该第二能力信息,确定在该第一P2P通信中作为GO的设备或者作为GC的设备。Optionally, the P2P configuration information includes the first capability information of the first electronic device. The P2P communication configuration package is used as a device that acts as a manager GO or a managed GC in the first P2P communication. Before the second electronic device determines the P2P communication configuration according to the P2P request information, the method further includes: the second electronic device determines the second device information, and the second device information includes the second capability information of the second electronic device. The second electronic device determines the P2P communication configuration according to the P2P request information, including: the second electronic device determines the P2P communication configuration according to the first capability information, and the second capability information, determining a device serving as a GO or a device serving as a GC in the first P2P communication.
可选的,该第二电子设备根据该第一能力信息,以及该第二能力信息,确定在该第一P2P通信中作为GO的设备或者作为GC的设备,包括:在该第一能力信息指示该第一电子设备支持DBDC,该第二能力信息指示该第二电子设备不支持DBDC的情况下,该第二电子设备确定该第一电子设备作为该第一P2P通信的GO设备。在该第一能力信息指示该第一电子设备不支持DBDC,该第二能力信息指示该第二电子设备支持DBDC的情况下,该第二电子设备确定该第二电子设备作为该第一P2P通信的GO设备。在该第一能力信息指示该第一电子设备不支持DBDC,但该第一电子设备支持GO CSA。该第二能力信息指示该第二电子设备不支持DBDC,且该第二电子设备不支持GO CSA的情况下,该第二电子设备确定该第一电子设备作为该第一P2P通信的GO设备。在该第一能力信息指示该第一电子设备不支持DBDC,且该第一电子设备不支持GO CSA。该第二能力信息指示该第二电子设备不支持DBDC,但该第二电子设备支持GO CSA的情况下,该第二电子设备确定该第二电子设备作为该第一P2P通信的GO设备。Optionally, the second electronic device determines the device as a GO or a GC in the first P2P communication according to the first capability information and the second capability information, including: when the first capability information indicates that the first electronic device supports DBDC and the second capability information indicates that the second electronic device does not support DBDC, the second electronic device determines the first electronic device as a GO device for the first P2P communication. When the first capability information indicates that the first electronic device does not support DBDC and the second capability information indicates that the second electronic device supports DBDC, the second electronic device determines the second electronic device as a GO device for the first P2P communication. When the first capability information indicates that the first electronic device does not support DBDC, but the first electronic device supports GO CSA. When the second capability information indicates that the second electronic device does not support DBDC and the second electronic device does not support GO CSA, the second electronic device determines the first electronic device as a GO device for the first P2P communication. When the first capability information indicates that the first electronic device does not support DBDC and the first electronic device does not support GO CSA. The second capability information indicates that the second electronic device does not support DBDC, but when the second electronic device supports GO CSA, the second electronic device determines that the second electronic device serves as the GO device of the first P2P communication.
由此,通过设备能力的判断,选取具有更强能力的设备作为GO设备。以便于后续的STA通信发生切换,或者在已经建立STA通信的基础上进行P2P连接时,通过该更强的设备能力,实现P2P通信的优化配置。Therefore, by judging the device capabilities, a device with stronger capabilities is selected as the GO device, so as to facilitate the subsequent switching of STA communication, or when a P2P connection is established based on the established STA communication, the optimized configuration of P2P communication is realized through the stronger device capabilities.
可选的,在该第一电子设备发送该P2P请求信息之前,该第一电子设备与路由设备建立有第一通信连接。该第一设备信息还包括:该第一通信连接的连接信息。Optionally, before the first electronic device sends the P2P request information, the first electronic device establishes a first communication connection with a routing device. The first device information also includes: connection information of the first communication connection.
可选的,在该第一通信连接的连接信息指示该第一通信连接建立在5G或6G WIFI的第一STA信道上。该第二电子设备根据该P2P请求信息,确定P2P通信配置,包括:该第二电子设备确定进行该第一P2P通信的信道为该第一STA信道。Optionally, the connection information of the first communication connection indicates that the first communication connection is established on a first STA channel of 5G or 6G WIFI. The second electronic device determines the P2P communication configuration according to the P2P request information, including: the second electronic device determines that the channel for performing the first P2P communication is the first STA channel.
可选的,在该第二电子设备接收到该P2P请求信息之前,该第二电子设备与路由设备建立有第二通信连接。该第二通信连接建立在5G或6G WIFI的第二STA信道上。该第二电子设备根据该P2P请求信息,确定P2P通信配置,包括:该第二电子设备确定进行该第一P2P通信的信道为该第二STA信道。Optionally, before the second electronic device receives the P2P request information, the second electronic device establishes a second communication connection with the routing device. The second communication connection is established on a second STA channel of 5G or 6G WIFI. The second electronic device determines the P2P communication configuration according to the P2P request information, including: the second electronic device determines that the channel for the first P2P communication is the second STA channel.
该示例中,在确定P2P通信信道时,还可以参考已经建立的STA信道。可以理解的是,在将P2P通信信道设置为跟随STA信道时,能够实现P2P通信以及STA通信的同频同信道工作。进而减小发射端设备的切换开销,同时使得即使设备不支持DBDC,也能够同时进行STA通信以及P2P通信。In this example, when determining the P2P communication channel, the established STA channel can also be referenced. It can be understood that when the P2P communication channel is set to follow the STA channel, the same frequency and channel operation of P2P communication and STA communication can be achieved. This reduces the switching overhead of the transmitting device, and at the same time, even if the device does not support DBDC, STA communication and P2P communication can be performed simultaneously.
可选的,该第二电子设备中预设有打分规则,该打分规则中包括M个预配置项。该第二电子设备根据该第一设备信息以及该打分规则,对该第一电子设备进行打分,获取第一电子设备对应的打分结果。该第二电子设备根据第二设备信息,对该第二电子设备进行打分,获取第二电子设备对应的打分结果。该第二设备信息包括以下中的至少一项:第二可用信道集合,该第二电子设备的第二能力信息。其中,该第二可用信道集合用于指示至少一个信道,该第二可用信道集合指示的该至少一个信道能够用于该第二电子设备进行P2P通信。该第二电子设备根据该第一电子设备对应的打分结果以及该第二电子设备对应的打分结果,确定该P2P通信配置。Optionally, a scoring rule is preset in the second electronic device, and the scoring rule includes M preconfigured items. The second electronic device scores the first electronic device according to the first device information and the scoring rule, and obtains the scoring result corresponding to the first electronic device. The second electronic device scores the second electronic device according to the second device information, and obtains the scoring result corresponding to the second electronic device. The second device information includes at least one of the following: a second available channel set, and second capability information of the second electronic device. Among them, the second available channel set is used to indicate at least one channel, and the at least one channel indicated by the second available channel set can be used for the second electronic device to perform P2P communication. The second electronic device determines the P2P communication configuration according to the scoring result corresponding to the first electronic device and the scoring result corresponding to the second electronic device.
基于该示例,提供了又一种确定P2P通信配置的方案实现。示例性的,第二电子设备可以对第一电子设备以及第二电子设备分别进行打分。根据该打分结果,即可准确实 现对P2P配置的高效确定。Based on this example, another solution for determining the P2P communication configuration is provided. For example, the second electronic device can score the first electronic device and the second electronic device respectively. According to the scoring results, the first electronic device and the second electronic device can be accurately determined. Efficient determination of P2P configuration is now possible.
需要说明的是,本示例中,以第二电子设备对第一电子设备进行打分为例。由此使得预设的打分规则只需部署在第二电子设备中即可。同时能够避免第一电子设备中的打分规则与第二电子设备的打分规则不一致时,双端设备分别打分导致的分数置信度低的情况下。在另一些实现中,第一电子设备也可以基于与第二电子设备同样的打分规则,在第一电子设备中自行打分。由此第一电子设备可以直接将第一电子设备的打分结果发送给第二电子设备。第二电子设备就可以仅需对第二电子设备进行打分即可。It should be noted that, in this example, the second electronic device scores the first electronic device. As a result, the preset scoring rules only need to be deployed in the second electronic device. At the same time, it can avoid the situation where the scoring rules in the first electronic device are inconsistent with the scoring rules of the second electronic device, resulting in low score confidence caused by the scoring of the two-end devices. In other implementations, the first electronic device can also score itself in the first electronic device based on the same scoring rules as the second electronic device. As a result, the first electronic device can directly send the scoring results of the first electronic device to the second electronic device. The second electronic device only needs to score the second electronic device.
可选的,该第一设备信息包括第一可用信道集合,该第二设备信息包括第二可用信道集合。该第二电子设备在对该第一电子设备或该第二电子设备打分之前,该方法还包括:该第二电子设备确定该第一可用信道集合与该第二可用信道集合的第一交集,该第一交集中包括N个信道。Optionally, the first device information includes a first set of available channels, and the second device information includes a second set of available channels. Before the second electronic device scores the first electronic device or the second electronic device, the method further includes: the second electronic device determines a first intersection of the first set of available channels and the second set of available channels, and the first intersection includes N channels.
可选的,该第二电子设备根据该第一设备信息以及该打分规则,对该第一电子设备进行打分,获取第一电子设备对应的打分结果,包括:针对该第一交集中的每个信道,该第二电子设备根据该打分规则以及该第一设备信息,对该第一电子设备进行打分获取该M个预配置项中每个预配置项对应的M个打分结果。根据该M个打分结果,确定该信道对应的第一打分结果。该第一电子设备对应的打分结果包括N个信道对应的N个第一打分结果。Optionally, the second electronic device scores the first electronic device according to the first device information and the scoring rule to obtain a scoring result corresponding to the first electronic device, including: for each channel in the first intersection, the second electronic device scores the first electronic device according to the scoring rule and the first device information to obtain M scoring results corresponding to each pre-configuration item in the M pre-configuration items. Based on the M scoring results, determine the first scoring result corresponding to the channel. The scoring result corresponding to the first electronic device includes N first scoring results corresponding to N channels.
可选的,该根据该M个打分结果,确定该信道对应的第一打分结果,包括:将该M个打分结果之和,作为该信道对应的第一打分结果。Optionally, determining a first scoring result corresponding to the channel according to the M scoring results includes: taking a sum of the M scoring results as the first scoring result corresponding to the channel.
可选的,该第二电子设备根据该第二设备信息以及该打分规则,对该第二电子设备进行打分,获取第二电子设备对应的打分结果,包括:针对该第一交集中的每个信道,该第二电子设备根据该打分规则以及该第二设备信息,对该第二电子设备进行打分获取该M个预配置项中每个预配置项对应的M个打分结果。根据该M个打分结果,确定该信道对应的第二打分结果。该第二电子设备对应的打分结果包括N个信道对应的N个第二打分结果。Optionally, the second electronic device scores the second electronic device according to the second device information and the scoring rule, and obtains a scoring result corresponding to the second electronic device, including: for each channel in the first intersection, the second electronic device scores the second electronic device according to the scoring rule and the second device information to obtain M scoring results corresponding to each pre-configuration item in the M pre-configuration items. Based on the M scoring results, determine the second scoring result corresponding to the channel. The scoring result corresponding to the second electronic device includes N second scoring results corresponding to N channels.
可选的,该第二电子设备根据该第一电子设备对应的打分结果以及该第二电子设备对应的打分结果,确定该P2P通信配置,包括:该第二电子设备确定该N个信道中每个信道对应的第三打分结果,该第三打分结果为该信道的第一打分结果和第二打分结果之和。该第二电子设备在该N个信道中,选取第一信道作为进行第一P2P通信的信道。该第一信道的第三打分结果大于其他信道的第三打分结果。Optionally, the second electronic device determines the P2P communication configuration according to the scoring result corresponding to the first electronic device and the scoring result corresponding to the second electronic device, including: the second electronic device determines a third scoring result corresponding to each of the N channels, the third scoring result being the sum of the first scoring result and the second scoring result of the channel. The second electronic device selects the first channel from the N channels as the channel for the first P2P communication. The third scoring result of the first channel is greater than the third scoring results of other channels.
可选的,该第二电子设备根据该第一电子设备对应的打分结果以及该第二电子设备对应的打分结果,确定该P2P通信配置,还包括:在该第一信道的第一打分结果大于第二打分结果时,该第二电子设备确定该第一电子设备作为GO设备。在该第一信道的第一打分结果小于第二打分结果时,该第二电子设备确定该第二电子设备作为GO设备。Optionally, the second electronic device determines the P2P communication configuration according to the scoring result corresponding to the first electronic device and the scoring result corresponding to the second electronic device, further comprising: when the first scoring result of the first channel is greater than the second scoring result, the second electronic device determines the first electronic device as a GO device. When the first scoring result of the first channel is less than the second scoring result, the second electronic device determines the second electronic device as a GO device.
该示例提供了一种具体的基于打分规则的选择GO设备,选择P2P通信信道的方案实现。可以理解的是,该打分规则可以是预设在电子设备中的,或者该打分规则可以是电子设备向云端设备请求的。也就是说,该预设的打分规则可以设置在云端设备中,根据终端设备的使用情况,进行实时下发,从而保证设备中的打分规则均最新且最可靠。This example provides a specific implementation of a scheme for selecting a GO device and a P2P communication channel based on a scoring rule. It is understandable that the scoring rule may be preset in the electronic device, or the scoring rule may be requested by the electronic device to the cloud device. In other words, the preset scoring rule may be set in the cloud device and issued in real time according to the usage of the terminal device, thereby ensuring that the scoring rules in the device are the latest and most reliable.
在一些实现中,该打分规则可以是通过神经网络模型训练获取的。当然,随着在通 信系统基于打分规则的P2P通信连接样例的增加,该打分规则可以不断地更新学习,以使得打分规则可以更加准确。由此使得基于该打分规则发起的P2P通信质量得到不断提高。In some implementations, the scoring rule can be obtained through neural network model training. With the increase of P2P communication connection samples based on the scoring rule, the scoring rule can be continuously updated and learned to make the scoring rule more accurate, thereby continuously improving the quality of P2P communication initiated based on the scoring rule.
第二方面,提供一种通信方法,应用于通信系统,该通信系统包括第一电子设备和第二电子设备。该方法用于在该第一电子设备和该第二电子设备之间建立P2P通信连接,该P2P通信连接用于进行投屏或多屏协同。该第一电子设备支持CSA,该第二电子设备不支持CSA。该第一电子设备的第一可用信道集合包括第一信道,以及第二信道。该第一信道为2.4G信道,该第二信道为5G信道。该第二电子设备的第二可用信道集合也包括该第一信道和该第二信道。该方法包括:使用该第二信道,作为该P2P通信连接的信道。在该第一电子设备支持GO CSA时,使用该第一电子设备作为该P2P通信连接的GO设备。在该第一电子设备支持GC CSA时,使用该第一电子设备或该第二电子设备作为该P2P通信连接的GO设备。In a second aspect, a communication method is provided, which is applied to a communication system, and the communication system includes a first electronic device and a second electronic device. The method is used to establish a P2P communication connection between the first electronic device and the second electronic device, and the P2P communication connection is used for screen projection or multi-screen collaboration. The first electronic device supports CSA, and the second electronic device does not support CSA. The first available channel set of the first electronic device includes a first channel and a second channel. The first channel is a 2.4G channel, and the second channel is a 5G channel. The second available channel set of the second electronic device also includes the first channel and the second channel. The method includes: using the second channel as the channel of the P2P communication connection. When the first electronic device supports GO CSA, the first electronic device is used as the GO device of the P2P communication connection. When the first electronic device supports GC CSA, the first electronic device or the second electronic device is used as the GO device of the P2P communication connection.
第三方面,提供一种通信方法,应用于通信系统,该通信系统包括第一电子设备和第二电子设备。该方法用于在该第一电子设备和该第二电子设备之间建立P2P通信连接,该P2P通信连接用于进行文件传输。该第一电子设备的第一可用信道集合包括第一信道,以及第二信道。该第一信道为2.4G信道,该第二信道为5G信道。该第二电子设备的第二可用信道集合也包括该第一信道和该第二信道。该方法包括:使用该第二信道,作为该P2P通信连接的信道。In a third aspect, a communication method is provided, which is applied to a communication system, wherein the communication system includes a first electronic device and a second electronic device. The method is used to establish a P2P communication connection between the first electronic device and the second electronic device, and the P2P communication connection is used for file transfer. The first available channel set of the first electronic device includes a first channel and a second channel. The first channel is a 2.4G channel, and the second channel is a 5G channel. The second available channel set of the second electronic device also includes the first channel and the second channel. The method includes: using the second channel as a channel for the P2P communication connection.
第四方面,提供一种电子设备。该电子设备可以为上述示例中的第一电子设备。该电子设备可以用于实现第一方面及其任一种可能的设计中提供的第一电子设备涉及的技术方案。In a fourth aspect, an electronic device is provided. The electronic device may be the first electronic device in the above example. The electronic device may be used to implement the technical solution involved in the first electronic device provided in the first aspect and any possible design thereof.
第五方面,提供一种电子设备。该电子设备可以为上述示例中的第二电子设备。该电子设备可以用于实现第一方面及其任一种可能的设计中提供的第二电子设备涉及的技术方案。In a fifth aspect, an electronic device is provided. The electronic device may be the second electronic device in the above example. The electronic device may be used to implement the technical solution involved in the second electronic device provided in the first aspect and any possible design thereof.
第六方面,提供一种通信系统,该通信系统包括第一电子设备和第二电子设备,该通信系统工作时,该第一电子设备和该第二电子设备根据第一方面及其任一种可能的设计中提供的技术方案建立P2P通信。In a sixth aspect, a communication system is provided, which includes a first electronic device and a second electronic device. When the communication system is working, the first electronic device and the second electronic device establish P2P communication according to the technical solution provided in the first aspect and any possible design thereof.
第七方面,提供一种芯片系统。该芯片系统可以设置在第一电子设备和/或第二电子设备中。芯片系统包括接口电路和处理器;接口电路和处理器通过线路互联;接口电路用于从存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令;当处理器执行计算机指令时,芯片系统支持第一电子设备和/或第二电子设备执行如上述第一方面以及各种可能的设计中任一种提供的技术方案。In the seventh aspect, a chip system is provided. The chip system can be set in a first electronic device and/or a second electronic device. The chip system includes an interface circuit and a processor; the interface circuit and the processor are interconnected through a line; the interface circuit is used to receive a signal from a memory and send a signal to the processor, and the signal includes a computer instruction stored in the memory; when the processor executes the computer instruction, the chip system supports the first electronic device and/or the second electronic device to execute the technical solution provided in any one of the above-mentioned first aspect and various possible designs.
第八方面,提供一种计算机可读存储介质,计算机可读存储介质包括计算机指令,当计算机指令运行时,使得第一电子设备或第二电子设备执行如上述第一方面以及各种可能的设计中任一种提供的技术方案。In an eighth aspect, a computer-readable storage medium is provided, which includes computer instructions. When the computer instructions are executed, the first electronic device or the second electronic device executes the technical solution provided in the first aspect and any one of various possible designs.
第九方面,提供一种计算机程序产品,计算机程序产品中包括指令,当计算机程序产品在第一电子设备和/或第二电子设备上运行时,使得第一电子设备和/或第二电子设备执行如上述第一方面以及各种可能的设计中任一种提供的技术方案。In a ninth aspect, a computer program product is provided, which includes instructions. When the computer program product runs on a first electronic device and/or a second electronic device, the first electronic device and/or the second electronic device executes the technical solution provided in the first aspect and any one of various possible designs.
应当理解的是,上述第二方面至第九方面提供的技术方案,其技术特征均可对应到 第一方面及其可能的设计中提供的方法,因此能够达到的有益效果类似,此处不再赘述。It should be understood that the technical features of the technical solutions provided in the second to ninth aspects above can all correspond to The methods provided in the first aspect and possible designs thereof can achieve similar beneficial effects, which will not be described in detail here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为一种电子设备进行无线通信的示意图;FIG1 is a schematic diagram of an electronic device performing wireless communication;
图2为一种电子设备与路由设备进行STA通信的示意图;FIG2 is a schematic diagram of an electronic device performing STA communication with a routing device;
图3为一种设备间进行文件分享的P2P通信示意图;FIG3 is a schematic diagram of P2P communication for file sharing between devices;
图4为一种设备间进行多屏协同的P2P通信示意图;FIG4 is a schematic diagram of P2P communication for multi-screen collaboration between devices;
图5为一种设备间进行投屏的P2P通信示意图;FIG5 is a schematic diagram of P2P communication for screen projection between devices;
图6为一种多设备进行WIFI通信的示意图;FIG6 is a schematic diagram of multiple devices performing WIFI communication;
图7为一种多设备进行WIFI通信的示意图;FIG7 is a schematic diagram of multiple devices performing WIFI communication;
图8为本申请实施例提供的一种通信方法的逻辑示意图;FIG8 is a logic diagram of a communication method provided in an embodiment of the present application;
图9为本申请实施例提供的一种通信方法的设备间交互示意图;FIG9 is a schematic diagram of device interaction of a communication method provided in an embodiment of the present application;
图10为本申请实施例提供的一种文件分享场景下P2P通信信道选取的示意图;FIG10 is a schematic diagram of P2P communication channel selection in a file sharing scenario provided by an embodiment of the present application;
图11为本申请实施例提供的一种投屏场景下P2P通信信道选取的示意图;FIG11 is a schematic diagram of a P2P communication channel selection in a screen projection scenario provided by an embodiment of the present application;
图12为本申请实施例提供的一种通信方法的设备间交互示意图;FIG12 is a schematic diagram of device interaction of a communication method provided in an embodiment of the present application;
图13为本申请实施例提供的一种根据设备能力选取GO设备的示意图;FIG13 is a schematic diagram of selecting a GO device according to device capabilities provided in an embodiment of the present application;
图14为本申请实施例提供的一种通信方法的设备间交互示意图;FIG14 is a schematic diagram of device interaction of a communication method provided in an embodiment of the present application;
图15为本申请实施例提供的设备对各个可用信道打分的示意图;FIG15 is a schematic diagram of a device according to an embodiment of the present application scoring each available channel;
图16为本申请实施例提供的设备对各个可用信道打分的示意图;FIG16 is a schematic diagram of a device providing a scoring method for each available channel according to an embodiment of the present application;
图17为本申请实施例提供的一种通信方法的设备间交互示意图;FIG17 is a schematic diagram of device interaction of a communication method provided in an embodiment of the present application;
图18为本申请实施例提供的一种电子设备的组成示意图;FIG18 is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
图19为本申请实施例提供的一种芯片系统的组成示意图。FIG19 is a schematic diagram of the composition of a chip system provided in an embodiment of the present application.
具体实施方式Detailed ways
电子设备可以基于无线通信协议,实现与其他设备的互联。Electronic devices can be interconnected with other devices based on wireless communication protocols.
以无线通信协议包括基于无线局域网(Wireless Local Area Network,WLAN)的WI-FI协议为例。基于该WIFI协议,电子设备可以实现与路由设备和/或其他电子设备之间的互联通信。其中,该基于WIFI协议建立的互联通信可以是工作在2.4G WIFI信道上的,也可以是工作在5G WIFI信道上的。在一些实现中,该互联通信还可以是工作在6G WIFI等更高频段对应的信道上的。Take the wireless communication protocol including the WI-FI protocol based on the wireless local area network (WLAN) as an example. Based on the WIFI protocol, the electronic device can realize the interconnection communication with the routing device and/or other electronic devices. Among them, the interconnection communication established based on the WIFI protocol can be operated on the 2.4G WIFI channel or on the 5G WIFI channel. In some implementations, the interconnection communication can also be operated on the channel corresponding to the higher frequency band such as 6G WIFI.
在一些实施例中,该基于WIFI协议的无线通信可以包括与路由设备进行交互的WIFI STA通信,以及与其他电子设备进行交互的WIFI P2P通信。以下示例中,WIFI P2P通信也可以简称为P2P通信。WIFI STA通信也可以简称为STA通信。In some embodiments, the wireless communication based on the WIFI protocol may include WIFI STA communication interacting with a routing device, and WIFI P2P communication interacting with other electronic devices. In the following examples, WIFI P2P communication may also be referred to as P2P communication. WIFI STA communication may also be referred to as STA communication.
示例性的,结合图1,第一电子设备可以与路由设备进行基于STA通信的交互。通过该STA通信,第一电子设备可以通过路由设备接入外网,与外网进行数据交互。或者,通过该STA通信,第一电子设备可以通过路由设备接入该路由设备所处的局域网,以便于与局域网中的其他设备进行通信。Exemplarily, in conjunction with FIG1 , the first electronic device can interact with the routing device based on STA communication. Through the STA communication, the first electronic device can access the external network through the routing device and interact with the external network. Alternatively, through the STA communication, the first electronic device can access the local area network where the routing device is located through the routing device, so as to communicate with other devices in the local area network.
作为一种示例,如图2所示。以第一电子设备为设备21,路由设备为路由器为例。设备21与路由器可以建立基于2.4G或者5G的STA通信。As an example, as shown in Figure 2, taking the first electronic device as device 21 and the routing device as a router as an example, the device 21 and the router can establish STA communication based on 2.4G or 5G.
如图1所示,第一电子设备还可以与其他电子设备(如第二电子设备)进行基于P2P通信的交互。通过该P2P通信,第一电子设备可以直接与第二电子设备进行文件分享、 多屏协同以及投屏等P2P交互。在另一些实施例中,基于该P2P通信,还可以实现除图1所示的文件分享、多屏协同以及投屏之外的P2P交互。例如,该P2P交互还可以包括:随航,车机交互(如HiCar),WLAN直连等。As shown in FIG1 , the first electronic device can also interact with other electronic devices (such as the second electronic device) based on P2P communication. Through the P2P communication, the first electronic device can directly share files with the second electronic device, P2P interactions such as multi-screen collaboration and screen projection. In other embodiments, based on the P2P communication, P2P interactions other than file sharing, multi-screen collaboration and screen projection shown in FIG1 can also be realized. For example, the P2P interaction can also include: Sidecar, vehicle-machine interaction (such as HiCar), WLAN direct connection, etc.
示例性的,在一些实施例中,第一电子设备和第二电子设备可以通过P2P通信进行文件分享。Exemplarily, in some embodiments, the first electronic device and the second electronic device may share files via P2P communication.
参考图3,以第一电子设备为设备31,第二电子设备为设备32为例。设备31可以接收用户选中文件并分享的操作。响应于该操作,设备31可以扫描并在界面上显示能够进行P2P通信的其他设备(如设备32)。在用户选定设备32后,设备31与设备32可以建立2.4G或5G信道上的P2P通信。通过该P2P通信,设备31与设备32可以进行文件数据的互相传输。该示例中,设备31即可称为发起文件分享的设备,或者发起P2P通信的设备,或者发起端设备。Referring to Figure 3, take the first electronic device as device 31 and the second electronic device as device 32 as an example. Device 31 can receive an operation in which a user selects a file and shares it. In response to this operation, device 31 can scan and display other devices (such as device 32) that can perform P2P communication on the interface. After the user selects device 32, device 31 and device 32 can establish P2P communication on a 2.4G or 5G channel. Through this P2P communication, device 31 and device 32 can transfer file data to each other. In this example, device 31 can be called a device that initiates file sharing, or a device that initiates P2P communication, or an initiating device.
在另一些实施例中,第一电子设备和第二电子设备可以通过P2P通信进行多屏协同。In other embodiments, the first electronic device and the second electronic device can perform multi-screen collaboration through P2P communication.
参考图4,以第一电子设备为设备41(如平板电脑),第二电子设备为设备42(如手机)为例。设备42可以在接收到用户触发进行多屏协同的操作后,通过BLE/WIFI P2P扫描附近可以用于进行协同的设备(如设备41)。在用户的授权后,设备41与设备42可以建立2.4G或5G信道上的P2P通信。通过该P2P通信,设备41与设备42可以进行多屏协同。例如,设备42可以通过多屏协同,将当前的界面信息传输给设备41。设备41可以根据该设备42传输的界面信息,在设备41的显示屏上显示窗口43。窗口43中的显示元素可以与设备42的显示元素相对应。由此使得用户可以在设备41上,根据显示窗口43,对设备42进行控制。该示例中,设备42即可称为发起多屏协同的设备,或者发起端设备。Referring to FIG. 4 , the first electronic device is device 41 (such as a tablet computer) and the second electronic device is device 42 (such as a mobile phone) as an example. After receiving the operation triggered by the user to perform multi-screen collaboration, device 42 can scan nearby devices (such as device 41) that can be used for collaboration through BLE/WIFI P2P. After the user's authorization, device 41 and device 42 can establish P2P communication on a 2.4G or 5G channel. Through this P2P communication, device 41 and device 42 can perform multi-screen collaboration. For example, device 42 can transmit the current interface information to device 41 through multi-screen collaboration. Device 41 can display window 43 on the display screen of device 41 according to the interface information transmitted by device 42. The display elements in window 43 can correspond to the display elements of device 42. This allows the user to control device 42 on device 41 according to the display window 43. In this example, device 42 can be called a device that initiates multi-screen collaboration, or an initiating end device.
在另一些实施例中,第一电子设备和第二电子设备可以通过P2P通信进行投屏。In other embodiments, the first electronic device and the second electronic device can perform screen projection through P2P communication.
参考图5,以第一电子设备为设备51(如大屏),第二电子设备为设备52(如手机)为例。设备52可以在接收到用户的投屏指示后,扫描当前局域网环境中的可用投屏设备(如设备51)。在用户的授权后,设备51与设备52可以建立2.5G或5G信道上的P2P通信。通过该P2P通信,设备51与设备52可以进行投屏。例如,设备52可以将当前显示的屏幕信息,传输给设备51,以便于通过具有更大显示屏幕的设备51观看设备52上播放的内容。该示例中,设备52即可称为发起投屏的设备,或者发起端设备。Referring to Figure 5, take the first electronic device as device 51 (such as a large screen) and the second electronic device as device 52 (such as a mobile phone) as an example. After receiving the user's screen projection instruction, device 52 can scan the available screen projection devices (such as device 51) in the current local area network environment. After the user's authorization, device 51 and device 52 can establish P2P communication on a 2.5G or 5G channel. Through this P2P communication, device 51 and device 52 can cast the screen. For example, device 52 can transmit the currently displayed screen information to device 51, so that the content played on device 52 can be viewed through device 51 with a larger display screen. In this example, device 52 can be called a device that initiates screen projection, or an initiating device.
需要说明的是,在进行P2P通信时,两个设备中可以包括一个设备作为管理者(group owner,GO),对应的另一个设备可以作为被管理者(Group Client,GC)。其中,GO可以用于对当前的P2P通信进行管理。例如,GO可以确定P2P通信所使用的信道,并通知GC使用该信道与GO建立P2P通信。又如,GO还可以在需要进行信道切换时,通知GC执行相应的信道切换操作。It should be noted that when performing P2P communication, one of the two devices can be a manager (group owner, GO), and the other corresponding device can be a managed (group client, GC). Among them, GO can be used to manage the current P2P communication. For example, GO can determine the channel used for P2P communication and notify GC to use the channel to establish P2P communication with GO. For another example, GO can also notify GC to perform the corresponding channel switching operation when channel switching is required.
在一些实施例中,发起端设备可以默认为GO。对应的另一端设备可以默认为GC。In some embodiments, the initiating end device may be set as GO by default, and the corresponding other end device may be set as GC by default.
例如,以通过P2P通信进行文件分享为例。发起文件分享操作的设备(如图3中的设备31)可以作为GO。对应的设备32可以作为P2P通信中的GC。那么,设备31就可以决定当前P2P通信中所使用的信道,通知给设备32,以便于设备32通过该信道与 设备31建立P2P通信进行文件分享。For example, take file sharing through P2P communication as an example. The device that initiates the file sharing operation (such as device 31 in Figure 3) can be used as the GO. The corresponding device 32 can be used as the GC in the P2P communication. Then, device 31 can determine the channel used in the current P2P communication and notify device 32 so that device 32 can communicate with the other device through the channel. Device 31 establishes P2P communication for file sharing.
又如,以通过P2P通信进行多屏协同为例。发起多屏协同操作的设备(如图4中的设备42)可以作为GO。对应的设备41可以作为P2P通信中的GC。For another example, taking multi-screen collaboration through P2P communication as an example, the device that initiates the multi-screen collaboration operation (such as device 42 in FIG. 4 ) can serve as a GO, and the corresponding device 41 can serve as a GC in the P2P communication.
又如,以通过P2P通信进行投屏为例。发起投屏操作的设备(如图5中的设备52)可以作为GO。对应的设备51可以作为P2P通信中的GC。For another example, taking screen projection through P2P communication as an example, the device that initiates the screen projection operation (such as device 52 in FIG. 5 ) can serve as a GO, and the corresponding device 51 can serve as a GC in the P2P communication.
当然,在另一些实现中,GO设备也可以设置为不同于发起投屏操作的设备。示例性的,以如图5中的设备51为大屏,设备52为手机为例。手机可以在用户的控制下,扫描大屏上的相关控件以便发起投屏连接。也就是说,该示例中的手机可以作为发起投屏操作的设备。在该示例中,可以将大屏设置为GO设备进行P2P通信的管理设备。Of course, in other implementations, the GO device can also be set to be different from the device that initiates the screen projection operation. For example, take the device 51 in Figure 5 as a large screen and the device 52 as a mobile phone. Under the control of the user, the mobile phone can scan the relevant controls on the large screen to initiate a screen projection connection. In other words, the mobile phone in this example can be used as a device to initiate a screen projection operation. In this example, the large screen can be set as a management device for the GO device to perform P2P communication.
上述图2-图5的示例,是以设备间单独进行STA通信以及P2P通信为例的。在另一些场景下,第一电子设备还可以与路由设备进行STA通信,同时与第二电子设备进行P2P通信。The examples in Figures 2 to 5 above are based on the example of STA communication and P2P communication between devices. In other scenarios, the first electronic device can also perform STA communication with the routing device and perform P2P communication with the second electronic device at the same time.
示例性的,结合图3,以设备间进行文件分享,同时连接路由器为例。请参考图6。设备31可以作为P2P通信的发起设备,向设备32发起P2P通信连接。那么,设备31就可以作为GO,对应的设备32可以作为GC。For example, in conjunction with Figure 3, take file sharing between devices and connecting to a router as an example. Please refer to Figure 6. Device 31 can be used as a P2P communication initiator to initiate a P2P communication connection to device 32. Then, device 31 can be used as a GO, and the corresponding device 32 can be used as a GC.
在本示例中,设备31还可以在建立P2P通信之前,与路由器建立有2.4G STA通信。In this example, device 31 can also establish 2.4G STA communication with the router before establishing P2P communication.
结合前述说明,设备31作为GO,可以具有决定P2P通信使用信道的功能。在一些实施例中,设备31可以将P2P通信信道设置为STA通信信道。如,设备31可以将与设备32的通信信道设置为正在进行STA通信的2.4G频段中的信道。这样,设备31与路由器的STA通信以及与设备32的P2P通信过程,可以通过一个信道的数据发送实现。对应的,路由器可以从该信道中的数据中筛选STA通信对应的数据,设备32可以从该信道中的数据中筛选P2P通信对应的数据。由此,可以达到节省设备31的数据发送开销。In combination with the above description, device 31, as a GO, can have the function of determining the channel used for P2P communication. In some embodiments, device 31 can set the P2P communication channel to the STA communication channel. For example, device 31 can set the communication channel with device 32 to the channel in the 2.4G frequency band in which STA communication is ongoing. In this way, the STA communication between device 31 and the router and the P2P communication process with device 32 can be implemented through data transmission of one channel. Correspondingly, the router can filter the data corresponding to STA communication from the data in the channel, and device 32 can filter the data corresponding to P2P communication from the data in the channel. In this way, the data transmission overhead of device 31 can be saved.
然而,这样也会存在一些问题。结合图3的示例。文件分享的P2P通信场景中,所传输文件的数据量可以较大。那么,通过与STA通信同频同信道的数据传输机制,可能使得文件分享的数据无法被快速传递。此外,该示例中,P2P通信信道为跟随STA通信的2.4G信道,因此其传输速率相比于其他WIFI频段的信道(如5G、6G等)存在显著不足的问题。However, there will be some problems. Combined with the example of Figure 3. In the P2P communication scenario of file sharing, the amount of data of the transmitted file can be large. Then, through the data transmission mechanism of the same frequency and channel as STA communication, the file sharing data may not be transmitted quickly. In addition, in this example, the P2P communication channel is a 2.4G channel that follows STA communication, so its transmission rate is significantly insufficient compared to other WIFI frequency band channels (such as 5G, 6G, etc.).
由此,在设备31支持5G WIFI,并且支持双频双发(Dual Band Dual Concurrent,DBDC)功能的情况下,显然使用5G信道作为与设备32连接的P2P通信信道更加合适。其中,设备31支持DBDC功能的情况下,该设备就可以同时进行2.4G通信以及5G通信。例如,在设备31通过5G信道与设备32进行P2P通信的情况下,设备31还可以基于该DBDC功能,继续基于2.4G信道与路由器保持STA通信。Therefore, when device 31 supports 5G WIFI and supports the Dual Band Dual Concurrent (DBDC) function, it is obviously more appropriate to use the 5G channel as the P2P communication channel connected to device 32. Among them, when device 31 supports the DBDC function, the device can perform 2.4G communication and 5G communication at the same time. For example, when device 31 performs P2P communication with device 32 through the 5G channel, device 31 can also continue to maintain STA communication with the router based on the 2.4G channel based on the DBDC function.
与如图6所示的文件分享P2P通信场景类似的,在多屏协同以及投屏场景下,也存在类似的P2P通信不合理的问题。Similar to the file sharing P2P communication scenario shown in FIG6 , similar unreasonable P2P communication problems also exist in multi-screen collaboration and screen projection scenarios.
示例性的,结合图4,以多屏协同场景下的P2P通信为例。请参考图7。设备42可以作为GO,与设备41建立多屏协同通信。For example, in conjunction with Figure 4, P2P communication in a multi-screen collaborative scenario is taken as an example. Please refer to Figure 7. Device 42 can serve as a GO to establish multi-screen collaborative communication with device 41.
在本示例中,在设备42向设备41发起多屏协同通信之前,作为GO的设备42可以通过信道A(如36信道),与路由器建立有STA通信。那么,结合图6中的说明,设 备42可以基于与STA通信的跟随策略,将该信道A确定为P2P通信的信道。也即,设备42可以指示设备41,建立基于信道A的P2P通信。In this example, before device 42 initiates multi-screen collaborative communication to device 41, device 42 as GO can establish STA communication with the router through channel A (such as channel 36). Then, combined with the description in FIG. 6, assume The device 42 may determine the channel A as the channel for P2P communication based on the following strategy for communicating with the STA. That is, the device 42 may instruct the device 41 to establish P2P communication based on the channel A.
可以理解的是,在一些情况下,STA通信所使用的信道可能会发生变化。比如,在建立基于信道A的P2P通信之后,设备42与路由器的STA通信信道可以由信道A切换为信道B(如48信道)。It is understandable that in some cases, the channel used for STA communication may change. For example, after establishing P2P communication based on channel A, the STA communication channel between device 42 and the router may be switched from channel A to channel B (eg, channel 48).
这样,对于设备42而言,就会出现使用不同信道执行STA通信以及P2P通信的情况,这会对P2P通信的时延造成显著的影响。而本示例中,多屏协同的P2P通信对于时延具有较高的要求,在时延较高时会产生协同画面卡顿等问题。In this way, for device 42, different channels will be used to perform STA communication and P2P communication, which will have a significant impact on the latency of P2P communication. In this example, multi-screen collaborative P2P communication has high requirements for latency, and when the latency is high, problems such as collaborative screen freeze will occur.
需要说明的是,信道切换宣告(Channel Switch Announcement,CSA)有助于解决上述如图7所示的问题。其中,CSA包括GO CSA以及GC CSA。在设备支持GO CSA的情况下,若该设备作为GO设备,且STA通信信道发生变化时,则可以基于该GO CSA,将当前的P2P通信信道跟随STA信道进行相应的切换,保证STA通信与P2P通信的同频同信道工作,由此使得P2P通信的时延得到保证。对应的,在设备支持GC CSA的情况下,若该设备作为GC设备,且STA通信信道发生变化时,则可以基于该GC CSA,将当前的P2P通信信道跟随STA信道进行相应的切换,保证STA通信与P2P通信的同频同信道工作,由此使得P2P通信的时延得到保证。It should be noted that the Channel Switch Announcement (CSA) helps solve the above problem as shown in Figure 7. CSA includes GO CSA and GC CSA. When the device supports GO CSA, if the device is used as a GO device and the STA communication channel changes, the current P2P communication channel can be switched accordingly to follow the STA channel based on the GO CSA to ensure that the STA communication and P2P communication work on the same frequency and channel, thereby ensuring the latency of P2P communication. Correspondingly, when the device supports GC CSA, if the device is used as a GC device and the STA communication channel changes, the current P2P communication channel can be switched accordingly to follow the STA channel based on the GC CSA to ensure that the STA communication and P2P communication work on the same frequency and channel, thereby ensuring the latency of P2P communication.
在如图7所示的示例中,因为设备42是作为GO与设备41作为GC建立的P2P连接,只有在设备42支持GO CSA的情况下,才有能力指示设备41将当前的P2P信道切换为信道B。这对设备42提出了较高的要求。In the example shown in FIG7 , because device 42 is a GO that establishes a P2P connection with device 41 as a GC, only if device 42 supports GO CSA can it instruct device 41 to switch the current P2P channel to channel B. This places higher requirements on device 42.
那么,在一些情况下,如果设备42仅支持GC CSA,设备41支持GO CSA。就无法按照上述CSA机制实现P2P信道与STA信道的跟随调整。Then, in some cases, if device 42 only supports GC CSA and device 41 supports GO CSA, it is impossible to implement the follow-up adjustment of the P2P channel and the STA channel according to the above CSA mechanism.
通过上述如图6以及图7的说明,在设备进行P2P通信时,基于现有的角色确定(如设备作为GO或作为GC),以及信道选择,可能造成P2P通信质量较差的问题。As described above with reference to FIG. 6 and FIG. 7 , when devices perform P2P communication, based on existing role determination (such as the device as a GO or a GC) and channel selection, the problem of poor P2P communication quality may be caused.
为了解决上述问题,本申请实施例提供一种通信方法,能够使得设备间建立P2P通信之前,根据设备的能力以及当前通信需求,灵活确定P2P通信中的角色(如GO以及GC)。在一些实施例中,还可以优化选取更利于当前通信的信道。由此通过准确的角色确定以及信道选择,使得设备间建立的P2P通信可以更加便于对应业务的进行。In order to solve the above problems, the embodiments of the present application provide a communication method, which can flexibly determine the roles (such as GO and GC) in P2P communication according to the capabilities of the devices and the current communication needs before establishing P2P communication between devices. In some embodiments, the channel that is more conducive to the current communication can also be optimized. Thus, through accurate role determination and channel selection, the P2P communication established between devices can be more convenient for the corresponding business.
需要说明的是,本申请实施例提供的技术方案,能够应用于电子设备之间的P2P通信系统中。该参与P2P通信的电子设备可以为两个,也可以为多个。在电子设备为多个的情况下,具体实现可以参考两个电子设备建立P2P通信的方案实现。以下示例中,以该通信系统包括两个电子设备,如第一电子设备以及第二电子设备为例。It should be noted that the technical solution provided in the embodiment of the present application can be applied to a P2P communication system between electronic devices. The electronic devices participating in the P2P communication may be two or more. In the case of multiple electronic devices, the specific implementation can refer to the solution implementation of establishing P2P communication between two electronic devices. In the following example, the communication system includes two electronic devices, such as a first electronic device and a second electronic device.
其中,第一电子设备和/或第二电子设备可以包括手机、可折叠电子设备、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、蜂窝电话、个人数字助理(personal digital ass istant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备、或智慧城市设备中的至少一种。本申请实施例对第一电子设备以及第二电子设备的具体类型不作特殊限制。The first electronic device and/or the second electronic device may include at least one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific types of the first electronic device and the second electronic device.
作为一种示例,本申请提供一种具体的电子设备的硬件组成。该电子设备可以对应 于上述第一电子设备和/或第二电子设备。As an example, the present application provides a specific hardware composition of an electronic device. The electronic device can correspond to On the first electronic device and/or the second electronic device.
该示例中,电子设备可以包括处理器,外部存储器接口,内部存储器,通用串行总线(universal serial bus,USB)接头,充电管理模块,电源管理模块,电池,天线1,天线2,移动通信模块,无线通信模块,音频模块,扬声器,受话器,麦克风,耳机接口,传感器模块,按键,马达,指示器,摄像模组,显示屏,以及用户标识模块(subscriber identification module,SIM)卡接口等。其中传感器模块可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。In this example, the electronic device may include a processor, an external memory interface, an internal memory, a universal serial bus (USB) connector, a charging management module, a power management module, a battery, an antenna 1, an antenna 2, a mobile communication module, a wireless communication module, an audio module, a speaker, a receiver, a microphone, an earphone interface, a sensor module, a button, a motor, an indicator, a camera module, a display screen, and a subscriber identification module (SIM) card interface, etc. The sensor module may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比上述示例更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。上述组成示意中涉及的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than the above examples, or combine certain components, or split certain components, or arrange the components differently. The components involved in the above composition diagram may be implemented in hardware, software, or a combination of software and hardware.
在本申请实施例中,第一电子设备与第二电子设备可以通过建立WIFI P2P通信,实现文件分享、多屏协同以及投屏中的一种或多种功能。In an embodiment of the present application, the first electronic device and the second electronic device can achieve one or more functions of file sharing, multi-screen collaboration and screen projection by establishing WIFI P2P communication.
以下说明中,第一电子设备简称为第一设备,第二电子设备简称为第二设备。In the following description, the first electronic device is referred to as the first device, and the second electronic device is referred to as the second device.
在建立P2P通信之前,如图8所示,第一设备可以与第二设备进行信息交互,由此确定P2P通信配置。其中,该P2P通信配置可以包括以下中的至少一项:P2P通信中的GO和GC,P2P通信中所使用的信道。Before establishing P2P communication, as shown in Figure 8, the first device may exchange information with the second device to determine a P2P communication configuration, wherein the P2P communication configuration may include at least one of the following: a GO and a GC in P2P communication, and a channel used in P2P communication.
在如图8的示例中,以第一设备为P2P通信的发起设备为例。In the example shown in FIG. 8 , it is taken that the first device is an initiating device of P2P communication.
上述示例中,用于确定P2P通信配置的信息交互可以包括:In the above example, the information interaction for determining the P2P communication configuration may include:
S801、第一设备可以向第二设备发送P2P请求信息。S801. A first device may send P2P request information to a second device.
其中,P2P请求信息可以包括以下中的至少一项:第一设备的可用信道信息,第一设备将要发起P2P通信的类型,第一设备的能力信息等。The P2P request information may include at least one of the following: available channel information of the first device, the type of P2P communication to be initiated by the first device, capability information of the first device, etc.
设备的可用信道信息可以用于指示当前设备能够用于进行P2P通信的信道。The available channel information of the device may be used to indicate a channel that the current device can use for P2P communication.
示例性的,在一些实施例中,在设备同时支持的WIFI通信不超过两路的情况下,如果第一设备已经建立了一路STA通信以及P2P通信,则无法在支持更多的P2P通信。那么,第一设备的可用信道为空。For example, in some embodiments, when the device supports no more than two WIFI communications at the same time, if the first device has established one STA communication and one P2P communication, it cannot support more P2P communications. Then, the available channel of the first device is empty.
在另一些实施例中,在设备同时支持的WIFI通信不超过两路的情况下,如果第一设备仅建立了一路P2P通信,那么该设备还可以再建立一路P2P通信。这样,第一设备的可用信道就可以包括除了已经占用的P2P通信信道之外的其他信道。In other embodiments, when the device supports no more than two WIFI communications at the same time, if the first device has only established one P2P communication channel, the device can also establish another P2P communication channel. In this way, the available channels of the first device can include other channels except the occupied P2P communication channel.
作为一种可能的实现,在设备的可用信道不为空的情况下,则该可用信道信息可以包括每个可用信道的信道号。而在该设备仅支持2.4G WIFI通信时,则该可用信道的信道号均为2.4G WIFI通信的可用信道号。在该设备同时支持5G WIFI通信时,则该可用信道的信道号可以包括2.4G WIFI通信的可用信道号,以及5G WIFI通信的可用信道号。依次类推,在该设备还支持其他频段的WIFI通信(如6G WIFI)的情况下,则该设备的可用信道信息中就可以包括所有2.4G WIFI、5G WIFI以及6G WIFI中的可用信道号。As a possible implementation, when the available channels of the device are not empty, the available channel information may include the channel number of each available channel. When the device only supports 2.4G WIFI communication, the channel numbers of the available channels are all available channel numbers for 2.4G WIFI communication. When the device also supports 5G WIFI communication, the channel numbers of the available channels may include the available channel numbers for 2.4G WIFI communication and the available channel numbers for 5G WIFI communication. By analogy, when the device also supports WIFI communication in other frequency bands (such as 6G WIFI), the available channel information of the device may include all available channel numbers in 2.4G WIFI, 5G WIFI and 6G WIFI.
需要说明的是,在本申请的另一些实施例中,在第一设备已经与路由设备建立有STA通信的情况下,第一设备可以对该用于进行STA通信的信道进行标记,以便于第二设备能够知晓当前第一设备已经建立STA通信,以及该STA通信所使用的信道。 It should be noted that, in some other embodiments of the present application, when the first device has established STA communication with the routing device, the first device can mark the channel used for STA communication so that the second device can know that the first device has currently established STA communication and the channel used for the STA communication.
设备将要发起P2P通信的类型可以包括多种。The types of devices that are going to initiate P2P communication may include various types.
示例性的,在一些实施例中,P2P通信的类型可以包括:文件分享、投屏以及多屏协同等。Exemplarily, in some embodiments, the types of P2P communication may include: file sharing, screen projection, and multi-screen collaboration, etc.
作为一种可能的实现,在P2P请求信息包括第一设备将要发起P2P通信的类型的情况下,P2P请求中可以携带有指示P2P通信的类型的第一标识。比如,第一标识为标识1,用于指示将要发起文件分享的P2P通信。第一标识为标识2,用于指示将要发起投屏的P2P通信。第一标识为标识3,用于指示将要发起多屏协同的P2P通信。As a possible implementation, when the P2P request information includes the type of P2P communication that the first device is going to initiate, the P2P request may carry a first identifier indicating the type of P2P communication. For example, the first identifier is identifier 1, which is used to indicate that P2P communication for file sharing is going to be initiated. The first identifier is identifier 2, which is used to indicate that P2P communication for screen projection is going to be initiated. The first identifier is identifier 3, which is used to indicate that P2P communication for multi-screen collaboration is going to be initiated.
在另一些实施例中,P2P通信的类型也可以与上述划分不同。可以理解的是,文件分享的P2P通信对于通信过程中吞吐率的要求优先于对时延的要求。而投屏以及多屏协同等P2P通信过程中,所要传输的数据量一般不大,而对于时延要求更高。因此,在本示例中,P2P通信的类型也可以包括高吞吐率通信优先,以及低时延通信优先。In other embodiments, the type of P2P communication may also be different from the above classification. It is understandable that the throughput requirement of file sharing P2P communication takes precedence over the latency requirement during communication. In P2P communication processes such as screen projection and multi-screen collaboration, the amount of data to be transmitted is generally not large, but the latency requirement is higher. Therefore, in this example, the type of P2P communication may also include high-throughput communication priority and low-latency communication priority.
作为一种可能的实现,P2P请求中可以携带有指示P2P通信的类型的第一标识。比如,第一标识为标识3,于指示将要发起高吞吐率通信优先。第一标识为标识4,于指示将要发起低时延通信优先。As a possible implementation, the P2P request may carry a first identifier indicating the type of P2P communication. For example, the first identifier is identifier 3, indicating that high-throughput communication is to be initiated first. The first identifier is identifier 4, indicating that low-latency communication is to be initiated first.
设备的能力信息可以用于指示当前设备所能够支持的通信能力。比如,该设备是否支持DBDC,该设备是否支持CSA等。The device capability information may be used to indicate the communication capabilities that the current device can support, such as whether the device supports DBDC, whether the device supports CSA, etc.
示例性的,作为一种可能的实现,在P2P请求信息包括第一设备的能力信息的情况下,P2P请求信息中可以在预设的标识位,携带用于指示第一设备是否支持上述通信能力的第二标识。例如,在第二标识为第一值时,则表示第一设备支持DBDC。在第二标识为第二值时,则表示第一设备支持GO CSA。在第二标识为第三值时,则表示第一设备同时支持DBDC以及GO CSA。在第二标识为第四值时,则标识第一设备支持GC CSA。在第二标识为第五值时,则表示第一设备同时支持DBDC以及GC CSA。在第二标识为第六值时,则表示第一设备同时支持DBDC以及GC CSA和GO CSA。在第二标识为第七值时,则表示第一设备同时支持GC CSA和GO CSA。Exemplarily, as a possible implementation, in the case where the P2P request information includes the capability information of the first device, the P2P request information may carry a second identifier in a preset identifier position to indicate whether the first device supports the above-mentioned communication capability. For example, when the second identifier is the first value, it indicates that the first device supports DBDC. When the second identifier is the second value, it indicates that the first device supports GO CSA. When the second identifier is the third value, it indicates that the first device supports both DBDC and GO CSA. When the second identifier is the fourth value, it indicates that the first device supports GC CSA. When the second identifier is the fifth value, it indicates that the first device supports both DBDC and GC CSA. When the second identifier is the sixth value, it indicates that the first device supports DBDC, GC CSA and GO CSA. When the second identifier is the seventh value, it indicates that the first device supports both GC CSA and GO CSA.
需要说明的是,本示例中,是以P2P请求信息可以包括第一设备的可用信道信息,和/或第一设备将要发起P2P通信的类型,和/或第一设备的能力信息为例进行说明的。在另一些实施例中,第一设备还可以以其他形式将这些信息传递给第二设备。比如,第一设备可以对这些信息对应的一个或多个预配置项进行打分,并将打分结果携带在P2P请求信息中发送给第二设备。后续将对该方案进行举例说明,此处不再赘述。It should be noted that, in this example, the P2P request information may include the available channel information of the first device, and/or the type of P2P communication to be initiated by the first device, and/or the capability information of the first device. In other embodiments, the first device may also transmit this information to the second device in other forms. For example, the first device may score one or more pre-configured items corresponding to this information, and carry the scoring result in the P2P request information to the second device. This scheme will be illustrated later and will not be repeated here.
S802、第二设备根据P2P请求信息,生成并向第一设备发送P2P响应信息。S802: The second device generates P2P response information according to the P2P request information and sends it to the first device.
本示例中,第二设备可以根据P2P请求信息中包括的各个参数,结合第二设备自身的参数,综合确定P2P通信配置。第二设备可以将P2P通信配置携带在P2P响应信息中,发送给第一设备。结合前述说明,P2P通信配置可以包括P2P通信中的GO和GC,和/或P2P通信中所使用的信道。In this example, the second device can comprehensively determine the P2P communication configuration based on the various parameters included in the P2P request information and the parameters of the second device itself. The second device can carry the P2P communication configuration in the P2P response information and send it to the first device. In combination with the above description, the P2P communication configuration can include the GO and GC in the P2P communication, and/or the channel used in the P2P communication.
示例性的,在一些实施例中,第二设备可以根据P2P请求信息中的第一设备的可用信道信息,将要发起P2P通信的类型,以及第二设备的可用信道,选取与当前通信相对应的信道。Exemplarily, in some embodiments, the second device may select a channel corresponding to the current communication based on the available channel information of the first device in the P2P request information, the type of P2P communication to be initiated, and the available channels of the second device.
在另一些实施例中,第二设备还可以根据P2P请求中的第一设备的能力信息,以及第二设备的能力信息,确定P2P通信中的GO以及GC。 In some other embodiments, the second device may also determine the GO and GC in the P2P communication according to the capability information of the first device in the P2P request and the capability information of the second device.
第二设备可以将确定的P2P通信配置携带在P2P响应信息中,发送给第一设备。以便于第一设备根据P2P响应信息中携带的P2P通信配置,与第二设备建立P2P通信。The second device may carry the determined P2P communication configuration in the P2P response information and send it to the first device, so that the first device can establish P2P communication with the second device according to the P2P communication configuration carried in the P2P response information.
可以理解的是,如上述图8的方案示例,第一设备与第二设备可以在建立P2P通信之前,了解对端设备的相关信息,并确定对饮更多P2P通信配置。该P2P通信配置可以是与第一设备以及第二设备相对应的。基于该方案,可以将能力较强的设备配置为GO,不同于现有的将发起设备作为GO的方案,该方案能够更好地利用设备能力,提升P2P通信质量。在一些实施例中,P2P通信配置也可以体现当前P2P通信的特征(如对吞吐率要求较高、对时延较高等),据此建立的P2P通信也可以更加符合该P2P通信场景对数据传输的诉求。It is understandable that, as shown in the example of the solution in Figure 8 above, the first device and the second device can understand the relevant information of the opposite device before establishing P2P communication, and determine more P2P communication configurations for each other. The P2P communication configuration may correspond to the first device and the second device. Based on this solution, a device with stronger capabilities can be configured as a GO. Unlike the existing solution of using the initiating device as a GO, this solution can better utilize the device capabilities and improve the quality of P2P communication. In some embodiments, the P2P communication configuration may also reflect the characteristics of the current P2P communication (such as higher requirements for throughput, higher latency, etc.), and the P2P communication established accordingly may also be more in line with the P2P communication scenario's demands for data transmission.
以下将结合具体实施例,对如图8所示的技术方案进行举例说明。The technical solution shown in FIG. 8 will be described below with reference to specific embodiments.
示例性的,以P2P请求信息包括第一设备的可用信道信息,以及将要发起P2P通信的类型,P2P通信配置包括P2P通信使用的信道为例。参考图9,为本申请实施例提供的一种通信方法的设备交互示意图。如图9所示,该方案可以包括:For example, the P2P request information includes the available channel information of the first device and the type of P2P communication to be initiated, and the P2P communication configuration includes the channel used for P2P communication. Referring to FIG9 , a schematic diagram of device interaction of a communication method provided in an embodiment of the present application is shown. As shown in FIG9 , the scheme may include:
S901、第一设备确定第一设备的第一可用信道信息,以及P2P通信业务类型。S901. A first device determines first available channel information of the first device and a P2P communication service type.
结合图8中S801的说明,本示例中,在第一设备支持2.4G WIFI通信时,则第一可用信道信息可以包括当前可用于P2P通信的2.4G信道的集合。对应的,在第一设备还支持5G WIFI通信时,则第一可用信道信息可以包括当前可用于P2P通信的2.4G信道以及5G信道的集合。Combined with the description of S801 in FIG8 , in this example, when the first device supports 2.4G WIFI communication, the first available channel information may include a set of 2.4G channels currently available for P2P communication. Correspondingly, when the first device also supports 5G WIFI communication, the first available channel information may include a set of 2.4G channels and 5G channels currently available for P2P communication.
在一些实施例中,在第一设备已经与路由设备建立STA通信的情况下,该用于进行STA通信的信道可以被标注在第一可用信道信息中。比如,该用于进行STA通信的信道为2.4G频段的信道91,则该信道91可以被标注为STA通信信道携带在第一可用信道信息中。In some embodiments, when the first device has established STA communication with the routing device, the channel used for STA communication can be marked in the first available channel information. For example, if the channel used for STA communication is channel 91 of the 2.4G frequency band, then channel 91 can be marked as a STA communication channel and carried in the first available channel information.
如S801中的说明,本示例中,以P2P通信业务类型包括标识1对应的文件分享,标识2对应的投屏,标识3对应的多屏协同。那么,第一设备可以根据用户输入的P2P通信指示,确定当前需要发起的P2P通信业务类型。As described in S801, in this example, the P2P communication service type includes file sharing corresponding to identifier 1, screen projection corresponding to identifier 2, and multi-screen collaboration corresponding to identifier 3. Then, the first device can determine the P2P communication service type that needs to be initiated currently according to the P2P communication indication input by the user.
示例性的,结合图3的说明。第一设备在接收到用户输入的选中文件并分享的操作时,第一设备可以确定P2P通信业务类型为文件分享。对应的,第一设备可以将P2P请求中的第一标识设置为标识1。Exemplarily, in conjunction with the description of FIG3 , when the first device receives the operation of selecting and sharing a file input by the user, the first device may determine that the P2P communication service type is file sharing. Correspondingly, the first device may set the first identifier in the P2P request to identifier 1 .
结合图4的说明。第一设备在接收到用户输入的进行多屏协同的操作时,第一设备可以确定P2P通信业务类型为多屏协同。对应的,第一设备可以将P2P请求中的第一标识设置为标识3。4 . When the first device receives the multi-screen collaboration operation input by the user, the first device may determine that the P2P communication service type is multi-screen collaboration. Correspondingly, the first device may set the first identifier in the P2P request to identifier 3.
结合图5的说明。第一设备在接收到用户输入的投屏指示时,第一设备可以确定P2P通信业务类型为投屏。对应的,第一设备可以将P2P请求中的第一标识设置为标识2。5 . When the first device receives the screen projection instruction input by the user, the first device can determine that the P2P communication service type is screen projection. Correspondingly, the first device can set the first identifier in the P2P request to identifier 2.
S902、第一设备向第二设备发送P2P请求信息。S902: The first device sends P2P request information to the second device.
示例性的,第一设备可以将第一可用信道信息,以及P2P通信业务类型携带在P2P请求信息中,发送给第二设备。Exemplarily, the first device may carry the first available channel information and the P2P communication service type in the P2P request information and send the information to the second device.
S903、第二设备确定第二设备的第二可用信道信息。S903: The second device determines second available channel information of the second device.
结合S901中的说明,在本示例中,第二设备也可以自行确定当前可用的第二可用 信道信息。具体确定的实现方式与第一设备确定第一可用信道信息的方式类似,此处不再赘述。Combined with the description in S901, in this example, the second device can also determine the currently available second available The specific implementation manner of determining the channel information is similar to the manner in which the first device determines the first available channel information, and will not be described in detail herein.
例如,在第二设备的当前可以用于进行P2P通信的信道包括2.4G频段的信道的情况下,该第二可用信道信息可以包括第二设备的4G WIFI可用信道集合。在第二设备的当前可以用于进行P2P通信的信道包括5G频段的信道的情况下,该第二可用信道信息可以包括第二设备的5G WIFI可用信道集合。在第二设备的当前可以用于进行P2P通信的信道包括2.4G频段以及5G频段的信道的情况下,该第二可用信道信息可以包括第二设备的2.4G WIFI可用信道集合,以及第二设备的5G WIFI可用信道集合。For example, in the case where the channels currently available for P2P communication of the second device include channels in the 2.4G frequency band, the second available channel information may include a set of 4G WIFI available channels of the second device. In the case where the channels currently available for P2P communication of the second device include channels in the 5G frequency band, the second available channel information may include a set of 5G WIFI available channels of the second device. In the case where the channels currently available for P2P communication of the second device include channels in the 2.4G frequency band and the 5G frequency band, the second available channel information may include a set of 2.4G WIFI available channels of the second device, and a set of 5G WIFI available channels of the second device.
需要说明的是,在本申请实施例中,该S903的执行与S901-S902的执行可以是同时的,也可以是不分先后地分别在两个设备上执行的。在一些实施例中,该S903的执行可以是在第一设备执行S902之前,或者,该S903的执行可以是在第二设备接收到P2P请求信息之前进行的。由此使得第二设备可以在接收到P2P请求信息之后,即可开始执行以下S904,而不需要的等待收集第二设备的第二可用信道信息,由此提升整个方案的运行效率。It should be noted that, in the embodiment of the present application, the execution of S903 and the execution of S901-S902 can be performed simultaneously, or can be performed on two devices in no particular order. In some embodiments, the execution of S903 can be performed before the first device executes S902, or the execution of S903 can be performed before the second device receives the P2P request information. As a result, the second device can start executing the following S904 after receiving the P2P request information, without waiting for the collection of the second available channel information of the second device, thereby improving the operating efficiency of the entire solution.
S904、第二设备根据P2P通信的类型,第一可用信道信息以及第二可用信道信息,选取P2P通信信道。S904: The second device selects a P2P communication channel according to the type of P2P communication, the first available channel information, and the second available channel information.
示例性的,第二设备可以根据第一可用信道信息,以及第二可用信道信息,确定第一设备和第二设备当前可以用于进行P2P通信的信道。例如,该第一设备和第二设备当前可以用于进行P2P通信的信道可以为第一可用信道信息指示的多个信道集合中,与第二可用信道信息指示的多个信道集合的交集。Exemplarily, the second device may determine the channel that the first device and the second device can currently use for P2P communication based on the first available channel information and the second available channel information. For example, the channel that the first device and the second device can currently use for P2P communication may be the intersection of the multiple channel sets indicated by the first available channel information and the multiple channel sets indicated by the second available channel information.
在一些实施例中,第二设备还可以根据P2P通信的类型,从第一可用信道信息以及第二可用信道信息的交集中包括的信道中进一步筛选与当前通信业务类型向匹配的信道。In some embodiments, the second device may further filter channels matching the current communication service type from channels included in the intersection of the first available channel information and the second available channel information according to the type of P2P communication.
比如,在第二设备确定P2P请求中的第一标识设置为标识1的情况下,则表示该P2P通信为文件分享,对应于对通信过程中的吞吐率有较高要求。由此,第二设备就可以选取第一可用信道信息以及第二可用信道信息的交集中包括的信道中能够提供较高吞吐率的信道。如具有较大带宽的信道,又如5G或更高频段中的信道等。For example, when the second device determines that the first identifier in the P2P request is set to identifier 1, it means that the P2P communication is file sharing, which corresponds to a higher requirement for the throughput rate during the communication process. Therefore, the second device can select a channel that can provide a higher throughput rate from the channels included in the intersection of the first available channel information and the second available channel information. For example, a channel with a larger bandwidth, such as a channel in a 5G or higher frequency band.
又如,在第二设备确定P2P请求中的第一标识设置为标识3或标识2的情况下,则表示该P2P通信对通信过程中的时延有较高要求。由此,第二设备就可以选取第一可用信道信息以及第二可用信道信息的交集中包括的信道中能够提供较低时延的信道。For another example, when the second device determines that the first identifier in the P2P request is set to identifier 3 or identifier 2, it means that the P2P communication has a high requirement for the delay during the communication process. Therefore, the second device can select a channel that can provide a lower delay from the channels included in the intersection of the first available channel information and the second available channel information.
在一些实现中,在第二设备确定了多个可以作为P2P通信信道的情况下,可以在该多个信道中随机选取一个信道作为P2P通信信道。In some implementations, when the second device determines that multiple channels can be used as P2P communication channels, a channel can be randomly selected from the multiple channels as the P2P communication channel.
由此,第二设备就可以结合第一设备以及第二设备的工作情况,以及需要发起的P2P通信的相关信息,综合判断确定进行P2P通信的信道。例如,该确定进行P2P通信的信道可以为第一信道。Thus, the second device can determine the channel for P2P communication based on the working conditions of the first device and the second device and the related information of the P2P communication to be initiated. For example, the channel determined for P2P communication can be the first channel.
S905、第二设备向第一设备发送P2P响应信息。S905. The second device sends P2P response information to the first device.
示例性的,第二设备可以将确定作为P2P通信信道的信道信息携带在P2P响应信息中发送给第一设备。例如,第二设备可以将第一信道的信道号携带在P2P响应信息中发送给第一设备。 Exemplarily, the second device may carry the channel information determined as the P2P communication channel in the P2P response information and send it to the first device. For example, the second device may carry the channel number of the first channel in the P2P response information and send it to the first device.
由此第一设备可以根据P2P响应信息,与第二设备配合,在该第一信道上与第二设备建立P2P通信。Thus, the first device can cooperate with the second device according to the P2P response information to establish P2P communication with the second device on the first channel.
通过如图9所示的方案实现,能够使得第二设备可以准确的合理确定P2P通信使用的信道。作为一种具体的实现,以下结合图10以及图11,对该方案的实施效果进行举例说明。By implementing the solution shown in Figure 9, the second device can accurately and reasonably determine the channel used for P2P communication. As a specific implementation, the implementation effect of the solution is illustrated below in conjunction with Figures 10 and 11.
请参考图10,以第一设备可以用于进行P2P通信的信道包括2.4G频段的信道以及5G频段的信道,第二设备可以用于进行P2P通信的信道包括2.4G频段的信道以及5G频段的信道为例。Please refer to Figure 10, taking the example that the channels that the first device can use for P2P communication include channels in the 2.4G frequency band and channels in the 5G frequency band, and the channels that the second device can use for P2P communication include channels in the 2.4G frequency band and channels in the 5G frequency band.
如图10所示,通过如图9所示的方案,第二设备可以在需要发起文件分享的P2P通信时,在第一设备的5G WIFI可用信道集合与第二设备的5G WIFI可用信道集合的交集中选取第一信道。由此,该第一信道可以为第一设备以及第二设备均可用于进行P2P通信的5G信道,相较于2.4G信道能够提供更高的吞吐率用于实现快速的文件数据传输。As shown in FIG10, through the scheme shown in FIG9, the second device can select the first channel from the intersection of the 5G WIFI available channel set of the first device and the 5G WIFI available channel set of the second device when it needs to initiate P2P communication for file sharing. Thus, the first channel can be a 5G channel that can be used by both the first device and the second device for P2P communication, which can provide a higher throughput rate for fast file data transmission compared to the 2.4G channel.
如图10的示例中,第一设备和第二设备的2.4G WIFI可用信道集合的交集可以不为空。那么,在2.4G WIFI可用信道交集以及5G WIFI可用信道交集均不为空时,电子设备可以灵活地在2.4G WIFI信道以及5G WIFI可用信道中选取作为P2P通信的信道。比如,以如图10所示的文件分享场景为例,电子设备可以在5G WIFI可用信道的交集中选取作为P2P通信的信道。在另一些实施例中,若5G WIFI可用信道交集为空,或者5G WIFI可用信道交集中的信道均不适合作为当前场景中的P2P通信信道,那么电子设备也可以选取2.4G WIFI可用信道交集中的信道作为P2P通信信道。As shown in the example of Figure 10, the intersection of the 2.4G WIFI available channel sets of the first device and the second device may not be empty. Then, when both the intersection of the 2.4G WIFI available channels and the intersection of the 5G WIFI available channels are not empty, the electronic device can flexibly select the 2.4G WIFI channel and the 5G WIFI available channel as the channel for P2P communication. For example, taking the file sharing scenario shown in Figure 10 as an example, the electronic device can select the intersection of the 5G WIFI available channels as the channel for P2P communication. In other embodiments, if the intersection of the 5G WIFI available channels is empty, or the channels in the intersection of the 5G WIFI available channels are not suitable as the P2P communication channels in the current scenario, then the electronic device can also select the channels in the intersection of the 2.4G WIFI available channels as the P2P communication channels.
请参考图11,以第一设备可以用于进行P2P通信的信道包括2.4G频段的信道以及5G频段的信道,第二设备可以用于进行P2P通信的信道包括2.4G频段的信道以及5G频段的信道为例。在本示例中,第一设备可以与路由设备建立有2.4G STA通信,第二设备也可以与路由设备建立有2.4G STA通信。Please refer to Figure 11, taking the example that the channels that the first device can use for P2P communication include channels in the 2.4G frequency band and channels in the 5G frequency band, and the channels that the second device can use for P2P communication include channels in the 2.4G frequency band and channels in the 5G frequency band. In this example, the first device can establish 2.4G STA communication with the routing device, and the second device can also establish 2.4G STA communication with the routing device.
如图11所示,通过如图9所示的方案,第二设备可以在需要发起投屏的P2P通信时,从第一设备的可用信道集合以及第二设备的可用信道集合的交集中,选取合适的信道建立P2P通信连接。As shown in Figure 11, through the solution shown in Figure 9, when the second device needs to initiate P2P communication for screen projection, it can select a suitable channel from the intersection of the available channel set of the first device and the available channel set of the second device to establish a P2P communication connection.
在如图11的示例中,以第一设备和第二设备的可用信道交集包括2.4G WIFI信道以及5G WIFI信道为例。那么第二设备可以选取第一设备以及第二设备均可用的5G WIFI信道建立P2P通信连接,从而支持投屏功能。由此避免使用其他信道(如2.4G WIFI信道)导致的卡顿等情况。In the example shown in Figure 11, the intersection of the available channels of the first device and the second device includes the 2.4G WIFI channel and the 5G WIFI channel. Then the second device can select the 5G WIFI channel available to both the first device and the second device to establish a P2P communication connection, thereby supporting the screen projection function. This avoids the jamming caused by using other channels (such as the 2.4G WIFI channel).
需要说明的是,在如图11的示例中,第一设备以及第二设备可以与路由设备建立有2.4G STA通信。那么,在两个设备均支持DBDC的情况下,两个设备在该2.4G STA通信的基础上,分别建立5G频段的P2P通信。而在两个设备中的至少一个不支持DBDC的情况下,则可以通过断开对应设备的2.4G STA通信,由此建立新的5G P2P通信。例如,以第一设备不支持DBDC为例。第一设备可以提示用户断开当前与路由器的2.4G STA通信连接,以便于建立与第二设备的基于5G频段的P2P通信。作为一种可能的实现,在建立5G频段的P2P通信后,第一设备也可以与路由设备再建立一个与该P2P通信同频段且同信道的STA通信。上述图11对投屏或多屏协同场景下的P2P信道选择进行了示例性说明。在本申请的另一些实施例中,在第一设备支持GO CSA,第二设备不支持 CSA的情况下,则可以选取第一设备作为GO设备。而在第一设备支持GC CSA,第二设备不支持CSA的情况下,则可以格局实际情况灵活选取第一设备或第二设备作为GO设备。以下将结合具体示例,对该GO设备的选取机制进行说明。It should be noted that, in the example of Figure 11, the first device and the second device can establish 2.4G STA communication with the routing device. Then, when both devices support DBDC, the two devices establish P2P communication in the 5G frequency band respectively on the basis of the 2.4G STA communication. In the case where at least one of the two devices does not support DBDC, a new 5G P2P communication can be established by disconnecting the 2.4G STA communication of the corresponding device. For example, take the example that the first device does not support DBDC. The first device can prompt the user to disconnect the current 2.4G STA communication connection with the router in order to establish P2P communication based on the 5G frequency band with the second device. As a possible implementation, after establishing P2P communication in the 5G frequency band, the first device can also establish a STA communication with the routing device that is in the same frequency band and channel as the P2P communication. The above Figure 11 provides an exemplary illustration of P2P channel selection in screen projection or multi-screen collaboration scenarios. In other embodiments of the present application, when the first device supports GO CSA and the second device does not support GO CSA, the first device can disconnect the 2.4G STA communication with the router. In the case of CSA, the first device can be selected as the GO device. In the case of the first device supporting GC CSA and the second device not supporting CSA, the first device or the second device can be flexibly selected as the GO device according to the actual situation. The following will explain the selection mechanism of the GO device with specific examples.
需要说明的是,上述图9-图11的方案说明中,发起端设备(第一设备)可以将相关的信息数据发送给对端设备(第二设备),以便于对端设备可以综合整体情况合理选取进行P2P通信的信道。在一些实施例中,对于GO以及GC的设置可以是类似于前述说明中的将发起端设备(第一设备)作为GO,对端设备(第二设备)作为GC建立P2P通信。在另一些实施例中,第二设备还可以根据设备能力,合理确定P2P通信中的GO以及GC。It should be noted that in the above-mentioned scheme descriptions of Figures 9 to 11, the initiating device (first device) can send relevant information data to the opposite device (second device) so that the opposite device can reasonably select a channel for P2P communication based on the overall situation. In some embodiments, the settings for GO and GC can be similar to the above description of using the initiating device (first device) as the GO and the opposite device (second device) as the GC to establish P2P communication. In other embodiments, the second device can also reasonably determine the GO and GC in P2P communication based on the device capabilities.
作为一种示例,请参考图12,为本申请实施例提供的又一种通信方法的设备交互流程示意图。本示例中,继续以第一设备为发起端设备为例。结合图8和图9的说明,本示例中,P2P请求信息可以包括第一设备的第一能力信息,P2P通信配置包括P2P通信中的GO和GC对应设备的选取。如图12所示,该方案可以包括:As an example, please refer to FIG. 12, which is a schematic diagram of a device interaction process of another communication method provided in an embodiment of the present application. In this example, the first device is still taken as an initiating device. Combined with the description of FIG. 8 and FIG. 9, in this example, the P2P request information may include the first capability information of the first device, and the P2P communication configuration includes the selection of the GO and GC corresponding devices in the P2P communication. As shown in FIG. 12, the scheme may include:
S1201、第一设备确定第一设备的第一能力信息。S1201. A first device determines first capability information of the first device.
S1202、第一设备向第二设备发送P2P请求信息。S1202. The first device sends P2P request information to the second device.
示例性的,第一能力信息可以用于指示第一设备的P2P通信能力。Exemplarily, the first capability information may be used to indicate the P2P communication capability of the first device.
结合S801中的说明,设备的能力信息可以用于指示当前设备所能够支持的通信能力。比如,该设备是否支持DBDC,该设备是否支持GO CSA,该设备是否支持GC CSA等。Combined with the description in S801, the device capability information can be used to indicate the communication capabilities that the current device can support, such as whether the device supports DBDC, whether the device supports GO CSA, whether the device supports GC CSA, etc.
作为一种可能的实现,第一设备可以通过设置P2P请求中第二标识,指示第一能力信息。例如,在第二标识为第一值时,则表示第一设备支持DBDC。在第二标识为第二值时,则表示第一设备支持GO CSA。在第二标识为第三值时,则表示第一设备同时支持DBDC以及GO CSA。在第二标识为第四值时,则标识第一设备支持GC CSA。在第二标识为第五值时,则表示第一设备同时支持DBDC以及GC CSA。在第二标识为第六值时,则表示第一设备同时支持DBDC以及GC CSA和GO CSA。在第二标识为第七值时,则表示第一设备同时支持GC CSA和GO CSA。As a possible implementation, the first device may indicate the first capability information by setting the second identifier in the P2P request. For example, when the second identifier is the first value, it indicates that the first device supports DBDC. When the second identifier is the second value, it indicates that the first device supports GO CSA. When the second identifier is the third value, it indicates that the first device supports both DBDC and GO CSA. When the second identifier is the fourth value, it indicates that the first device supports GC CSA. When the second identifier is the fifth value, it indicates that the first device supports both DBDC and GC CSA. When the second identifier is the sixth value, it indicates that the first device supports DBDC, GC CSA, and GO CSA. When the second identifier is the seventh value, it indicates that the first device supports both GC CSA and GO CSA.
S1203、第二设备确定第二设备的第二能力信息。S1203: The second device determines second capability information of the second device.
类似于第一设备的操作,第二设备也可以确定第二设备对应的第二能力信息。由此使得第二设备可以确定当前是否支持DBDC和/或CSA。Similar to the operation of the first device, the second device may also determine the second capability information corresponding to the second device, thereby enabling the second device to determine whether DBDC and/or CSA is currently supported.
在不同实现中,该S1203与S1201-S1202的执行先后顺序可以是不做限定的。在一些实施例中,第二设备可以在接收到P2P请求信息之前,执行该S1203,以便于接收到P2P请求信息中携带的第一能力信息之后,第二设备即可执行以下S1204,实现方案的快速推进。In different implementations, the execution order of S1203 and S1201-S1202 may not be limited. In some embodiments, the second device may execute S1203 before receiving the P2P request information, so that after receiving the first capability information carried in the P2P request information, the second device can execute the following S1204 to achieve rapid advancement of the solution.
S1204、第二设备根据第一能力信息以及第二能力信息,确定作为GO的设备。S1204: The second device determines a device to serve as a GO according to the first capability information and the second capability information.
示例性的,在一些实施例中,第二设备可以根据第二设备的能力信息,以及第一设备的能力信息,将能力更强的设备作为GO。结合图13的示例,第二设备在GO设备的选取过程中,同时支持DBDC以及CSA的设备作为GO设备的优先级更高。Exemplarily, in some embodiments, the second device may select a device with stronger capability as the GO according to the capability information of the second device and the capability information of the first device. In conjunction with the example of FIG13 , in the selection process of the GO device by the second device, the device supporting both DBDC and CSA has a higher priority as the GO device.
作为一种可能的实现,在一个设备支持DBDC或CSA中的一项或者均不支持,另一个设备同时支持DBDC以及CSA的情况下,则该同时支持DBDC以及CSA的设备能力更强, 可以作为GO。在一个设备支持DBDC或CSA中的一项,另一个设备不支持DBDC以及CSA的情况下,则该支持DBDC或CSA的设备能力更强,可以作为GO。As a possible implementation, if one device supports one or neither of DBDC and CSA, and another device supports both DBDC and CSA, then the device supporting both DBDC and CSA has a stronger capability. Can be used as a GO. If one device supports DBDC or CSA and the other device does not support DBDC and CSA, the device that supports DBDC or CSA has a stronger capability and can be used as a GO.
在另一些实施例中,第一设备和第二设备的能力可能相同或相近。In other embodiments, the capabilities of the first device and the second device may be the same or similar.
例如,一个设备支持DBDC,另一个设备支持CSA。或者两个设备均支持DBDC或者CSA。那么,第二设备就可以结合其他通信条件(如是否建立STA通信),确定作为GO的设备。For example, one device supports DBDC and the other device supports CSA. Or both devices support DBDC or CSA. Then, the second device can determine the device as GO in combination with other communication conditions (such as whether STA communication is established).
比如,在第二设备已经建立有5G STA通信,且两个设备均支持GO CSA,那么第二设备就可以确定第二设备作为GO设备。由此使得第二设备可以在STA通信切换到其他5G信道时,控制P2P通信跟随STA信道的切换,实现在5G频段下的同频同信道通信。For example, if the second device has established 5G STA communication and both devices support GO CSA, the second device can determine that the second device is the GO device. This allows the second device to control P2P communication to follow the switching of STA channels when STA communication switches to other 5G channels, thus achieving co-frequency and co-channel communication in the 5G frequency band.
S1205、第二设备向第一设备发送P2P响应信息。S1205. The second device sends P2P response information to the first device.
结合S1204的说明,第二设备在确定作为GO的设备后,可以将该设备的设备信息(如设备标识等)携带在P2P响应信息中,发送给第一设备。In combination with the description of S1204, after determining the device to be the GO, the second device may carry the device information (such as the device identification, etc.) of the device in the P2P response information and send it to the first device.
这样,根据该P2P响应信息建立的P2P连接中,GO设备可以是具有更强能力的设备。由此保证后续P2P通信过程的高质量进行。In this way, in the P2P connection established according to the P2P response information, the GO device can be a device with stronger capabilities, thereby ensuring high quality of the subsequent P2P communication process.
作为一种示例,在如图12所示的方案执行过程中,若第一设备支持DBDC,第二设备不支持DBDC,那么第一设备可以作为GO设备。反之,若第一设备不支持DBDC,第二设备支持DBDC,那么第二设备可以作为GO设备。若两个设备均不支持DBDC,第一设备支持GO CSA,第二设备不支持GO CSA,那么第一设备可以作为GO设备。反之,第一设备不支持GO CSA,第二设备支持GO CSA,那么第一设备可以作为GO设备。As an example, during the execution of the solution shown in FIG. 12, if the first device supports DBDC and the second device does not support DBDC, then the first device can be used as a GO device. On the contrary, if the first device does not support DBDC and the second device supports DBDC, then the second device can be used as a GO device. If both devices do not support DBDC, the first device supports GO CSA and the second device does not support GO CSA, then the first device can be used as a GO device. On the contrary, if the first device does not support GO CSA and the second device supports GO CSA, then the first device can be used as a GO device.
在另一些实现中,该如图12所示的方案实现还可以结合当前正在连接中的STA通信进行。比如,在GO设备的STA信道发生切换时,GO设备可以基于GO CSA能力,控制P2P信道跟随STA信道进行切换,保持同频同信道工作。又如,在GO设备的STA信道为2.4G信道时,GO设备可以基于DBDC能力,控制P2P信道工作在5G信道,从而通过5G信道使得P2P通信的吞吐率得到保证。In other implementations, the solution shown in FIG12 can also be implemented in conjunction with the currently connected STA communication. For example, when the STA channel of the GO device switches, the GO device can control the P2P channel to switch with the STA channel based on the GO CSA capability to maintain the same frequency and channel operation. For another example, when the STA channel of the GO device is a 2.4G channel, the GO device can control the P2P channel to work in a 5G channel based on the DBDC capability, thereby ensuring the throughput of P2P communication through the 5G channel.
可以理解的是,在如图12的示例中,第二设备可以选取具有更强能力的设备作为GO设备。那么,在不同实现中,P2P通信中的信道选取可以是灵活的。It is understandable that, in the example of Figure 12, the second device may select a device with stronger capabilities as the GO device. Then, in different implementations, channel selection in P2P communication may be flexible.
例如,在一些实施例中,P2P通信中的信道选取可以是跟随STA通信信道的。在另一些实施例中,P2P通信中的信道选取也可以根据预设信道确定的。For example, in some embodiments, the channel selection in P2P communication may follow the STA communication channel. In other embodiments, the channel selection in P2P communication may also be determined according to a preset channel.
在另一些实施例中,该如图12所示的方案还可以与如图9所示的方案结合,以便于在发起P2P通信之前,可以更加合理地选取P2P通信中的信道,以及作为GO的设备。由此保证后续的P2P通信能够更加高效的执行。In other embodiments, the solution shown in FIG. 12 can also be combined with the solution shown in FIG. 9 , so that before initiating P2P communication, the channel in P2P communication and the device as GO can be more reasonably selected, thereby ensuring that subsequent P2P communication can be performed more efficiently.
作为一种示例,结合图9以及图12,请参考图14,为本申请实施例提供的又一种通信方法的设备间交互示意图。As an example, in combination with Figures 9 and 12, please refer to Figure 14, which is a schematic diagram of device interaction of another communication method provided in an embodiment of the present application.
如图14所示,该方案可以包括:As shown in FIG. 14 , the solution may include:
S1401、第一设备确定第一设备的第一可用信道信息,P2P通信业务类型,以及第一设备的第一能力信息。S1401. A first device determines first available channel information of the first device, a P2P communication service type, and first capability information of the first device.
S1402、第一设备向第二设备发送P2P请求信息。其中,P2P请求信息包括第一可用信道信息,P2P通信业务类型,以及第一设备的第一能力信息。S1402: The first device sends P2P request information to the second device, wherein the P2P request information includes first available channel information, a P2P communication service type, and first capability information of the first device.
S1403、第二设备确定第二设备的第一可用信道,以及第二设备的第二能力信息。 S1403: The second device determines a first available channel of the second device and second capability information of the second device.
S1404、第二设备根据P2P请求信息以及第二设备信息,确定P2P通信信道以及作为GO的设备。S1404: The second device determines a P2P communication channel and a device serving as a GO according to the P2P request information and the second device information.
S1405、第二设备向第一设备发送P2P响应信息。其中,P2P响应信息包括P2P通信配置,P2P通信配置包括P2P通信中的信道,以及作为GO的设备指示。S1405: The second device sends P2P response information to the first device, wherein the P2P response information includes a P2P communication configuration, and the P2P communication configuration includes a channel in P2P communication and an indication of a device serving as a GO.
可以理解的是,上述S1401-S1405的执行,可以参考图9所示的S901-S905以及图12所示的S1201-S1205实现,具体执行措施可以互相参考,此处不再赘述。It can be understood that the execution of the above S1401-S1405 can be implemented with reference to S901-S905 shown in Figure 9 and S1201-S1205 shown in Figure 12. The specific implementation measures can be referenced to each other and will not be repeated here.
结合如图14所示的技术方案,在开始进行P2P通信之前,第二设备可以更加合理地选取进行P2P通信的信道以及在P2P通信过程中作为GO的设备。这样能够使得P2P通信更加合理,通信效率得到显著的提升。In combination with the technical solution shown in FIG14 , before starting P2P communication, the second device can more reasonably select a channel for P2P communication and a device to be used as a GO during P2P communication, which can make P2P communication more reasonable and significantly improve communication efficiency.
上述图9-图14,分别给出了几种实现如图8所示的通信逻辑的具体示例。在这些示例中,第二设备可以从逻辑判断的角度,根据具体的可用信道信息、通信业务类型和/或设备的能力信息,综合判断确定P2P通信配置。The above-mentioned Figures 9 to 14 respectively provide several specific examples of implementing the communication logic shown in Figure 8. In these examples, the second device can comprehensively determine the P2P communication configuration from the perspective of logical judgment according to specific available channel information, communication service type and/or device capability information.
在本申请的另一些实施例中,通过预配置项的打分机制,也能够实现如图8所示的处理逻辑。其中,预配置项可以包括针对每个可用信道以及当前设备的一个或多个打分维度。In other embodiments of the present application, the processing logic shown in FIG8 can also be implemented through a scoring mechanism of pre-configured items, wherein the pre-configured items may include one or more scoring dimensions for each available channel and the current device.
例如,该预配置项可以包括以下中的至少一项:信道为4G/5G/6G WIFI信道,设备是否支持5G,设备是否支持DBDC,信道是否为动态频率选择(Dynamic Frequency Selection,DFS)信道,设备是否支持CSA,设备的信道切换能力,将要建立的P2P通信为该设备的第一路P2P通信或第二路P2P通信,当前STA、P2P0和/或P2P1的连接状态和信道,当前设备支持SISO或MIMO,当前设备是否支持基于11ax的P2P通信,发起P2P通信的应用程序是否指定GO设备,P2P通信对应业务类型对吞吐率的要求,当前信道的繁忙程度,如果选择当前信道是否会对已有业务产生影响。For example, the pre-configuration item may include at least one of the following: the channel is a 4G/5G/6G WIFI channel, whether the device supports 5G, whether the device supports DBDC, whether the channel is a dynamic frequency selection (DFS) channel, whether the device supports CSA, the channel switching capability of the device, the P2P communication to be established is the first P2P communication or the second P2P communication of the device, the current connection status and channel of STA, P2P0 and/or P2P1, the current device supports SISO or MIMO, whether the current device supports P2P communication based on 11ax, whether the application initiating P2P communication specifies the GO device, the throughput requirements of the corresponding service type of P2P communication, the busyness of the current channel, and whether selecting the current channel will affect the existing services.
其中,P2P0用于标示当前设备的第一路P2P通信,P2P1用于标示当前设备的第二路P2P通信。当前信道的繁忙程度可以通过检测当前信道的冲突/撞包率标识。在一些实施例中,上述预配置项中的“设备是否支持CSA”,还可以具体细化为“设备是否支持GO CSA”,以及“设备是否支持GC CSA”。Among them, P2P0 is used to indicate the first P2P communication of the current device, and P2P1 is used to indicate the second P2P communication of the current device. The busyness of the current channel can be identified by detecting the conflict/packet collision rate of the current channel. In some embodiments, the "whether the device supports CSA" in the above pre-configuration item can also be specifically refined into "whether the device supports GO CSA" and "whether the device supports GC CSA".
需要说明的是,在本申请的一些实施例中,针对不同的P2P通信业务类型,预配置项的选取可以是不同的。It should be noted that, in some embodiments of the present application, the selection of pre-configuration items may be different for different P2P communication service types.
例如,以P2P通信业务类型为投屏等要求低延时的场景为例。For example, take a scenario where the P2P communication service type is screen projection and requires low latency.
预配置项可以包括:信道为4G/5G/6G WIFI信道;信道是否为动态频率选择(Dynamic Frequency Selection,DFS)信道;设备是否支持CSA。Pre-configuration items may include: whether the channel is a 4G/5G/6G WIFI channel; whether the channel is a dynamic frequency selection (DFS) channel; whether the device supports CSA.
可以理解的是,对于该场景的信道选取,DFS信号由于需要进行雷达信号的通信。因此,在一些实施例中,该投屏等要求低延时的场景下,优选非DFS信道作为P2P通信信道。It is understandable that for the channel selection in this scenario, the DFS signal needs to communicate the radar signal. Therefore, in some embodiments, in the scenario where low latency is required, such as screen projection, a non-DFS channel is preferably used as the P2P communication channel.
以P2P通信业务类型为文件传输等要求高吞吐的场景为例。Take the scenario where the P2P communication service type is file transfer and requires high throughput as an example.
预配置项可以包括:信道为4G/5G/6G WIFI信道;设备是否支持5G;信道是否为动态频率选择(Dynamic Frequency Selection,DFS)信道。可选的,该场景下的预配置项还可以包括当前STA、P2P0和/或P2P1的连接状态和信道。The pre-configuration items may include: whether the channel is a 4G/5G/6G WIFI channel; whether the device supports 5G; whether the channel is a dynamic frequency selection (DFS) channel. Optionally, the pre-configuration items in this scenario may also include the connection status and channel of the current STA, P2P0 and/or P2P1.
可以理解的是,类似于投屏场景的示例。在该文件传输场景下,优选非DFS信道作 为P2P通信信道。It can be understood that, similar to the example of the screen projection scenario, in this file transfer scenario, non-DFS channels are preferred. It is a P2P communication channel.
需要说明的是,在一些实施例中,上述不同场景下所适用的预配置项,并不局限与上述示例中的几个。在各个场景下使用的预配置项可以通过配置不同的权重,提升对应场景下重点预配置项(如上述示例中与各个场景相对应的预配置项)在最终信道/GO选取时的重要程度。It should be noted that, in some embodiments, the preconfiguration items applicable to the above different scenarios are not limited to the ones in the above examples. The preconfiguration items used in each scenario can be configured with different weights to enhance the importance of the key preconfiguration items in the corresponding scenario (such as the preconfiguration items corresponding to each scenario in the above examples) in the final channel/GO selection.
基于此,第一设备以及第二设备可以分别对可以用于进行P2P通信的信道中的每一个,按照预配置项进行逐项打分,由此获取每个设备上每个信道对应的打分结果。由于预配置项中同时包括了对当前信道的判决条件(如是否为4G/5G/6G WIFI信道等),以及对当前设备的判决条件(如设备是否支持DBDC等),因此该以信道为粒度的打分结果可以同时体现信道以及设备的综合能力。Based on this, the first device and the second device can score each of the channels that can be used for P2P communication according to the pre-configured items, thereby obtaining the scoring results corresponding to each channel on each device. Since the pre-configured items include both the judgment conditions for the current channel (such as whether it is a 4G/5G/6G WIFI channel, etc.) and the judgment conditions for the current device (such as whether the device supports DBDC, etc.), the scoring results based on the channel granularity can reflect the comprehensive capabilities of the channel and the device at the same time.
示例性的,以可以用于进行P2P通信的信道包括信道1-信道n为例。Exemplarily, it is taken as an example that the channels that can be used for P2P communication include channel 1 to channel n.
第一设备可以针对信道1-信道n中的每一个,按照预设配置项进行打分。以预设配置项包括信道为4G/5G/6G WIFI信道,当前STA、P2P0和/或P2P1的连接状态和信道,设备是否支持DBDC为例。The first device may score each of channels 1 to n according to preset configuration items. For example, the preset configuration items include whether the channel is a 4G/5G/6G WIFI channel, the current STA, P2P0 and/or P2P1 connection status and channel, and whether the device supports DBDC.
以下表1示出了一种信道为4G/5G/6G WIFI信道的预配置项打分方案的示意。The following Table 1 shows a schematic diagram of a pre-configuration item scoring scheme for a 4G/5G/6G WIFI channel.
表1
Table 1
如表1所示,以信道1为例。在信道1为6G WIFI信道时,则该项打分为20分。在信道1为5G WIFI信道时,则该项打分为10分。在信道1为4G WIFI信道时,则该项打分为5分。其他信道类似。可以看到,在如表1的示例中,具有最大通信速率的6G分数最高,5G分数低于6G,4G最低。这样即可优选速率更高的通信协议下的信道进行P2P通信,由此获取更好的通信体验。As shown in Table 1, take channel 1 as an example. When channel 1 is a 6G WIFI channel, the score for this item is 20 points. When channel 1 is a 5G WIFI channel, the score for this item is 10 points. When channel 1 is a 4G WIFI channel, the score for this item is 5 points. Other channels are similar. It can be seen that in the example in Table 1, 6G with the maximum communication rate has the highest score, 5G has a lower score than 6G, and 4G has the lowest score. In this way, channels with higher communication protocols can be selected for P2P communication, thereby obtaining a better communication experience.
需要说明的是,在本申请的一些实施例中,5G分类下还可以进一步划分为两部分。例如,5G WIFI信道中除165信道外的信道打分均为10,5G WIFI信道的165信道打分可以为7。这样,在5G WIFI信道中具有较低带宽的165信道的分数稍低于其他信道,以便于在有多个5G WIFI信道可选时,可以选择具有更大带宽的信道建立P2P通信。It should be noted that in some embodiments of the present application, the 5G classification can be further divided into two parts. For example, the scores of all channels except channel 165 in the 5G WIFI channel are 10, and the score of channel 165 in the 5G WIFI channel can be 7. In this way, the score of channel 165 with a lower bandwidth in the 5G WIFI channel is slightly lower than that of other channels, so that when there are multiple 5G WIFI channels to choose from, a channel with a larger bandwidth can be selected to establish P2P communication.
由此,第一设备就可以基于表1的示例,实现对各个信道在当前预配置项(如信道为4G/5G/6G WIFI信道)的打分。Therefore, the first device can score each channel in the current pre-configured items (such as the channel is a 4G/5G/6G WIFI channel) based on the example in Table 1.
以下表2示出了一种当前STA、P2P0和/或P2P1的连接状态,设备是否支持DBDC的预配置项打分方案的示意。 Table 2 below shows a schematic diagram of a scoring scheme for pre-configuration items of the current STA, P2P0 and/or P2P1 connection status and whether the device supports DBDC.
表2
Table 2
如表2所示,以第一设备对信道1进行打分为例。在第一设备当前没有与路由设备的STA通信或与其他设备的P2P连接时,则当前预配置项的打分为20。在第一设备当前存在与信道1同频同信道的连接(如STA通信连接)时,则打分为20。在第一设备当前存在与信道1同频异信道的连接(如STA通信连接)时,则打分为5。在第一设备当前存在与信道1异频异信道的连接(如STA通信连接),但是第一设备不支持DBDC时,则打分为5。在第一设备支持DBDC时,无论是否存在已建立的通信连接,打分都可为10。As shown in Table 2, take the scoring of channel 1 by the first device as an example. When the first device currently has no STA communication with the routing device or P2P connection with other devices, the score of the current pre-configuration item is 20. When the first device currently has a connection with the same frequency and channel as channel 1 (such as a STA communication connection), the score is 20. When the first device currently has a connection with the same frequency and channel as channel 1 (such as a STA communication connection), the score is 5. When the first device currently has a connection with a different frequency and channel than channel 1 (such as a STA communication connection), but the first device does not support DBDC, the score is 5. When the first device supports DBDC, the score can be 10 regardless of whether there is an established communication connection.
其他信道类似与信道1的打分示例。The scoring examples for other channels are similar to that for channel 1.
由此,第一设备就可以基于表2的示例,实现对各个信道在当前预配置项(如当前STA、P2P0和/或P2P1的连接状态,设备是否支持DBDC)的打分。Therefore, the first device can score each channel in the current pre-configuration items (such as the current STA, P2P0 and/or P2P1 connection status, whether the device supports DBDC) based on the example in Table 2.
需要说明的是,上述如表1以及表2仅为一种示例。从直接打分的角度,示出了两个预配置项的打分机制示例。并不构成对本申请中对预配置项的打分规则的限定。It should be noted that the above Tables 1 and 2 are only examples. From the perspective of direct scoring, two examples of scoring mechanisms for pre-configuration items are shown, and they do not constitute a limitation on the scoring rules for pre-configuration items in this application.
示例性的,在另一些实施例中,每个预配置项还可以设置有对应的权重,用于在不同场景下调整各个预配置项在总体打分中的占比。例如,“信道为4G/5G/6G WIFI信道”的预配置项的权重可以设置为31。那么,该预配置项的最终打分结果即可为如表1所示的打分乘以权重(31)获取。又如,“当前STA、P2P0和/或P2P1的连接状态,设备是否支持DBDC”的预配置项的权重可以设置为8。那么,该预配置项的最终打分结果即可为如表2所示的打分乘以权重(8)获取。Exemplarily, in other embodiments, each preconfiguration item may also be provided with a corresponding weight, which is used to adjust the proportion of each preconfiguration item in the overall score in different scenarios. For example, the weight of the preconfiguration item "the channel is a 4G/5G/6G WIFI channel" may be set to 31. Then, the final scoring result of the preconfiguration item may be obtained by multiplying the score shown in Table 1 by the weight (31). For another example, the weight of the preconfiguration item "the current connection status of STA, P2P0 and/or P2P1, whether the device supports DBDC" may be set to 8. Then, the final scoring result of the preconfiguration item may be obtained by multiplying the score shown in Table 2 by the weight (8).
此外,在另一些实施例中,第一设备可以针对一些特殊的预配置项的打分进行特殊调整,由此优化当前信道的打分结果的效果。In addition, in some other embodiments, the first device may make special adjustments to the scores of some special pre-configuration items, thereby optimizing the effect of the scoring result of the current channel.
例如,在预配置项包括“发起P2P通信的应用程序是否指定GO设备”,且应用程序指示第一设备作为GO设备的情况下,则第一设备可以对该项的权重和/或分数进行调整。比如,将权重调整为10000。For example, if the preconfigured item includes "whether the application initiating P2P communication specifies a GO device", and the application indicates that the first device is a GO device, the first device may adjust the weight and/or score of the item, for example, adjusting the weight to 10,000.
又如,根据当前设备的具体产品规格对各个预配置项的权重和/或分数进行自适应调整。For another example, the weight and/or score of each pre-configuration item is adaptively adjusted according to the specific product specifications of the current device.
以此类推,第一设备可以针对信道1,获取各个预配置项的打分结果。那么,第一设备对该信道1的打分结果可以为,各个预配置项的打分结果之和。By analogy, the first device may obtain the scoring results of each pre-configuration item for channel 1. Then, the scoring result of the first device for the channel 1 may be the sum of the scoring results of each pre-configuration item.
针对其他信道,第一设备可以执行类似的打分处理,从而获取其他信道(如信道2-信道n)各自对应的打分结果。For other channels, the first device may perform similar scoring processing to obtain scoring results corresponding to other channels (such as channel 2 to channel n).
可以理解的是,第二设备也可以针对信道1-信道n中的每一个,按照上述机制实现对每个信道的打分,从而获取n个信道各自对应的n个打分结果。 It is understandable that the second device may also score each channel in accordance with the above mechanism for each of channels 1 to n, thereby obtaining n scoring results corresponding to the n channels.
在本示例中,第一设备可以将n个信道中每个信道的打分结果携带在P2P请求信息中,发送给第二设备。这样,第二设备就能够同时知晓每个可用信道在第一设备以及第二设备上的打分结果。In this example, the first device may carry the scoring result of each of the n channels in the P2P request information and send it to the second device, so that the second device can know the scoring result of each available channel on the first device and the second device at the same time.
示例性的,如图15所示,第二设备通过P2P请求信息可以分别知晓第一设备对信道1的打分为分数a1,第一设备对信道2的打分为分数a2,……,第一设备对信道n的打分为分数an。此外,第二设备还可以自行对信道1-信道n打分,获取第二设备对信道1的打分为分数b1,第二设备对信道2的打分为分数b2,……,第二设备对信道n的打分为分数bn。Exemplarily, as shown in FIG15 , the second device can learn through the P2P request information that the first device scores channel 1 as score a1, the first device scores channel 2 as score a2, ..., and the first device scores channel n as score an. In addition, the second device can also score channels 1-channel n by itself, and obtain the second device's score for channel 1 as score b1, the second device's score for channel 2 as score b2, ..., and the second device's score for channel n as score bn.
接着,第二设备就可以根据各个设备对各个信道的打分结果,确定将要发起P2P通信的信道以及作为GO的设备。Then, the second device can determine the channel for initiating P2P communication and the device serving as the GO according to the scoring results of each device on each channel.
示例性的,第二设备可以将每个信道的两个设备打分相加,获取该信道的双端设备打分结果。在一些实施例中,第二设备可以将打分最高的信道作为P2P通信的信道。Exemplarily, the second device may add the scores of the two devices in each channel to obtain the scoring result of the two-end devices in the channel. In some embodiments, the second device may use the channel with the highest score as the channel for P2P communication.
作为一种示例,如图16所示,第二设备可以将分数a1与分数b1相加,获取信道1的双端设备打分:分数c1。第二设备可以将分数a2与分数b2相加,获取信道2的双端设备打分:分数c2。第二设备可以将分数an与分数bn相加,获取信道n的双端设备打分:分数cn。这样,第二设备可以对比分数c1-分数cn确定双端设备打分最大的一项,由此确定P2P通信的信道。例如,分数c1-分数cn中,分数c2为最大值。那么,该分数c2对应的信道2即可确定为P2P通信的信道。As an example, as shown in FIG16 , the second device can add score a1 to score b1 to obtain the score of the two-end device of channel 1: score c1. The second device can add score a2 to score b2 to obtain the score of the two-end device of channel 2: score c2. The second device can add score an to score bn to obtain the score of the two-end device of channel n: score cn. In this way, the second device can compare score c1-score cn to determine the item with the largest score of the two-end device, thereby determining the channel for P2P communication. For example, among score c1-score cn, score c2 is the maximum value. Then, channel 2 corresponding to score c2 can be determined as the channel for P2P communication.
在另一些实施例中,在存在两个或多个信道的双端设备打分相同且最高时,则第二设备可以选取中的任一个信道作为P2P通信的信道。In other embodiments, when there are two or more channels with the same and highest scores given by the dual-end devices, the second device may select any one of the channels as the channel for P2P communication.
在本示例中,在选取P2P通信的信道之后,第二设备可以对比两个设备对该信道的打分,将打分更高的设备作为GO设备,对应的打分较低的设备作为GC设备。In this example, after selecting a channel for P2P communication, the second device may compare the scores of the two devices on the channel, and use the device with a higher score as a GO device and the corresponding device with a lower score as a GC device.
例如,继续结合如图16的示例。在将信道2确定为P2P通信的信道后,第二设备可以对比第一设备对信道2的打分(如分数a2)以及第二设备对信道2的打分(如分数b2)。由此将对信道2打分更高的设备作为GO,对应的,将对信道2打分较低的设备作为GC。比如,以分数b2大于分数a2为例。那么第二设备就可以将第二设备作为GO,将第一设备作为GO。For example, continue with the example shown in Figure 16. After determining channel 2 as a channel for P2P communication, the second device can compare the score of channel 2 given by the first device (such as score a2) and the score of channel 2 given by the second device (such as score b2). Thus, the device with a higher score for channel 2 is used as the GO, and correspondingly, the device with a lower score for channel 2 is used as the GC. For example, take the example where score b2 is greater than score a2. Then the second device can use the second device as the GO and the first device as the GO.
这样,通过打分机制,使得第二设备可以快速地经过简单计算,即可合理确定P2P通信的信道以及作为GO的设备。接着,第二设备可以将该P2P通信的信道以及作为GO的设备发送给第一设备,以便于第一设备可以据此与第二设备配合,建立P2P通信连接。In this way, through the scoring mechanism, the second device can quickly and simply calculate and reasonably determine the P2P communication channel and the device as GO. Then, the second device can send the P2P communication channel and the device as GO to the first device, so that the first device can cooperate with the second device to establish a P2P communication connection.
需要说明的是,在上述示例中,对第一设备与第二设备自行打分的机制进行了举例说明。在本申请的另一些实施例中,该打分的操作可以是在同一个设备上执行的。例如,作为发起端设备的第一设备,可以将第一设备的能力信息(如是否支持5G/6G,是否支持DBDC,是否支持CSA GO/CSA GC等)发送给第二设备,由此使得第二设备可以根据预设在第二设备中的打分机制获取第一设备对应于各个信道的打分结果。此外,第二设备还可以根据第二设备中的打分机制,获取第二设备对应于各个信道的打分结果。It should be noted that in the above example, the mechanism of self-scoring of the first device and the second device is illustrated. In other embodiments of the present application, the scoring operation can be performed on the same device. For example, the first device, which is an initiating device, can send the capability information of the first device (such as whether it supports 5G/6G, whether it supports DBDC, whether it supports CSA GO/CSA GC, etc.) to the second device, so that the second device can obtain the scoring results of the first device corresponding to each channel according to the scoring mechanism preset in the second device. In addition, the second device can also obtain the scoring results of the second device corresponding to each channel according to the scoring mechanism in the second device.
基于该机制,第一设备无需进行打分,因此第一设备中就可以不设置上述如图表1或表2所示的打分机制。该通过第二设备打分的实现,也能够避免各个设备中打分机制(和/或预配置项)的不同导致的打分置信度低,无法互相比对的问题。 Based on this mechanism, the first device does not need to perform scoring, so the first device does not need to set the scoring mechanism shown in Figure 1 or Table 2. The implementation of scoring by the second device can also avoid the problem of low scoring confidence and inability to compare with each other due to different scoring mechanisms (and/or pre-configured items) in each device.
作为一种示例,请参考图17,为本申请实施例提供的又一种通信方法的设备间交互的流程示意图。通过该如图17所示的方案,能够实现上述如图15-图16所示说明中的打分机制。进而基于该打分机制,确定与将要发起的P2P通信相对应的P2P通信的信道以及作为GO的设备。其中,继续以第一设备作为发起端设备为例。As an example, please refer to FIG. 17, which is a flow chart of another device-to-device interaction method provided in an embodiment of the present application. Through the scheme shown in FIG. 17, the scoring mechanism described in the above-mentioned FIG. 15-FIG. 16 can be implemented. Based on the scoring mechanism, the P2P communication channel corresponding to the P2P communication to be initiated and the device serving as the GO are determined. Here, the first device is taken as the initiating device as an example.
在该如图17的示例中,第二设备可以用于对各个设备(如第一设备以及第二设备)进行打分。该打分的操作可以是对应于每个设备,以信道为单位,基于设置在第二设备中的预配置项以及预设的打分机制进行的操作。其中,预设的打分机制可以指示当前设备以及信道对应于不同预配置项的打分大小和/或权重大小。In the example shown in FIG. 17 , the second device may be used to score each device (such as the first device and the second device). The scoring operation may be performed on a channel-by-channel basis on each device based on pre-configured items set in the second device and a preset scoring mechanism. The preset scoring mechanism may indicate the score size and/or weight size of the current device and channel corresponding to different pre-configured items.
如图17所述,该方案可以包括:As shown in FIG. 17 , the solution may include:
S1701、第一设备以及第二设备确定可用P2P信道集合。S1701. The first device and the second device determine an available P2P channel set.
其中,可用P2P信道集合可以是能够用于进行P2P通信的信道的集合。结合上述S801中的说明,第一设备以及第二设备可以分别确定能够进行P2P通信的信道。该第一设备与第二设备的可用P2P信道的交集即可构成该能够用于进行P2P通信的信道的集合。The available P2P channel set may be a set of channels that can be used for P2P communication. In combination with the description in S801 above, the first device and the second device may respectively determine channels that can be used for P2P communication. The intersection of the available P2P channels of the first device and the second device may constitute the set of channels that can be used for P2P communication.
S1702、第一设备向第二设备发送P2P请求信息。该P2P请求信息中可以包括第一设备的第一能力信息。S1702: The first device sends P2P request information to the second device. The P2P request information may include first capability information of the first device.
示例性的,结合前述说明,第一能力信息可以用于指示第一设备是否支持DBDC,和/或是否支持GO CSA,和/或是否支持GC CSA。Exemplarily, in combination with the foregoing description, the first capability information can be used to indicate whether the first device supports DBDC, and/or whether it supports GO CSA, and/or whether it supports GC CSA.
S1703、第二设备根据P2P请求信息,获取第一设备对应的第一打分结果。S1703: The second device obtains a first scoring result corresponding to the first device according to the P2P request information.
S1704、第二设备根据第二设备的第二能力信息,获取第二设备对应的第二打分结果。S1704: The second device obtains a second scoring result corresponding to the second device according to the second capability information of the second device.
结合前述说明,该打分操作可以是分别针对每个设备进行的。In combination with the above description, the scoring operation may be performed for each device separately.
例如,以对第一设备进行打分为例。该第一打分结果可以包括:根据第一能力信息,对每个可用P2P信道结合中的信道,根据预设的打分机制以及预配置项进行打分操作获取的打分结果。For example, taking scoring of the first device as an example, the first scoring result may include: a scoring result obtained by scoring each channel in the available P2P channel combination according to the first capability information and according to a preset scoring mechanism and pre-configured items.
类似的,以对第二设备进行打分为例。该第二打分结果可以包括:根据第二能力信息,对每个可用P2P信道结合中的信道所,根据预设的打分机制以及预配置项进行打分操作获取的结果。Similarly, taking scoring of the second device as an example, the second scoring result may include: a result obtained by scoring the channels in each available P2P channel combination according to the second capability information and according to a preset scoring mechanism and pre-configured items.
S1705、第二设备根据第一打分结果以及第二打分结果,确定P2P通信配置。S1705. The second device determines a P2P communication configuration according to the first scoring result and the second scoring result.
示例性的,P2P通信配置可以包括用于进行P2P通信的信道,以及作为GO的设备。Exemplarily, the P2P communication configuration may include a channel for performing P2P communication, and a device serving as a GO.
结合上述图15以及图16的说明,第二设备可以根据各个设备对各个信道的打分,确定各个信道对应的双端设备打分。根据双端设备打分,确定打分最大的信道作为P2P通信的信道。基于该P2P通信信道,打分更高的设备即可作为GO设备。In combination with the description of FIG. 15 and FIG. 16, the second device can determine the scores of the two-end devices corresponding to each channel according to the scores of each device on each channel. According to the scores of the two-end devices, the channel with the largest score is determined as the channel for P2P communication. Based on the P2P communication channel, the device with a higher score can be used as the GO device.
S1706、第二设备向第一设备发送P2P响应信息。S1706. The second device sends P2P response information to the first device.
本示例中,P2P响应信息可以携带有S1705中确定的P2P通信配置,如作为P2P通信的信道号,以及作为GO的设备标识。In this example, the P2P response information may carry the P2P communication configuration determined in S1705, such as the channel number for P2P communication and the device identifier as the GO.
这样,结合打分机制,就能够实现P2P通信配置的快速准确确定。可以理解的是,打分机制中,第二设备所要处理的对象均为以数字为基准的大小判断,相较于前述说明中的逻辑判断过程更加简单,对第二设备的计算开销更小。 In this way, combined with the scoring mechanism, the P2P communication configuration can be quickly and accurately determined. It can be understood that in the scoring mechanism, the objects to be processed by the second device are all size judgments based on numbers, which is simpler than the logical judgment process in the above description and has less computational overhead for the second device.
需要说明的是,在如图15-图17所示的技术方案中,涉及到的预配置项以及打分机制可以是预设在第二设备中的,以便于在需要建立P2P通信之前执行如图17所示的技术方案。在另一些实施例中,该预配置项也可以是由与第二设备同时连接的云端服务器下发的。It should be noted that in the technical solutions shown in Figures 15 to 17, the pre-configuration items and scoring mechanisms involved may be preset in the second device, so that the technical solution shown in Figure 17 can be executed before the P2P communication needs to be established. In other embodiments, the pre-configuration items may also be issued by a cloud server that is simultaneously connected to the second device.
应当理解的是,区别与如图17所示的实现,在另一些实施例中,针对第一设备的打分操作也可以是在第一设备中进行的。例如,在第一设备以及第二设备中可以预设有相同的预配置项和打分机制,这样,第一设备可以自行根据第一能力信息进行打分操作获取第一打分结果,并将第一打分结果携带在P2P请求信息中发送给第二设备进行后续处理。It should be understood that, different from the implementation shown in FIG. 17 , in other embodiments, the scoring operation for the first device may also be performed in the first device. For example, the same pre-configuration items and scoring mechanism may be preset in the first device and the second device, so that the first device can perform a scoring operation according to the first capability information to obtain a first scoring result, and carry the first scoring result in the P2P request information to send to the second device for subsequent processing.
此外,在一些实施例中,预配置项可以包括M个。而在每次建立P2P通信之前,根据需要建立的P2P通信业务类型,以及当前设备所处的网络环境,第一设备以及第二设备可以通过协商选取该M个预配置项中的至少部分作为此次打分的预配置项。此外各个预配置项对应的分数和/或权重也可以是设备根据实际情况灵活调整的。本申请实施例对此不作限制。In addition, in some embodiments, the preconfiguration items may include M items. Before each establishment of P2P communication, according to the type of P2P communication service to be established and the network environment in which the current device is located, the first device and the second device may negotiate to select at least part of the M preconfiguration items as the preconfiguration items for this scoring. In addition, the scores and/or weights corresponding to the preconfiguration items may also be flexibly adjusted by the device according to actual conditions. The embodiments of the present application are not limited to this.
基于前述方案实现P2P通信链路的建立之后,电子设备还可以根据设备能力以及周围通信环境的变化,进行P2P通信的优化调整。After the P2P communication link is established based on the above solution, the electronic device can also optimize and adjust the P2P communication according to the changes in the device capabilities and the surrounding communication environment.
示例性的,在一些实施例中,在第一设备和/或第二设备的STA信道发生变化时,在第一设备以及第二设备均支持CSA的情况下,GO设备可触发CSA将P2P信道切换到STA同信道。Exemplarily, in some embodiments, when the STA channel of the first device and/or the second device changes, if both the first device and the second device support CSA, the GO device may trigger CSA to switch the P2P channel to the STA same channel.
在另一些实施例中,在P2P通信建立之后,GC设备若出现同频异信道或者GC设备不支持DBDC时的异频异信道通信,则可触发P2P STA漫游。由此将GC设备上的STA漫游/切换到已保存的与P2P通信同信道的信道进行STA通信。In other embodiments, after P2P communication is established, if the GC device has the same frequency and different channels or the GC device does not support DBDC, the P2P STA roaming can be triggered. Thus, the STA on the GC device roams/switches to the saved channel with the same channel as the P2P communication for STA communication.
上述主要从电子设备的角度对本申请实施例提供的方案进行了介绍。为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The above mainly introduces the solution provided by the embodiment of the present application from the perspective of electronic equipment. In order to realize the above functions, it includes hardware structures and/or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
本申请实施例可以根据上述方法示例对其中涉及的设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can divide the functional modules of the devices involved therein according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
示例性的,图18示出了的一种电子设备1800的组成示意图。如图18所示,该电子设备1800可以包括:处理器1801和存储器1802。该存储器1802用于存储计算机执行指令。示例性的,在一些实施例中,当该处理器1801执行该存储器1802存储的指令时,可以使得该电子设备1800执行上述实施例中第一设备或第二设备对应的技术方案。Exemplarily, FIG18 shows a schematic diagram of the composition of an electronic device 1800. As shown in FIG18, the electronic device 1800 may include: a processor 1801 and a memory 1802. The memory 1802 is used to store computer-executable instructions. Exemplarily, in some embodiments, when the processor 1801 executes the instructions stored in the memory 1802, the electronic device 1800 may execute the technical solution corresponding to the first device or the second device in the above-mentioned embodiment.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功 能模块的功能描述,在此不再赘述。It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to in the corresponding function. The functional description of the energy module will not be repeated here.
图19示出了的一种芯片系统1900的组成示意图。该芯片系统1900可以包括:处理器1901和通信接口1902,用于支持相关设备(如第一设备或第二设备)实现上述实施例中所涉及的功能。在一种示例中,芯片系统还包括存储器,用于保存终端必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。需要说明的是,在本申请的一些实现方式中,该通信接口1902也可称为接口电路。Figure 19 shows a schematic diagram of the composition of a chip system 1900. The chip system 1900 may include: a processor 1901 and a communication interface 1902, which are used to support related devices (such as the first device or the second device) to implement the functions involved in the above embodiments. In one example, the chip system also includes a memory for storing program instructions and data necessary for the terminal. The chip system may be composed of chips, or may include chips and other discrete devices. It should be noted that in some implementations of the present application, the communication interface 1902 may also be referred to as an interface circuit.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
在上述实施例中的功能或动作或操作或步骤等,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。The functions or actions or operations or steps in the above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or may include one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包括这些改动和变型在内。 Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (24)

  1. 一种通信方法,其特征在于,所述方法应用于通信系统中的第二电子设备,所述通信系统还包括第一电子设备,所述方法用于在所述第一电子设备和所述第二电子设备之间建立第一点对点P2P通信;所述方法包括:A communication method, characterized in that the method is applied to a second electronic device in a communication system, the communication system also includes a first electronic device, and the method is used to establish a first point-to-point P2P communication between the first electronic device and the second electronic device; the method includes:
    所述第二电子设备接收来自所述第一电子设备的P2P请求信息,所述P2P请求信息包括第一设备信息,所述第一设备信息包括以下中的至少一项:第一可用信道集合,所述第一P2P通信的通信业务类型,所述第一电子设备的第一能力信息;The second electronic device receives P2P request information from the first electronic device, the P2P request information includes first device information, the first device information includes at least one of the following: a first available channel set, a communication service type of the first P2P communication, and first capability information of the first electronic device;
    其中,所述第一可用信道集合用于指示至少一个信道,所述第一可用信道集合指示的所述至少一个信道能够用于所述第一电子设备进行P2P通信;The first available channel set is used to indicate at least one channel, and the at least one channel indicated by the first available channel set can be used for the first electronic device to perform P2P communication;
    所述第二电子设备至少根据所述P2P请求信息,确定P2P通信配置;所述P2P通信配置用于建立所述第一P2P通信;The second electronic device determines a P2P communication configuration at least according to the P2P request information; the P2P communication configuration is used to establish the first P2P communication;
    所述第二电子设备向所述第一电子设备发送P2P响应信息,所述P2P相应信息包括所述P2P通信配置。The second electronic device sends P2P response information to the first electronic device, and the P2P response information includes the P2P communication configuration.
  2. 根据权利要求1所述的方法,其特征在于,The method according to claim 1, characterized in that
    所述P2P通信配置用于指示用于进行所述第一P2P通信的信道,和/或作为在所述第一P2P通信中作为管理者GO或者被管理者GC的设备。The P2P communication configuration is used to indicate a channel used for performing the first P2P communication and/or a device serving as a manager GO or a managed GC in the first P2P communication.
  3. 根据权利要求1或2所述的方法,其特征在于,The method according to claim 1 or 2, characterized in that
    所述第一P2P通信的通信业务类型包括:文件分享,投屏,或多屏协同。The communication service types of the first P2P communication include: file sharing, screen projection, or multi-screen collaboration.
  4. 根据权利要求1或2所述的方法,其特征在于,The method according to claim 1 or 2, characterized in that
    所述第一P2P通信的通信业务类型包括:高吞吐率通信优先,或低时延通信优先。The communication service type of the first P2P communication includes: high-throughput communication priority, or low-latency communication priority.
  5. 根据权利要求3或4所述的方法,其特征在于,The method according to claim 3 or 4, characterized in that
    所述P2P请求信息中携带有第一标识;所述第一标识的值不同时,对应于所述第一P2P通信的通信业务类型不同。The P2P request information carries a first identifier; when the value of the first identifier is different, the communication service type corresponding to the first P2P communication is different.
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,The method according to any one of claims 1 to 5, characterized in that
    所述第一电子设备的第一能力信息包括以下中的至少一项:The first capability information of the first electronic device includes at least one of the following:
    所述第一电子设备是否支持双频双发DBDC,所述第一电子设备是否支持GO信道切换宣告GO CSA,或所述第一电子设备是否支持GC CSA。Whether the first electronic device supports dual-band dual-transmission DBDC, whether the first electronic device supports GO channel switching announcement GO CSA, or whether the first electronic device supports GC CSA.
  7. 根据权利要求6所述的方法,其特征在于,The method according to claim 6, characterized in that
    所述P2P请求信息中携带有第二标识;所述第二标识不同时,对应于所述第一能力信息的不同。The P2P request information carries a second identifier; when the second identifier is different, it corresponds to a difference in the first capability information.
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述P2P配置信息包括第一可用信道集合,所述第一P2P通信的通信业务类型;所述P2P通信配置包括用于进行所述第一P2P通信的信道;The method according to any one of claims 1 to 7, characterized in that the P2P configuration information includes a first available channel set and a communication service type of the first P2P communication; the P2P communication configuration includes a channel for performing the first P2P communication;
    在所述第二电子设备根据所述P2P请求信息,确定P2P通信配置之前,所述方法还包括:Before the second electronic device determines the P2P communication configuration according to the P2P request information, the method further includes:
    所述第二电子设备确定第二设备信息,所述第二设备信息包括第二电子设备的第二可用信道集合,The second electronic device determines second device information, where the second device information includes a second available channel set of the second electronic device,
    所述第二电子设备根据所述P2P请求信息,确定P2P通信配置,包括:The second electronic device determines the P2P communication configuration according to the P2P request information, including:
    所述第二电子设备根据所述第一可用信道集合,所述第二可用信道集合,以及所述 第一P2P通信的通信业务类型,确定用于进行所述第一P2P通信的信道。The second electronic device transmits the first available channel set, the second available channel set, and the The communication service type of the first P2P communication determines a channel used for performing the first P2P communication.
  9. 根据权利要求8所述的方法,其特征在于,所述第二电子设备根据所述第一可用信道集合,所述第二可用信道集合,以及所述第一P2P通信的通信业务类型,确定用于进行所述第一P2P通信的信道,包括:The method according to claim 8, characterized in that the second electronic device determines the channel for performing the first P2P communication according to the first available channel set, the second available channel set, and the communication service type of the first P2P communication, comprising:
    所述第二电子设备确定所述第一可用信道集合与所述第二可用信道集合的第一交集,所述第一交集中包括至少一个信道;The second electronic device determines a first intersection of the first available channel set and the second available channel set, wherein the first intersection includes at least one channel;
    所述第二电子设备根据所述第一P2P通信的通信业务类型,在所述第一交集中选取用于进行所述第一P2P通信的信道。The second electronic device selects a channel for performing the first P2P communication from the first intersection according to the communication service type of the first P2P communication.
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述P2P请求信息包括所述第一电子设备的第一能力信息;所述P2P通信配置包括作为在所述第一P2P通信中作为管理者GO或者被管理者GC的设备;The method according to any one of claims 1 to 9, characterized in that the P2P request information includes first capability information of the first electronic device; the P2P communication configuration includes a device as a manager GO or a managed GC in the first P2P communication;
    在所述第二电子设备根据所述P2P请求信息,确定P2P通信配置之前,所述方法还包括:Before the second electronic device determines the P2P communication configuration according to the P2P request information, the method further includes:
    所述第二电子设备确定第二设备信息,所述第二设备信息包括所述第二电子设备的第二能力信息;The second electronic device determines second device information, where the second device information includes second capability information of the second electronic device;
    所述第二电子设备根据所述P2P请求信息,确定P2P通信配置,包括:The second electronic device determines the P2P communication configuration according to the P2P request information, including:
    所述第二电子设备根据所述第一能力信息,以及所述第二能力信息,确定在所述第一P2P通信中作为GO的设备或者作为GC的设备。The second electronic device determines, according to the first capability information and the second capability information, a device serving as a GO or a device serving as a GC in the first P2P communication.
  11. 根据权利要求10所述的方法,其特征在于,所述第二电子设备根据所述第一能力信息,以及所述第二能力信息,确定在所述第一P2P通信中作为GO的设备或者作为GC的设备,包括:The method according to claim 10 is characterized in that the second electronic device determines a device serving as a GO or a device serving as a GC in the first P2P communication according to the first capability information and the second capability information, comprising:
    在所述第一能力信息指示所述第一电子设备支持DBDC,所述第二能力信息指示所述第二电子设备不支持DBDC的情况下,所述第二电子设备确定所述第一电子设备作为所述第一P2P通信的GO设备;When the first capability information indicates that the first electronic device supports DBDC and the second capability information indicates that the second electronic device does not support DBDC, the second electronic device determines the first electronic device as a GO device for the first P2P communication;
    在所述第一能力信息指示所述第一电子设备不支持DBDC,所述第二能力信息指示所述第二电子设备支持DBDC的情况下,所述第二电子设备确定所述第二电子设备作为所述第一P2P通信的GO设备;When the first capability information indicates that the first electronic device does not support DBDC and the second capability information indicates that the second electronic device supports DBDC, the second electronic device determines the second electronic device as a GO device for the first P2P communication;
    在所述第一能力信息指示所述第一电子设备不支持DBDC,但所述第一电子设备支持GO CSA;所述第二能力信息指示所述第二电子设备不支持DBDC,且所述第二电子设备不支持GO CSA的情况下,所述第二电子设备确定所述第一电子设备作为所述第一P2P通信的GO设备;When the first capability information indicates that the first electronic device does not support DBDC, but supports GO CSA; and the second capability information indicates that the second electronic device does not support DBDC, and the second electronic device does not support GO CSA, the second electronic device determines the first electronic device as the GO device of the first P2P communication;
    在所述第一能力信息指示所述第一电子设备不支持DBDC,且所述第一电子设备不支持GO CSA;所述第二能力信息指示所述第二电子设备不支持DBDC,但所述第二电子设备支持GO CSA的情况下,所述第二电子设备确定所述第二电子设备作为所述第一P2P通信的GO设备。When the first capability information indicates that the first electronic device does not support DBDC and the first electronic device does not support GO CSA; and the second capability information indicates that the second electronic device does not support DBDC but the second electronic device supports GO CSA, the second electronic device determines that the second electronic device serves as the GO device of the first P2P communication.
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,在所述第二电子设备接收来自所述第一电子设备的P2P请求信息之前,所述第一电子设备与路由设备建立有第一通信连接;The method according to any one of claims 1 to 11, characterized in that before the second electronic device receives the P2P request information from the first electronic device, the first electronic device establishes a first communication connection with a routing device;
    所述第一设备信息还包括:所述第一通信连接的连接信息。 The first device information also includes: connection information of the first communication connection.
  13. 根据权利要求12所述的方法,其特征在于,在所述第一通信连接的连接信息指示所述第一通信连接建立在5G或6G WIFI的第一STA信道上;The method according to claim 12 is characterized in that the connection information of the first communication connection indicates that the first communication connection is established on a first STA channel of 5G or 6G WIFI;
    所述第二电子设备根据所述P2P请求信息,确定P2P通信配置,包括:The second electronic device determines the P2P communication configuration according to the P2P request information, including:
    所述第二电子设备确定进行所述第一P2P通信的信道为所述第一STA信道。The second electronic device determines that a channel for performing the first P2P communication is the first STA channel.
  14. 根据权利要求1-11中任一项所述的方法,其特征在于,在所述第二电子设备接收到所述P2P请求信息之前,所述第二电子设备与路由设备建立有第二通信连接;所述第二通信连接建立在5G或6G WIFI的第二STA信道上;The method according to any one of claims 1 to 11 is characterized in that before the second electronic device receives the P2P request information, the second electronic device establishes a second communication connection with the routing device; the second communication connection is established on a second STA channel of 5G or 6G WIFI;
    所述第二电子设备根据所述P2P请求信息,确定P2P通信配置,包括:The second electronic device determines the P2P communication configuration according to the P2P request information, including:
    所述第二电子设备确定进行所述第一P2P通信的信道为所述第二STA信道。The second electronic device determines that a channel for performing the first P2P communication is the second STA channel.
  15. 根据权利要求1-14中任一项所述的方法,其特征在于,所述第二电子设备中预设有打分规则,所述打分规则中包括M个预配置项;The method according to any one of claims 1 to 14, characterized in that a scoring rule is preset in the second electronic device, and the scoring rule includes M pre-configured items;
    所述第二电子设备根据所述第一设备信息以及所述打分规则,对所述第一电子设备进行打分,获取第一电子设备对应的打分结果;The second electronic device scores the first electronic device according to the first device information and the scoring rule, and obtains a scoring result corresponding to the first electronic device;
    所述第二电子设备根据第二设备信息,对所述第二电子设备进行打分,获取第二电子设备对应的打分结果;所述第二设备信息包括以下中的至少一项:第二可用信道集合,所述第二电子设备的第二能力信息;其中,所述第二可用信道集合用于指示至少一个信道,所述第二可用信道集合指示的所述至少一个信道能够用于所述第二电子设备进行P2P通信;The second electronic device scores the second electronic device according to the second device information, and obtains a scoring result corresponding to the second electronic device; the second device information includes at least one of the following: a second available channel set, and second capability information of the second electronic device; wherein the second available channel set is used to indicate at least one channel, and the at least one channel indicated by the second available channel set can be used by the second electronic device for P2P communication;
    所述第二电子设备根据所述第一电子设备对应的打分结果以及所述第二电子设备对应的打分结果,确定所述P2P通信配置。The second electronic device determines the P2P communication configuration according to the scoring result corresponding to the first electronic device and the scoring result corresponding to the second electronic device.
  16. 根据权利要求15所述的方法,其特征在于,所述第一设备信息包括第一可用信道集合,所述第二设备信息包括第二可用信道集合;The method according to claim 15, characterized in that the first device information includes a first available channel set, and the second device information includes a second available channel set;
    所述第二电子设备在对所述第一电子设备或所述第二电子设备打分之前,所述方法还包括:Before the second electronic device scores the first electronic device or the second electronic device, the method further includes:
    所述第二电子设备确定所述第一可用信道集合与所述第二可用信道集合的第一交集,所述第一交集中包括N个信道。The second electronic device determines a first intersection of the first available channel set and the second available channel set, where the first intersection includes N channels.
  17. 根据权利要求16所述的方法,其特征在于,所述第二电子设备根据所述第一设备信息以及所述打分规则,对所述第一电子设备进行打分,获取第一电子设备对应的打分结果,包括:The method according to claim 16 is characterized in that the second electronic device scores the first electronic device according to the first device information and the scoring rule, and obtains the scoring result corresponding to the first electronic device, comprising:
    针对所述第一交集中的每个信道,所述第二电子设备根据所述打分规则以及所述第一设备信息,对所述第一电子设备进行打分获取所述M个预配置项中每个预配置项对应的M个打分结果;根据所述M个打分结果,确定所述信道对应的第一打分结果;For each channel in the first intersection, the second electronic device scores the first electronic device according to the scoring rule and the first device information to obtain M scoring results corresponding to each pre-configuration item in the M pre-configuration items; and determines a first scoring result corresponding to the channel according to the M scoring results;
    所述第一电子设备对应的打分结果包括N个信道对应的N个第一打分结果。The scoring result corresponding to the first electronic device includes N first scoring results corresponding to N channels.
  18. 根据权利要求17所述的方法,其特征在于,所述根据所述M个打分结果,确定所述信道对应的第一打分结果,包括:将所述M个打分结果之和,作为所述信道对应的第一打分结果。The method according to claim 17 is characterized in that determining the first scoring result corresponding to the channel based on the M scoring results includes: taking the sum of the M scoring results as the first scoring result corresponding to the channel.
  19. 根据权利要求17或18所述的方法,其特征在于,所述第二电子设备根据所述第二设备信息以及所述打分规则,对所述第二电子设备进行打分,获取第二电子设备对应的打分结果,包括: The method according to claim 17 or 18 is characterized in that the second electronic device scores the second electronic device according to the second device information and the scoring rule, and obtaining the scoring result corresponding to the second electronic device comprises:
    针对所述第一交集中的每个信道,所述第二电子设备根据所述打分规则以及所述第二设备信息,对所述第二电子设备进行打分获取所述M个预配置项中每个预配置项对应的M个打分结果;根据所述M个打分结果,确定所述信道对应的第二打分结果;For each channel in the first intersection, the second electronic device scores the second electronic device according to the scoring rule and the second device information to obtain M scoring results corresponding to each pre-configuration item in the M pre-configuration items; and determines a second scoring result corresponding to the channel according to the M scoring results;
    所述第二电子设备对应的打分结果包括N个信道对应的N个第二打分结果。The scoring result corresponding to the second electronic device includes N second scoring results corresponding to N channels.
  20. 根据权利要求19所述的方法,其特征在于,所述第二电子设备根据所述第一电子设备对应的打分结果以及所述第二电子设备对应的打分结果,确定所述P2P通信配置,包括:The method according to claim 19, wherein the second electronic device determines the P2P communication configuration according to the scoring result corresponding to the first electronic device and the scoring result corresponding to the second electronic device, comprising:
    所述第二电子设备确定所述N个信道中每个信道对应的第三打分结果,所述第三打分结果为所述信道的第一打分结果和第二打分结果之和;The second electronic device determines a third scoring result corresponding to each of the N channels, where the third scoring result is the sum of the first scoring result and the second scoring result of the channel;
    所述第二电子设备在所述N个信道中,选取第一信道作为进行第一P2P通信的信道;所述第一信道的第三打分结果大于其他信道的第三打分结果。The second electronic device selects a first channel from the N channels as a channel for performing the first P2P communication; and the third scoring result of the first channel is greater than the third scoring results of other channels.
  21. 根据权利要求20所述的方法,其特征在于,所述第二电子设备根据所述第一电子设备对应的打分结果以及所述第二电子设备对应的打分结果,确定所述P2P通信配置,还包括:The method according to claim 20, characterized in that the second electronic device determines the P2P communication configuration according to the scoring result corresponding to the first electronic device and the scoring result corresponding to the second electronic device, further comprising:
    在所述第一信道的第一打分结果大于第二打分结果时,所述第二电子设备确定所述第一电子设备作为GO设备;When the first scoring result of the first channel is greater than the second scoring result, the second electronic device determines the first electronic device as a GO device;
    在所述第一信道的第一打分结果小于第二打分结果时,所述第二电子设备确定所述第二电子设备作为GO设备。When the first scoring result of the first channel is less than the second scoring result, the second electronic device determines that the second electronic device serves as a GO device.
  22. 一种通信方法,其特征在于,应用于通信系统,所述通信系统包括第一电子设备和第二电子设备;所述方法用于在所述第一电子设备和所述第二电子设备之间建立P2P通信连接,所述P2P通信连接用于进行投屏或多屏协同;A communication method, characterized in that it is applied to a communication system, the communication system comprising a first electronic device and a second electronic device; the method is used to establish a P2P communication connection between the first electronic device and the second electronic device, the P2P communication connection is used for screen projection or multi-screen collaboration;
    所述第一电子设备支持CSA,所述第二电子设备不支持CSA;The first electronic device supports CSA, and the second electronic device does not support CSA;
    所述第一电子设备的第一可用信道集合包括第一信道,以及第二信道;所述第一信道为2.4G信道,所述第二信道为5G信道;所述第二电子设备的第二可用信道集合也包括所述第一信道和所述第二信道;The first available channel set of the first electronic device includes a first channel and a second channel; the first channel is a 2.4G channel, and the second channel is a 5G channel; the second available channel set of the second electronic device also includes the first channel and the second channel;
    所述方法包括:使用所述第二信道,作为所述P2P通信连接的信道;The method comprises: using the second channel as a channel for the P2P communication connection;
    在所述第一电子设备支持GO CSA时,使用所述第一电子设备作为所述P2P通信连接的GO设备;When the first electronic device supports GO CSA, using the first electronic device as a GO device for the P2P communication connection;
    在所述第一电子设备支持GC CSA时,使用所述第一电子设备或所述第二电子设备作为所述P2P通信连接的GO设备。When the first electronic device supports GC CSA, the first electronic device or the second electronic device is used as the GO device of the P2P communication connection.
  23. 一种通信方法,其特征在于,应用于通信系统,所述通信系统包括第一电子设备和第二电子设备;所述方法用于在所述第一电子设备和所述第二电子设备之间建立P2P通信连接,所述P2P通信连接用于进行文件传输;A communication method, characterized in that it is applied to a communication system, the communication system comprising a first electronic device and a second electronic device; the method is used to establish a P2P communication connection between the first electronic device and the second electronic device, the P2P communication connection is used for file transfer;
    所述第一电子设备的第一可用信道集合包括第一信道,以及第二信道;所述第一信道为2.4G信道,所述第二信道为5G信道;所述第二电子设备的第二可用信道集合也包括所述第一信道和所述第二信道;The first available channel set of the first electronic device includes a first channel and a second channel; the first channel is a 2.4G channel, and the second channel is a 5G channel; the second available channel set of the second electronic device also includes the first channel and the second channel;
    所述方法包括:使用所述第二信道,作为所述P2P通信连接的信道。The method includes: using the second channel as a channel for the P2P communication connection.
  24. 一种第二电子设备,其特征在于,所述第二电子设备包括处理器和存储器;所述存储器用于存储计算机执行指令;当所述处理器执行所述存储器存储的指令时,可以 使得所述第二电子设备执行如权利要求1-21任一项所述的方法,或权利要求22所述的方法,或权利要求23所述的方法。 A second electronic device, characterized in that the second electronic device comprises a processor and a memory; the memory is used to store computer execution instructions; when the processor executes the instructions stored in the memory, The second electronic device is enabled to execute the method according to any one of claims 1 to 21, or the method according to claim 22, or the method according to claim 23.
PCT/CN2023/117246 2022-12-30 2023-09-06 Communication method WO2024139374A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211736057.9 2022-12-30
CN202211736057.9A CN116709577B (en) 2022-12-30 2022-12-30 Communication method and electronic equipment

Publications (1)

Publication Number Publication Date
WO2024139374A1 true WO2024139374A1 (en) 2024-07-04

Family

ID=87828146

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/117246 WO2024139374A1 (en) 2022-12-30 2023-09-06 Communication method

Country Status (2)

Country Link
CN (1) CN116709577B (en)
WO (1) WO2024139374A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116709577B (en) * 2022-12-30 2024-06-11 荣耀终端有限公司 Communication method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150382287A1 (en) * 2013-02-21 2015-12-31 Lg Electronics Inc. Method for finding instrument for wi-fi direct p2p (peer to peer) communication and apparatus therefor
US20180295538A1 (en) * 2017-04-05 2018-10-11 Cisco Technology, Inc. Statefull switchover of wireless stations leveraging channel switch announcements
CN112929972A (en) * 2020-07-28 2021-06-08 华为技术有限公司 Channel adjusting method and electronic equipment
CN113285827A (en) * 2021-05-18 2021-08-20 成都欧珀通信科技有限公司 Data transmission method, system and related device
CN114598414A (en) * 2022-05-09 2022-06-07 荣耀终端有限公司 Time slice configuration method and electronic equipment
CN115348630A (en) * 2022-10-14 2022-11-15 荣耀终端有限公司 Multi-device cooperation method and related device
CN116709577A (en) * 2022-12-30 2023-09-05 荣耀终端有限公司 Communication method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160295350A1 (en) * 2015-04-03 2016-10-06 Nokia Technologies Oy Method, apparatus, and computer program product for channel usage information delivery within a peer-to-peer group
CN113938490B (en) * 2020-07-13 2023-04-07 成都极米科技股份有限公司 Method, device and storage medium for establishing point-to-point communication connection
CN114125789B (en) * 2020-08-28 2023-08-04 华为技术有限公司 Communication method, terminal device and storage medium
CN114867035A (en) * 2021-02-04 2022-08-05 华为技术有限公司 WiFi scanning control method and related device
CN115988643A (en) * 2021-10-14 2023-04-18 荣耀终端有限公司 WiFi P2P connection method, electronic device and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150382287A1 (en) * 2013-02-21 2015-12-31 Lg Electronics Inc. Method for finding instrument for wi-fi direct p2p (peer to peer) communication and apparatus therefor
US20180295538A1 (en) * 2017-04-05 2018-10-11 Cisco Technology, Inc. Statefull switchover of wireless stations leveraging channel switch announcements
CN112929972A (en) * 2020-07-28 2021-06-08 华为技术有限公司 Channel adjusting method and electronic equipment
CN113285827A (en) * 2021-05-18 2021-08-20 成都欧珀通信科技有限公司 Data transmission method, system and related device
CN114598414A (en) * 2022-05-09 2022-06-07 荣耀终端有限公司 Time slice configuration method and electronic equipment
CN115348630A (en) * 2022-10-14 2022-11-15 荣耀终端有限公司 Multi-device cooperation method and related device
CN116709577A (en) * 2022-12-30 2023-09-05 荣耀终端有限公司 Communication method

Also Published As

Publication number Publication date
CN116709577B (en) 2024-06-11
CN116709577A (en) 2023-09-05

Similar Documents

Publication Publication Date Title
EP3700294B1 (en) Method for data transmission using multiple wifi links
WO2020233334A1 (en) Data transmission method and apparatus, device, and computer storage medium
US10827334B2 (en) Method and apparatus for connecting devices using Bluetooth LE technology
US11197335B2 (en) Method for data transmission and related products
US20230276430A1 (en) Resource scheduling method and apparatus, communication device and storage medium
TWI233310B (en) Method and system for access point roaming
CN105122893B (en) For realizing the system and method for multiband service discovery
WO2020134720A1 (en) Data transmission control method and related product
WO2020143680A1 (en) Data transmission method and related apparatus
WO2020164349A1 (en) Data transmission control method and related product
CN106604403B (en) Miracast protocol-based channel selection method and system
US20150012613A1 (en) Method, mobile device and system for transmitting files
CN112291366B (en) Data transmission method and device, storage medium and electronic equipment
WO2024139374A1 (en) Communication method
US9155117B2 (en) Directly transferring data between devices
US20220124480A1 (en) Wifi roaming method and device, mobile terminal, and storage medium
JP7553694B2 (en) End-to-end QoS demand information division method, terminal and network side device
US20230345221A1 (en) Method for transmitting data in near field, device, and system
WO2021138914A1 (en) Method and apparatus for indicating data transmission, communication device and storage medium
CN112566262B (en) Data processing method and device, communication equipment and storage medium
CN115209393B (en) Data transmission method, system, electronic equipment and storage medium
US20220417813A1 (en) Methods and apparatus for application service relocation for multimedia edge services
US11895571B2 (en) Electronic device transmitting and/or receiving packet through network slice and method for operating the same
US20170163737A1 (en) Wireless station and method for managing a multi-band session in wi-fi direct services
US20230224769A1 (en) Method and apparatus for controlling data transmission rate communication device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23909312

Country of ref document: EP

Kind code of ref document: A1