WO2023093461A1 - WiFi双模式下的资源分配方法、设备和存储介质 - Google Patents

WiFi双模式下的资源分配方法、设备和存储介质 Download PDF

Info

Publication number
WO2023093461A1
WO2023093461A1 PCT/CN2022/128345 CN2022128345W WO2023093461A1 WO 2023093461 A1 WO2023093461 A1 WO 2023093461A1 CN 2022128345 W CN2022128345 W CN 2022128345W WO 2023093461 A1 WO2023093461 A1 WO 2023093461A1
Authority
WO
WIPO (PCT)
Prior art keywords
time slot
time
time slots
data
mode
Prior art date
Application number
PCT/CN2022/128345
Other languages
English (en)
French (fr)
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 WO2023093461A1 publication Critical patent/WO2023093461A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0446Resources in time domain, e.g. slots or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/51Allocation or scheduling criteria for wireless resources based on terminal or device properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/53Allocation or scheduling criteria for wireless resources based on regulatory allocation policies
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular to a resource allocation method, device and storage medium in a WiFi dual mode.
  • Wireless fidelity (Wireless Fidelity, WiFi) technology is a widely used wireless network transmission technology.
  • WiFi technology and terminal technology there are more and more WiFi usage scenarios, for example, interconnection among multiple devices.
  • multiple terminals are connected together to work collaboratively, and service data is transmitted on multiple terminal devices, which can support applications and services where multiple devices work together, such as multi-screen collaboration and information sharing.
  • the terminal In the scenario of multi-device interconnection, the terminal usually works in multiple WiFi modes, for example, a wireless station (station, STA) mode and a WiFi direct connection mode. How to configure transmission resources when the terminal works in STA mode and WiFi direct connection mode needs to be solved urgently.
  • STA wireless station
  • WiFi direct connection mode How to configure transmission resources when the terminal works in STA mode and WiFi direct connection mode needs to be solved urgently.
  • Embodiments of the present application provide a resource allocation method, device, and storage medium in a WiFi dual mode, and realize transmission resource allocation when an electronic device adopts STA mode and WiFi direct connection mode to perform DBAC multiplexing.
  • the embodiment of the present application provides a resource allocation method under WiFi dual mode, which is applied to the first electronic device.
  • the first electronic device uses the WiFi direct connection mode and the STA mode to perform DBAC multiplexing.
  • the method includes: The first synchronization time slot and the second synchronization time slot are determined in the multiple time slots included in the scheduling cycle of the direct connection mode; the time slot is the time unit of the WiFi direct connection mode, and the first synchronization time slot is used for the first electronic device Time synchronization in direct connection mode, the time corresponding to the second synchronization time slot is used for time synchronization of the first electronic device in STA mode; determine the first data time slot and the second data time slot in the remaining time slots; the remaining time
  • the slot is a time slot other than the first synchronization time slot and the second synchronization time slot in the multiple time slots, the first data time slot is used for data transmission of the first electronic device in WiFi direct mode, and the second data time slot The time corresponding to the slot is used for data transmission of the first electronic device in
  • the resource allocation method in the WiFi dual mode provided by the first aspect is applicable to a scene where electronic equipment adopts STA mode and HiD2D mode to perform DBAC multiplexing.
  • the first synchronization time slot and the second synchronization time slot are determined first.
  • the first synchronization time slot ensures time synchronization when the electronic device communicates with other devices in HiD2D mode
  • the second synchronization time slot ensures time synchronization when the electronic device communicates with other devices in STA mode. Then, determine the first data time slot and the second data time slot for data transmission.
  • the electronic device uses STA mode and HiD2D mode to perform DBAC Resource allocation during multiplexing enables electronic devices to communicate with multiple devices simultaneously via WiFi, meeting the needs of distributed services.
  • determining the first synchronization time slot and the second synchronization time slot in the multiple time slots included in the scheduling period of the WiFi direct mode includes: determining the first synchronization time slot in the multiple time slots ; Get the offset time; the offset time is used to indicate the minimum time interval between the reference time slot in the first synchronization slot and the starting point of the beacon frame of the STA mode; according to the reference time slot, the offset time and the beacon frame A beacon period of , and determine a second synchronization time slot in a plurality of time slots; wherein, the second synchronization time slot is the time slot where the starting point of the beacon frame is located.
  • the positions of the first synchronization time slot and the second synchronization time slot in the scheduling period are more flexible.
  • the first synchronization time slot includes the first T time slots in the plurality of time slots
  • the reference time slot is the first time slot in the first T time slots
  • T is a positive integer
  • determining the second synchronization time slot in multiple time slots includes: according to the reference time slot and the offset time, in multiple time slots Determine the first second synchronization time slot after the reference time slot in the time slots; according to the first second synchronization time slot and the beacon period, continue to determine the second synchronization time slot in multiple time slots.
  • the resource allocation method in the WiFi dual mode further includes: determining whether a beacon frame sent by the AP is received within the time corresponding to the second synchronization time slot; if within the time corresponding to the second synchronization time slot If the beacon frame sent by the AP is not received within a period of time, and the beacon frame sent by the AP is not received within the time corresponding to the second preset number of consecutive synchronization time slots, then the WiFi direct mode and STA mode are adopted Perform DBAC multiplexing and switch to STA mode.
  • the electronic device if it does not receive the preset number of beacon frames sent by the AP continuously, it can trigger the mandatory synchronization of the beacon frames, that is, switch from using HiD2D mode and STA mode for DBAC multiplexing to only The STA mode is used to wait for receiving the beacon frame, which provides guarantee for the electronic device to successfully receive the beacon frame.
  • the resource allocation method in the WiFi dual mode further includes: if the beacon frame sent by the AP is not received within a preset time period after the STA mode is adopted, switching from the STA mode to the WiFi direct even mode.
  • the electronic device after the electronic device is forced to synchronize the beacon frame, but still cannot receive the beacon frame, it can be determined that the STA is offline, and the switch from only the STA mode to only the HiD2D mode ensures that the electronic device can adopt the HiD2D mode conduct business.
  • the preset duration protection duration+beacon period*I of the beacon frame, where I is a positive integer.
  • determining the first data time slot and the second data time slot in the remaining time slots includes: obtaining the ratio of the number of time slots between the first data time slot and the second data time slot; The number ratio determines the first data slot and the second data slot in the remaining slots.
  • the remaining time slots are allocated to the HiD2D mode and the STA mode according to a preset ratio in a static allocation manner, and the implementation manner is simple.
  • determining the first data time slot and the second data time slot in the remaining time slots includes: determining the number M of time slots required for data transmission only in the WiFi direct mode, and, The number N of time slots corresponding to the time required for data transmission only in STA mode; M and N are both positive integers; according to M and N, determine the first data time slot and the second data time slot in the remaining time slots.
  • the first data time slot and the second data time slot are determined in the remaining time slots in a dynamic allocation manner.
  • the number M and number N of required time slots are predicted according to the HiD2D mode only and the STA mode only, and then the allocation is coordinated according to M, N and the number of remaining time slots. Since the actual traffic demand is taken into consideration, the accuracy of determining the first data time slot and the second data time slot is improved.
  • determining the first data time slot and the second data time slot in the remaining time slots according to M and N includes: if M+N ⁇ the number of remaining time slots, then The M time slots of the remaining time slots are determined as the first data time slots, and the N time slots except the M time slots in the remaining time slots are determined as the second data time slots.
  • the remaining time slots can meet the data transmission requirements of the electronic device in HiD2D mode and STA mode, there is no resource allocation conflict, M time slots can be allocated for HiD2D mode, and N time slots can be allocated for STA mode.
  • the resource allocation method in the WiFi dual mode further includes: allocating time slots other than M time slots and N time slots in the remaining time slots The slot is determined as the first data slot or the second data slot.
  • determining the first data time slot and the second data time slot in the remaining time slots according to M and N includes: if M+N>the number of remaining time slots, then according to the preset scheduling rule The first data time slot and the second data time slot are determined in the remaining time slots; wherein, the preset scheduling rule includes any one of the following: SP scheduling, RR scheduling or WRR scheduling.
  • Time slots cannot meet the data transmission requirements of electronic devices in HiD2D mode and STA mode, and resource allocation conflicts exist.
  • Time slots can be allocated for HiD2D mode and STA mode according to SP scheduling, RR scheduling or WRR scheduling.
  • the preset scheduling rule includes SP scheduling, and determining the first data time slot and the second data time slot in the remaining time slots according to the preset scheduling rule includes: assigning the M time slots in the remaining time slots The slot is determined as the first data time slot, and the time slots other than the M time slots in the remaining time slots are determined as the second data time slots; or, the N time slots in the remaining time slots are determined as the second data time slots time slots, and determine the time slots other than the N time slots in the remaining time slots as the first data time slots.
  • the SP scheduling rule can be used to meet the data transmission requirements in the HiD2D mode, or meet the data transmission requirements in the STA mode.
  • the preset scheduling rule includes RR scheduling, and determining the first data time slot and the second data time slot in the remaining time slots according to the preset scheduling rule includes: using M-( M+N-K)/2 time slots are determined as the first data time slots, and time slots other than M-(M+N-K)/2 time slots in the remaining time slots are determined as the second data time slots; wherein, K is the number of remaining time slots.
  • the RR scheduling rule is used to relatively fairly reduce the number of data time slots required by the HiD2D mode and the STA mode respectively, so as to avoid large rate fluctuations for data transmission in the HiD2D mode and the STA mode.
  • the preset scheduling rule includes WRR scheduling, and determining the first data time slot and the second data time slot in the remaining time slots according to the preset scheduling rule includes: using M-( M+N-K)*q time slots are determined as the first data time slots, and time slots other than the M-(M+N-K)*q time slots in the remaining time slots are determined as the second data time slots; wherein, K is the number of remaining time slots, 0 ⁇ q ⁇ 1.
  • the WRR scheduling rule is adopted to reduce the number of data time slots required by the HiD2D mode and the STA mode according to the weight, so as to avoid large rate fluctuations for data transmission in the HiD2D mode and the STA mode .
  • the first electronic device uses the WiFi direct mode to conduct the first service with the second electronic device, and the first electronic device initiates the first service; the second electronic device uses the WiFi direct mode and the STA mode to perform the first service.
  • DBAC multiplexing, the resource allocation method under the WiFi dual mode also includes: sending the first time slot configuration information to the second electronic device; the first time slot configuration information is used to indicate the first data time slot and the second data time slot in the scheduling cycle position of the gap.
  • the initiator of the service can decide the resource allocation result between the two devices.
  • the first electronic device is respectively connected to the second electronic device and the third electronic device in the WiFi direct mode; the second electronic device and the third electronic device both use the WiFi direct mode and the STA mode to perform DBAC Multiplexing, determining the first data time slot and the second data time slot in the remaining time slots, including: obtaining configuration information of the first time slot between the first electronic device and the second electronic device, and the first electronic device and the second electronic device The second time slot configuration information between the third electronic device; wherein, the first time slot configuration information is used to indicate the first data time slot and the second data time slot in the scheduling period when the first electronic device communicates with the second electronic device The position of the slot, the second time slot configuration information is used to indicate the position of the first data time slot and the second data time slot in the scheduling cycle when the first electronic device communicates with the third electronic device; according to the first time slot configuration information and The second time slot configuration information determines the first data time slot and the second data time slot in the remaining time slots.
  • This implementation is applicable to a DBAC scenario with more than three devices, that is, at least three devices communicating with each other use the WiFi direct mode and the STA mode for DBAC multiplexing, and access the same AP.
  • the electronic device can first obtain the resource scheduling result with other devices according to the method in the dual-device DBAC scenario, and then determine the final resource scheduling result according to multiple resource scheduling results.
  • the embodiment of the present application provides a resource allocation device under WiFi dual mode, which is applied to the first electronic device.
  • the first electronic device uses the WiFi direct connection mode and the STA mode to perform DBAC multiplexing.
  • the device includes: a first determination The module is used to determine the first synchronization time slot and the second synchronization time slot in the multiple time slots included in the scheduling period of the WiFi direct connection mode; the time slot is the time unit of the WiFi direct connection mode, and the first synchronization time slot is used for The time synchronization of the first electronic device in the WiFi direct connection mode, the time corresponding to the second synchronization time slot is used for the time synchronization of the first electronic device in the STA mode; the second determination module is used to determine the second time slot in the remaining time slots A data time slot and a second data time slot; the remaining time slots are time slots other than the first synchronization time slot and the second synchronization time slot in the multiple time slots, and the first data time slot is used for the first electronic device to For data transmission in WiFi direct mode, the
  • the first determination module is configured to: determine the first synchronization time slot among the multiple time slots; obtain the offset time; the offset time is used to indicate the difference between the reference time slot in the first synchronization time slot and The minimum time interval between the starting points of the beacon frame of the STA mode; according to the reference time slot, the offset time and the beacon period of the beacon frame, determine the second synchronization time slot in multiple time slots; wherein, the second synchronization The time slot is the time slot where the starting point of the beacon frame is located.
  • the first synchronization time slot includes the first T time slots in the plurality of time slots
  • the reference time slot is the first time slot in the first T time slots
  • T is a positive integer
  • the first determining module is configured to: determine the first second synchronization time slot after the reference time slot among multiple time slots according to the reference time slot and the offset time; Two synchronization time slots and a beacon period, continue to determine the second synchronization time slot in multiple time slots.
  • it also includes a switching module, and the switching module is used to: determine whether the beacon frame sent by the AP is received within the time corresponding to the second synchronization time slot; if within the time corresponding to the second synchronization time slot If the beacon frame sent by the AP is not received, and the beacon frame sent by the AP is not received within the time corresponding to the second consecutive preset number of synchronization time slots, then start from the WiFi direct mode and the STA mode. DBAC multiplexing is switched to STA mode.
  • the switching module is further configured to switch from the STA mode to the WiFi direct mode if no beacon frame sent by the AP is received within a preset time period after the STA mode is adopted.
  • the preset duration protection duration+beacon period*I of the beacon frame, where I is a positive integer.
  • the second determination module is configured to: acquire the ratio of the number of time slots between the first data time slot and the second data time slot; slot and a second data slot.
  • the second determining module is used to: determine the number M of time slots required for data transmission only in the WiFi direct mode, and the time slots corresponding to the time required for data transmission in the STA mode only.
  • the number N of time slots; both M and N are positive integers; according to M and N, determine the first data time slot and the second data time slot in the remaining time slots.
  • the second determination module is configured to: if M+N ⁇ the number of remaining time slots, determine M time slots in the remaining time slots as the first data time slots, and determine the remaining time slots The N time slots except the M time slots in the slots are determined as the second data time slots.
  • the second determination module is also used to: determine the time slots other than M time slots and N time slots in the remaining time slots as Either the first data slot or the second data slot.
  • the second determination module is configured to: if M+N>the number of remaining time slots, determine the first data time slot and the second data time slot in the remaining time slots according to a preset scheduling rule ;
  • the preset scheduling rule includes any one of the following: SP scheduling, RR scheduling or WRR scheduling.
  • the preset scheduling rule includes SP scheduling
  • the second determination module is configured to: determine M time slots in the remaining time slots as the first data time slots, and divide M time slots in the remaining time slots The time slots other than the time slots are determined as the second data time slots; or, the N time slots in the remaining time slots are determined as the second data time slots, and the time slots other than the N time slots in the remaining time slots are determined as is the first data slot.
  • the preset scheduling rule includes RR scheduling
  • the second determination module is configured to: determine M-(M+N-K)/2 time slots in the remaining time slots as the first data time slots, and set The time slots other than M-(M+N-K)/2 time slots in the remaining time slots are determined as the second data time slots; wherein, K is the number of remaining time slots.
  • the preset scheduling rule includes WRR scheduling
  • the second determination module is configured to: determine M-(M+N-K)*q time slots in the remaining time slots as the first data time slots, and set The time slots other than M-(M+N-K)*q time slots in the remaining time slots are determined as the second data time slots; wherein, K is the number of remaining time slots, 0 ⁇ q ⁇ 1.
  • the first electronic device uses the WiFi direct mode to conduct the first service with the second electronic device, and the first electronic device initiates the first service; the second electronic device uses the WiFi direct mode and the STA mode to perform the first service.
  • DBAC multiplexing also includes a sending module, the sending module is used to: send the first time slot configuration information to the second electronic device; the first time slot configuration information is used to indicate the first data time slot and the second data time slot in the scheduling cycle s position.
  • the first electronic device is respectively connected to the second electronic device and the third electronic device in the WiFi direct mode; the second electronic device and the third electronic device both use the WiFi direct mode and the STA mode to perform DBAC Multiplexing
  • the second determination module is used to: acquire the first time slot configuration information between the first electronic device and the second electronic device, and the second time slot configuration information between the first electronic device and the third electronic device ;
  • the first time slot configuration information is used to indicate the positions of the first data time slot and the second data time slot in the scheduling cycle when the first electronic device communicates with the second electronic device
  • the second time slot configuration information is used to indicate When the first electronic device communicates with the third electronic device, the positions of the first data time slot and the second data time slot in the scheduling cycle; according to the first time slot configuration information and the second time slot configuration information, determine in the remaining time slots A first data slot and a second data slot.
  • an electronic device including a processor, and the processor is configured to be coupled with a memory, read instructions in the memory, and make the electronic device execute the method provided in the first aspect according to the instructions.
  • a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer or a processor, the method provided in the first aspect is implemented.
  • a program product in a fifth aspect, includes a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium program, the at least one processor executes the computer program so that the electronic device implements the method provided in the first aspect.
  • FIG. 1 is a schematic diagram of a scenario of communication between an AP and a STA provided in an embodiment of the present application;
  • FIG. 2 is a schematic diagram of an AP broadcasting a beacon frame provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a scenario in which an electronic device communicates in a P2P mode provided by an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a scene in which electronic equipment adopts STA mode and P2P mode to perform DBAC multiplexing provided by the embodiment of the present application;
  • FIG. 5 is a schematic diagram of the working principle of DBAC multiplexing in FIG. 4;
  • FIG. 6 is a schematic diagram of time slot allocation when the electronic device adopts the STA mode and the P2P mode to perform DBAC multiplexing provided by the embodiment of the present application;
  • FIG. 7 is a schematic diagram of a scene of multi-device interconnection and intercommunication provided by the embodiment of the present application.
  • 8A to 8B are schematic diagrams of a set of scenarios in which an electronic device adopts STA mode and HiD2D mode to perform DBAC multiplexing provided by the embodiment of the present application;
  • 9A to 9B are schematic diagrams of another set of scenarios in which the electronic device adopts the STA mode and the HiD2D mode to perform DBAC multiplexing provided by the embodiment of the present application;
  • FIG. 10 is a schematic diagram of another scene where the electronic device adopts the STA mode and the HiD2D mode to perform DBAC multiplexing provided by the embodiment of the present application;
  • FIG. 11 is a schematic diagram of the time slot structure and time slot control bit mapping of the HiD2D mode provided by the embodiment of the present application.
  • FIG. 12 is a schematic diagram of a first synchronization time slot and a second synchronization time slot provided by an embodiment of the present application;
  • FIG. 13 is another schematic diagram of the first synchronization time slot and the second synchronization time slot provided by the embodiment of the present application;
  • FIG. 14 is a flowchart of a resource allocation method in WiFi dual mode provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of a first data time slot and a second data time slot provided by an embodiment of the present application.
  • FIG. 16 is another schematic diagram of the first data time slot and the second data time slot provided by the embodiment of the present application.
  • FIG. 17 is another schematic diagram of the first data time slot and the second data time slot provided by the embodiment of the present application.
  • Fig. 18 is another schematic diagram of the first data time slot and the second data time slot provided by the embodiment of the present application.
  • FIG. 19 is another schematic diagram of the first data time slot and the second data time slot provided by the embodiment of the present application.
  • FIG. 20 is a schematic structural diagram of a resource allocation device in WiFi dual mode provided by an embodiment of the present application.
  • FIG. 21 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • WiFi dual mode refers to two different WiFi working modes.
  • an electronic device is also called a terminal, a terminal device, a user device, a mobile terminal or a WiFi device, etc., and can perform WiFi communication.
  • some examples of electronic devices are: mobile phones, tablet computers, notebook computers, handheld computers, personal computers, smart speakers, wearable devices, virtual reality (virtual reality, VR) equipment, augmented reality (augmented reality, AR) equipment, Mobile Internet device (mobile internet device, MID) or devices in smart home (smart home), etc.
  • the embodiment of the present application takes the electronic device as a mobile phone as an example.
  • Access point (AP) mode STA mode
  • beacon (Beacon) frame beacon (Beacon) cycle
  • the Institute of Electrical and Electronics Engineers (IEEE) 802.11 protocol defines two working modes of AP and STA.
  • the AP is the creator of the wireless network and the central node of the wireless network, for example, a router, a wireless gateway, and a wireless bridge.
  • Electronic devices connected to a wireless network are called STA stations or STAs, such as mobile phones and computers.
  • the AP works in AP mode, providing wireless access services and data access for STAs.
  • the STA works in the STA mode and accesses data by connecting to the AP.
  • the STA itself does not accept wireless access from other devices.
  • APs can be connected to each other, but STAs cannot be directly connected to each other.
  • the wireless network composed of APs and STAs is a central network communication structure centered on APs.
  • FIG. 1 is a schematic diagram of a communication scenario between an AP and an STA provided in an embodiment of the present application.
  • the router functions as an AP and works in AP mode.
  • Mobile phone 1, mobile phone 2, and mobile phone 3 are all used as STAs, connected to the router respectively, and working in STA mode.
  • the embodiment of the present application does not limit the services performed by the STA, for example, Internet services, including but not limited to browsing web pages, chatting, sending and receiving emails, video calls, and so on.
  • the IEEE802.11 protocol specifies various types of frame structures, such as Beacon frames, Probe Request frames, Probe Response frames, and Data frames.
  • Beacon frame The AP periodically broadcasts a beacon frame to allow surrounding STAs or APs to discover itself. Correspondingly, the STA monitors the beacon frame broadcast by the AP.
  • the period in which the AP broadcasts a beacon frame is called a Beacon period or a Beacon interval, which can be marked as a parameter Beacon_Interval.
  • the beacon frame includes a header, which is used for time synchronization between the AP and the STA.
  • FIG. 2 is a schematic diagram of an AP broadcasting a beacon frame provided by an embodiment of the present application.
  • the AP broadcasts beacon frames according to the beacon period.
  • the embodiment of the present application does not limit the value of the beacon period, for example, 100ms.
  • Probe Request frame It is sent when the STA actively searches for nearby APs, and is used to detect accessible APs.
  • Probe Response frame After the AP receives the Probe Request frame sent by the STA, it can respond to the Probe Response frame.
  • WiFi point-to-point peer to peer, P2P
  • the WiFi P2P protocol is developed based on the 802.11 protocol framework. It is a point-to-point connection technology that enables multiple electronic devices to form a network without an AP. It is called a P2P network (P2P Network) or a P2P group (P2P Group).
  • P2P Network P2P Network
  • P2P Group P2P group
  • a connection can be established directly between two electronic devices, and the working mode is called WiFi P2P mode or P2P mode.
  • one electronic device is similar to an AP and is called a group owner (group owner, GO), and the other electronic device is similar to an STA and is called a group client (GC).
  • group owner group owner
  • GC group client
  • GO can communicate with one or more GCs, and GCs cannot communicate directly with each other.
  • P2P network is a centralized network communication structure centered on GO.
  • FIG. 3 is a schematic diagram of a scenario in which an electronic device communicates in a P2P mode according to an embodiment of the present application.
  • the mobile phone 4 acts as a GO and works in the P2P mode.
  • Mobile phone 1, mobile phone 2, and mobile phone 3 are all used as GCs, respectively connected to mobile phone 4, and working in P2P mode.
  • WiFi communication cannot be directly performed between mobile phone 1 and mobile phone 2, between mobile phone 1 and mobile phone 3, and between mobile phone 2 and mobile phone 3.
  • the embodiment of the present application does not limit the services performed by the electronic device in the P2P mode, for example, screen projection, file transmission, and the like.
  • the time slot structure of the beacon period may be adopted.
  • An electronic device can perform WiFi communication with multiple devices at the same time, and the embodiment of the present application does not limit the WiFi working mode and working frequency of the electronic device.
  • an electronic device may use the same operating frequency to perform WiFi communication with multiple devices, or use different operating frequencies to perform WiFi communication with multiple devices respectively.
  • DBAC time division multiplexing
  • DBAC multiplexing When electronic devices use time division multiplexing to share a set of hardware resources and use different operating frequencies to communicate with multiple devices through WiFi, it is called DBAC or DBAC multiplexing.
  • the electronic device adopts the STA mode and the P2P mode to perform DBAC multiplexing, but Fig. 4 and Fig. 5 do not limit the DBAC multiplexing.
  • the scene includes a router, mobile phone 1 and mobile phone 2 .
  • the mobile phone 1 uses the channel 40 of the 5GHz frequency band to communicate with the router via WiFi, for example, to perform Internet access services.
  • the mobile phone 1 works in STA mode, and the router works in AP mode.
  • Mobile phone 1 also uses channel 36 of the 5GHz frequency band to communicate with mobile phone 2 via WiFi, for example, to perform screen projection services.
  • Both mobile phone 1 and mobile phone 2 work in P2P mode.
  • the mobile phone 1 shares a set of hardware resources in a time-division multiplexing manner, and communicates with the router or with the mobile phone 2 at a certain moment.
  • the mobile phone 1 can work on the channel 40 during the T1 and T5 periods through dynamic time-sharing switching, and connect to the router for Internet access services; it can work on the channel 36 during the T3 period and communicate with the mobile phone 2. screen business.
  • the T2 time period and the T4 time period are time overheads for switching frequency points of the electronic device, and the values of the T1-T5 time periods are not limited in this embodiment of the present application.
  • the electronic device When the electronic device transmits data in the STA mode or the P2P mode, it adopts the time slot structure of the beacon period. Since the time slot structure is the same, when the electronic device adopts the STA mode and the P2P mode to perform DBAC multiplexing, in one implementation mode, the fixed time slot polling method can be used to allocate transmission resources for the STA mode and the P2P mode respectively.
  • FIG. 6 is a schematic diagram of time slot allocation when the electronic device adopts the STA mode and the P2P mode to perform DBAC multiplexing provided by the embodiment of the present application.
  • the beacon period is, for example, 100 ms, and the beacon period may be divided into four time slots of 25 ms for dynamic round-robin scheduling allocation in the P2P mode and the STA mode.
  • the first 25ms is allocated to P2P mode, including P2P time slice and channel switching time.
  • the P2P time slice is used for electronic devices to transmit data in the P2P mode, and the channel switching time can be 2-5 ms, which is the switching time overhead between the P2P mode and the STA mode.
  • the second 25ms is allocated to STA mode, including STA time slice and channel switching duration. STA time slice is used for data transmission by electronic equipment in STA mode.
  • WiFi technology and terminal technology there are more and more WiFi usage scenarios, and the number of devices in the scenarios is also increasing.
  • an application scenario is interconnection among multiple devices.
  • multiple devices are connected to work together, business data is transmitted between multiple devices, and applications and services that support multi-device collaborative work can be called distributed services.
  • multi-screen collaborative services For example, multi-screen collaborative services, information sharing services, etc.
  • FIG. 7 is a schematic diagram of a scenario of multi-device interconnection and intercommunication provided by the embodiment of the present application.
  • the scene includes five devices, namely: a mobile phone, a laptop computer, a tablet computer, a personal computer, and a smart speaker.
  • any two devices can communicate with each other.
  • a mobile phone can perform multi-screen collaborative services with a notebook computer and a tablet computer, and the content on the mobile phone can be displayed on the screen of the notebook computer and the tablet computer.
  • a laptop computer can perform a screen projection service with a personal computer.
  • a tablet computer can perform a file sharing service with a smart speaker, for example, music on the tablet computer is played on the smart speaker.
  • any two devices can establish a connection and perform WiFi communication, and a hyper terminal composed of multiple devices can be presented to the user.
  • the WiFi P2P mode can be used, due to the role restrictions of GO and GC, the connection between any two devices cannot be realized, thus limiting the actual application requirements of distributed services.
  • the embodiment of the present application provides a WiFi direct connection mode.
  • WiFi direct connection mode When an electronic device works in the WiFi direct connection mode, WiFi communication between any two devices can be realized.
  • the embodiment of the present application does not limit the name of the WiFi direct connection mode, and the name may be different when the device manufacturer is different, the protocol proposer is different, and the like.
  • a WiFi direct mode is named HiD2D mode.
  • HiD2D is a WiFi-based terminal interconnection networking protocol, which can provide many-to-many role-free interconnection of electronic devices.
  • electronic devices need to use STA mode and HiD2D mode for DBAC multiplexing, so as to realize that an electronic device can communicate with multiple devices at the same time through WiFi.
  • the electronic device needs to allocate transmission resources for the STA mode and the HiD2D mode respectively in the time domain.
  • the scene includes the AP, mobile phone 1 and mobile phone 2 .
  • Mobile phone 1 uses channel 36 of the 5GHz frequency band to communicate with the AP through WiFi, and mobile phone 1 works in STA mode.
  • Mobile phone 1 also uses channel 60 of the 5GHz frequency band to communicate with mobile phone 2 via WiFi, and both mobile phone 1 and mobile phone 2 work in HiD2D mode.
  • the mobile phone 1 communicates with the AP or with the mobile phone 2 at a certain moment, and the mobile phone 1 adopts the STA mode and the HiD2D mode to perform DBAC multiplexing.
  • the mobile phone 1 may be the initiator of the service or the receiver of the service.
  • the scene includes AP1, AP2, mobile phone 1 and mobile phone 2.
  • mobile phone 1 uses channel 36 of the 5GHz frequency band to communicate with AP1 through WiFi, and mobile phone 1 works in STA mode.
  • Mobile phone 1 also uses channel 60 of the 5GHz frequency band to communicate with mobile phone 2 via WiFi, and both mobile phone 1 and mobile phone 2 work in HiD2D mode.
  • Mobile phone 1 communicates with AP1 or mobile phone 2 at a certain moment, and mobile phone 1 adopts STA mode and HiD2D mode for DBAC multiplexing.
  • the mobile phone 1 may be the initiator of the service or the receiver of the service.
  • mobile phone 2 uses channel 60 of the 5GHz frequency band to perform WiFi communication with AP1 and mobile phone 1, and the working frequency is the same, which is not a DBAC multiplexing scenario.
  • the allocation of transmission resources is mainly based on the electronic device that generates the DBAC.
  • the scene includes the AP, mobile phone 1 and mobile phone 2 .
  • Phone 1 and Phone 2 are connected to the same AP.
  • mobile phone 1 uses channel 36 of the 5GHz frequency band to communicate with the AP through WiFi, and mobile phone 1 works in STA mode.
  • Mobile phone 1 also uses channel 60 of the 5GHz frequency band to communicate with mobile phone 2 via WiFi, and both mobile phone 1 and mobile phone 2 work in HiD2D mode.
  • Mobile phone 1 communicates with AP or mobile phone 2 at a certain moment, and mobile phone 1 adopts STA mode and HiD2D mode for DBAC multiplexing.
  • the mobile phone 1 may be the initiator of the service or the receiver of the service.
  • mobile phone 2 adopts STA mode and HiD2D mode for DBAC multiplexing.
  • mobile phone 1 and mobile phone 2 are connected to the same AP and share the beacon frame sent by the AP, mobile phone 1, mobile phone 2 and the AP can synchronize time.
  • mobile phone 1 and mobile phone 2 can negotiate to determine the allocation result of transmission resources.
  • the service initiator between mobile phone 1 and mobile phone 2 may determine the final transmission resource allocation result.
  • FIG. 9A assuming that mobile phone 1 projects a screen to mobile phone 2 , mobile phone 1 determines the result of resource allocation between mobile phone 1 and mobile phone 2 .
  • the mobile phone 2 can receive the resource allocation result determined by the mobile phone 1 .
  • the scene includes AP1, AP2, mobile phone 1 and mobile phone 2.
  • Phone 1 and Phone 2 are connected to different APs.
  • mobile phone 1 uses channel 36 of the 5GHz frequency band to communicate with AP1 through WiFi, and mobile phone 1 works in STA mode.
  • Mobile phone 1 also uses channel 60 of the 5GHz frequency band to communicate with mobile phone 2 via WiFi, and both mobile phone 1 and mobile phone 2 work in HiD2D mode.
  • Mobile phone 1 communicates with AP1 or mobile phone 2 at a certain moment, and mobile phone 1 adopts STA mode and HiD2D mode for DBAC multiplexing.
  • mobile phone 2 uses channel 149 of the 5GHz frequency band to communicate with AP2 via WiFi, and mobile phone 2 works in STA mode.
  • Mobile phone 2 also uses channel 60 of the 5GHz frequency band to communicate with mobile phone 1 via WiFi, and both mobile phone 1 and mobile phone 2 work in HiD2D mode.
  • Mobile phone 2 communicates with AP2 or mobile phone 1 at a certain moment, and mobile phone 2 uses STA mode and HiD2D mode to perform DBAC multiplexing.
  • mobile phone 1 and mobile phone 2 are connected to different APs, and the time of the beacon frame sent by AP1 may not be synchronized with the time of the beacon frame sent by AP2, resulting in asynchrony between mobile phone 1, mobile phone 2, AP1 and AP2.
  • mobile phone 1 and mobile phone 2 can avoid this scenario by using methods such as AP-guided migration and relay agent to access the Internet without negotiating resource allocation.
  • a DBAC scenario with more than three devices there are at least three electronic devices that use the STA mode and the HiD2D mode for DBAC multiplexing, and the at least three electronic devices are all connected to the same AP.
  • the embodiment of the present application does not limit the total number of electronic devices in the scene and the number of electronic devices that perform DBAC multiplexing in STA mode and HiD2D mode.
  • FIG. 10 it shows the situation that three electronic devices all adopt STA mode and HiD2D mode to perform DBAC multiplexing.
  • the scene includes AP, mobile phone 1, mobile phone 2 and mobile phone 3.
  • Mobile phone 1, mobile phone 2 and mobile phone 3 are connected to the same AP.
  • mobile phone 1 uses channel 36 of the 5GHz frequency band to communicate with the AP through WiFi, and mobile phone 1 works in STA mode.
  • the mobile phone 1 also uses the channel 60 of the 5GHz frequency band to perform WiFi communication with the mobile phone 2 and the mobile phone 3 respectively.
  • both mobile phone 1 and mobile phone 2 work in HiD2D mode; similarly, when mobile phone 1 communicates with mobile phone 3, mobile phone 1 and mobile phone 3 both work in HiD2D mode.
  • Mobile phone 1 communicates with AP or mobile phone 2 or mobile phone 3 at a certain moment, and mobile phone 1 adopts STA mode and HiD2D mode for DBAC multiplexing.
  • mobile phone 2 and mobile phone 3 both adopt STA mode and HiD2D mode for DBAC multiplexing.
  • mobile phone 1, mobile phone 2, and mobile phone 3 are connected to the same AP and share the beacon frame sent by the AP, mobile phone 1, mobile phone 2, mobile phone 3 and the AP can be synchronized in time. In this scenario, mobile phone 1, mobile phone 2, and mobile phone 3 can negotiate to determine the result of resource allocation.
  • each electronic device can first obtain the resource allocation result with other devices according to the method in the dual-device DBAC scenario, and then determine the final resource allocation result according to multiple resource allocation results.
  • take mobile phone 1 as an example.
  • mobile phone 1 can obtain resource allocation results 12 between mobile phone 1 and mobile phone 2.
  • mobile phone 1 can determine the resource allocation result 12; if mobile phone 1 is the receiver of the business between mobile phone 1 and mobile phone 2, mobile phone 2 can The resource allocation result 12 is determined, and the mobile phone 1 can receive the resource allocation result 12 sent by the mobile phone 2 .
  • mobile phone 1 can obtain resource allocation results 13 between mobile phone 1 and mobile phone 3. Therefore, the mobile phone 1 can determine the final resource allocation result according to the resource allocation result 12 and the resource allocation result 13 .
  • the resource allocation in the HiD2D mode is ensured according to the principle of prioritizing the HiD2D mode. Details will be described later with reference to FIG. 10 and FIG. 19 .
  • a time slot is the minimum unit time in the HiD2D protocol.
  • K is a positive integer greater than 1, for example, the value is 32.
  • the electronic device dynamically generates a time slot control bitmap (Bitmap) in units of a scheduling cycle, and each time slot in the scheduling cycle corresponds to a 1-bit value.
  • a value of 1 bit corresponding to a time slot indicates that the time slot is in the HiD2D working state; a value of 1 bit corresponding to the time slot indicates that the time slot is in a non-HiD2D working state, for example, the time slot is in the sleep state or In STA working state.
  • time slot control Bitmap Since each time slot can indicate whether the time slot is in the HiD2D working state through a 1-bit value, the implementation of the time slot control Bitmap is simple, the scheduling method is flexible, and the air interface resources occupied during transmission are few.
  • FIG. 11 is a schematic diagram of a time slot structure and a time slot control bit mapping of the HiD2D mode provided by the embodiment of the present application.
  • the scheduling period includes 32 time slots, which can be marked as time slot 0 to time slot 31, or slot0 to slot31.
  • the time slot control Bitmap corresponding to time slot 0 to time slot 3 takes a value of 1, indicating that time slot 0 to time slot 3 are in the HiD2D working state.
  • the value of the slot control Bitmap corresponding to slot 4 to slot 31 is 0, indicating that slot 4 to slot 31 are in the non-HiD2D working state.
  • the time slot control Bitmap can indicate the time slot allocation when the electronic device adopts the STA mode and the HiD2D mode to perform DBAC multiplexing.
  • a value of 1 bit corresponding to a time slot indicates that the electronic device is in HiD2D mode in this time slot
  • a value of 1 bit corresponding to a time slot indicates that the electronic device is in STA mode or sleeps in this time slot state.
  • the electronic device When the electronic device adopts the HiD2D mode and the STA mode for DBAC multiplexing, the electronic device needs to complete the time synchronization of the HiD2D mode and the STA mode respectively, so as to perform subsequent data transmission.
  • the time slot in which the electronic device performs time synchronization in the HiD2D mode is referred to as a first synchronization time slot.
  • a first synchronization time slot For example.
  • the first electronic device can send a preset synchronization signal in the first synchronization time slot, and correspondingly, the second electronic device can receive the signal and detect whether the received signal is a preset synchronization signal.
  • the position of the first synchronization time slot may be determined in time, thereby completing the time synchronization between the first electronic device and the second electronic device.
  • the embodiment of the present application does not limit the preset synchronization signal.
  • the electronic device When the electronic device uses the STA mode to communicate with the AP through WiFi, it also needs to complete time synchronization with the AP.
  • the AP periodically sends a beacon frame, and correspondingly, the electronic device completes synchronization by receiving the beacon frame sent by the AP.
  • the time slot where the start position of the beacon frame is located is called the second synchronization time slot.
  • the time corresponding to the second synchronization time slot is used for time synchronization of the electronic device in the STA mode.
  • the first synchronization time slot is also used for signaling interaction between the electronic device and other devices.
  • the value corresponding to the first synchronization time slot may be 1, and the value corresponding to the second synchronization time slot may be 0.
  • the first synchronization time slot includes the first T time slots in the scheduling period of the HiD2D mode, where T is a positive integer.
  • the first synchronization time slot includes the first time slot and the second time slot in the scheduling period.
  • FIG. 12 is a schematic diagram of a first synchronization time slot and a second synchronization time slot provided in this embodiment of the present application.
  • the scheduling period of the HiD2D mode includes 32 time slots, marked as time slot 0 to time slot 31 , and each time slot is 16 ms.
  • the first synchronization slot includes slot 0 and slot 1.
  • a plurality of second synchronization slots may be included in the scheduling period of the HiD2D mode.
  • time slot 2 is the second synchronization time slot
  • the next second synchronization time slot may be time slot 8 .
  • the second synchronization time slot may include time slot 2, time slot 8, time slot 14, time slot 21 and time slot 27.
  • the offset time is used to indicate the minimum time interval between the reference slot in the first synchronization slot and the start point of the beacon frame of the STA mode.
  • the offset time can be used to determine the second synchronization slot.
  • the reference time slot may be any time slot in the first synchronization time slot.
  • the reference time slot may be the first time slot in the first synchronization time slot.
  • the offset time may be the minimum time interval between the reference time slot and the starting point of the beacon frame after the reference time slot, or the offset time may be the minimum time interval between the reference time slot and the beacon frame before the reference time slot. Minimum time interval between start points of frames.
  • the offset time may be the minimum time interval between the start point of the reference time slot and the start point of the beacon frame, or the offset time may be the time interval between the end point of the reference time slot and the start point of the beacon frame Minimum time interval.
  • the reference time slot may be time slot 0, and the offset time is between the start time of time slot 0 and the start point of the first beacon frame after time slot 0 time interval between.
  • the electronic device When the electronic device adopts the HiD2D mode and the STA mode for DBAC multiplexing, the electronic device can perform data transmission in the HiD2D mode and the STA mode respectively.
  • the time slot in which the electronic device performs data transmission in the HiD2D mode is called the first data time slot, and the time corresponding to the time in which the electronic device performs data transmission in the STA mode The slot is called the second data slot.
  • the value corresponding to the first data time slot may be 1, and the value corresponding to the second data time slot may be 0.
  • the electronic device when it actually schedules the second data time slot in the scheduling period of the HiD2D mode, it may schedule the second synchronization time slot as the second data time slot. It can be understood as: for a time slot in the scheduling cycle of the HiD2D mode, it is both the second synchronization time slot and the second data time slot, and the time corresponding to this time slot is used for the electronic device to complete the time synchronization in the STA mode. Can be used for data transmission in STA mode. This implementation is usually used in a scenario where the remaining time slots in the scheduling period except the first synchronization time slot and the second synchronization time slot are insufficient to meet the data transmission requirements in the HiD2D mode and the STA mode.
  • electronic devices can use STA mode and WiFi P2P mode for DBAC multiplexing, so that one electronic device can communicate with multiple devices at the same time through WiFi.
  • the STA mode and the WiFi P2P mode may adopt the same time slot structure. Since the role assignment of GO and GC in the WiFi P2P mode limits the application requirements of distributed services, electronic devices use the WiFi direct connection mode to realize communication between any two devices. However, the time slot structures of the STA mode and the WiFi direct mode are different. Therefore, the embodiment of the present application provides a resource allocation method under the WiFi dual mode.
  • the WiFi dual mode includes the WiFi direct mode, and uses The way of time division multiplexing is to configure the transmission resources separately for the WiFi dual mode, which realizes the transmission resource allocation when the electronic equipment adopts the WiFi dual mode for DBAC multiplexing, so as to realize the application requirements of distributed services.
  • the embodiment of the present application takes the HiD2D mode as an example for description, but does not limit the WiFi direct mode.
  • the embodiment of the present application takes the WiFi dual mode including the HiD2D mode and the STA mode as an example for illustration, but does not limit the WiFi dual mode, and the WiFi dual mode may also include other two working modes.
  • the WiFi dual mode may also include a WiFi P2P mode and a HiD2D mode.
  • FIG. 14 is a flow chart of a resource allocation method in a WiFi dual mode provided by an embodiment of the present application.
  • the resource allocation method under the WiFi dual mode provided in this embodiment is applicable to a single-device DBAC scenario, for example, in the scenario shown in FIG. 8A or FIG. 8B, the execution subject can be an electronic device that uses STA mode and HiD2D mode for DBAC multiplexing , for example, the mobile phone 1 in FIG. 8A or FIG. 8B.
  • the execution subject may be referred to as a first electronic device.
  • the resource allocation method in the WiFi dual mode provided by this embodiment may include:
  • S1401. Determine a first synchronization time slot and a second synchronization time slot in a scheduling period of the HiD2D mode.
  • the scheduling period includes K time slots in the HiD2D mode, and K is a positive integer greater than 1.
  • the first synchronization time slot is used for time synchronization of the electronic device in HiD2D mode
  • the time corresponding to the second synchronization time slot is used for time synchronization of the electronic device in STA mode.
  • the electronic device performs time synchronization by receiving the beacon frame sent by the AP, and can adopt the time slot structure of the beacon period during data transmission, which can be referred to in the 802.11 protocol, and will not be repeated here.
  • HiD2D is a WiFi-based terminal interconnection networking protocol.
  • the HiD2D mode has a different time slot structure from the STA mode. Therefore, it is necessary to determine the time slot in the HiD2D working state in the K time slots included in the scheduling cycle of the HiD2D mode. slots and slots in non-HiD2D working state.
  • the first synchronization time slot is in the HiD2D working state and is used for time synchronization of the electronic device in the HiD2D mode
  • the time slot control Bitmap can take a value of 1.
  • the second synchronization time slot is in the non-HiD2D working state, or in the STA working state, the electronic device can perform time synchronization in STA mode within the time corresponding to the second synchronization time slot, and the time slot control Bitmap can take a value of 0.
  • the number of time slots included in the first synchronization time slot and the second synchronization time slot is not limited. For example, there may be one or a plurality, and a plurality means two or more.
  • S1402. Determine a first data time slot and/or a second data time slot in remaining time slots in the K time slots except the first synchronization time slot and the second synchronization time slot.
  • the first data time slot is used for data transmission of the electronic device in HiD2D mode
  • the time corresponding to the second data time slot is used for data transmission of the electronic device in STA mode.
  • the remaining time slots can be used for data transmission in STA mode and HiD2D mode.
  • the first data time slot is in the HiD2D working state, and is used for data transmission of the electronic device in the HiD2D mode
  • the time slot control Bitmap can take a value of 1.
  • the second data time slot is in the non-HiD2D working state, or in the STA working state, the electronic device can perform data transmission in STA mode within the time corresponding to the second synchronization time slot, and the time slot control Bitmap can take a value of 0.
  • this embodiment does not limit the specific positions of the first data time slot and the second data time slot among the N time slots in the scheduling period. If the first data time slot includes multiple time slots, all the first data time slots may be located consecutively or distributed at intervals. Similarly, if the second data time slot includes a plurality of time slots, all the second data time slots may be located consecutively or distributed at intervals.
  • the number of time slots included in the first data time slot and the second data time slot is not limited. For example, it may be 0, or may be 1, or may be plural, and plural means 2 or more.
  • the resource allocation method in the WiFi dual mode is applicable to the scene where the electronic device adopts the STA mode and the HiD2D mode to perform DBAC multiplexing.
  • the first synchronization time slot and the second synchronization time slot are determined first.
  • the first synchronization time slot ensures time synchronization of the electronic device in HiD2D mode
  • the second synchronization time slot ensures time synchronization of the electronic device in STA mode. Then, determine the first data time slot and the second data time slot for data transmission.
  • the resource allocation method under the WiFi dual mode provided in this embodiment when the STA mode and the HiD2D mode adopt different time slot structures, realizes the resource allocation when the electronic device adopts the STA mode and the HiD2D mode for DBAC multiplexing, and realizes the electronic The device performs WiFi communication with multiple devices at the same time, which meets the needs of distributed services.
  • the resource allocation method in the WiFi dual mode provided in this embodiment may also include:
  • mapping of slot control bits that determine the scheduling period wherein, the value corresponding to the first synchronization time slot and the first data time slot is 1, and the value corresponding to the second synchronization time slot and the second data time slot is 0.
  • determining the first synchronization time slot and the second synchronization time slot in the scheduling period of the HiD2D mode may include:
  • the first synchronization slot is determined among the K slots.
  • the offset time is used to indicate the minimum time interval between the reference slot in the first synchronization slot and the start point of the beacon frame of the STA mode.
  • the second synchronization time slot is determined among the K time slots.
  • the second synchronization time slot is the time slot where the starting point of the beacon frame is located.
  • the position of the first synchronization time slot is generally specified in the HiD2D protocol, so the first synchronization time slot is determined first.
  • the first synchronization time slot may include the first time slot and the second time slot in the K time slots, that is, time slot 0 and time slot 1 in Figure 12, and the time slot control Bitmap may take a value 1.
  • all the second synchronization time slots can be determined in the K time slots of the scheduling period through the offset time, the reference time slot in the first synchronization time slot and the beacon period of the beacon frame.
  • the time slot control Bitmap of the second synchronization time slot may take a value of 0.
  • Offset time can be marked as parameter Beacon_offset.
  • this embodiment does not limit the reference time slot in the first synchronization time slot.
  • the reference time slot is the first time slot in the first synchronization time slot, for example, time slot 0 in FIG. 12 .
  • determining the second synchronization time slot in the K time slots may include:
  • the first second synchronization time slot after the reference time slot is determined among the K time slots.
  • the first second synchronization time slot and the beacon period continue to determine the second synchronization time slot in the K time slots.
  • the reference time slot is time slot 0, and after obtaining the offset time, it may be determined that the first second synchronization time slot after the first synchronization time slot is time slot 2. Furthermore, all second synchronization time slots may be determined according to the beacon period of the beacon frame. As shown in FIG. 13 , the second synchronization time slots may include time slot 2 , time slot 8 , time slot 14 , time slot 21 and time slot 27 .
  • the resource allocation method in the WiFi dual mode provided in this embodiment may also include:
  • beacon frame sent by the AP is not received within the time corresponding to the second synchronization time slot, and the beacon frame sent by the AP is not received within the time corresponding to the continuous preset number of second synchronization time slots, Then switch from using HiD2D mode and STA mode for DBAC multiplexing to using STA mode.
  • this embodiment does not limit the value of the preset number.
  • the preset number is 25.
  • the electronic device when the electronic device works in the STA mode, the electronic device performs time synchronization with the AP by receiving a beacon frame broadcast by the AP. If the beacon frame sent by the AP is received within the time corresponding to the second synchronization time slot, the electronic device can time-synchronize with the AP according to the beacon frame, and can also perform signaling interaction. If the beacon frame sent by the AP is not received within the time corresponding to the second synchronization time slot, you can add 1 to the value of the beacon frame loss (Beacon_miss) counter, and continue to judge in the time corresponding to the next second synchronization time slot Whether the beacon frame sent by the AP is received.
  • Beacon_miss the beacon frame loss
  • the value of the beacon frame loss counter exceeds the preset number, it means that the electronic device has not received the beacon frame for a long time, and the forced synchronization of the beacon frame can be triggered, that is, from the HiD2D mode and the STA
  • the DBAC multiplexing mode is switched to only the STA mode, waiting to receive the beacon frame.
  • the resource allocation method in the WiFi dual mode provided in this embodiment may also include:
  • this embodiment does not limit the value of the preset duration.
  • the preset duration protection duration+beacon period*I of the beacon frame, where I is a positive integer.
  • the guard duration can be represented by the parameter Guard_Time, which is used for the time overhead of electronic equipment switching from using HiD2D mode and STA mode for DBAC multiplexing to only adopting STA mode.
  • This embodiment does not limit the value of the protection duration, for example, 20ms.
  • the electronic device switches from using the HiD2D mode and the STA mode for DBAC multiplexing to only using the STA mode, and waits for receiving a beacon frame. If the beacon frame has not been received within the preset period of time, it can be determined that the STA is offline and switched from only using the STA mode to only using the HiD2D mode. For example, the electronic device disconnects the STA connection with other devices to ensure that the electronic device The HiD2D mode can be used for business.
  • determining the first data time slot and the second data time slot in the remaining time slots may include:
  • the ratio of the number of time slots between the first data time slot and the second data time slot is obtained.
  • the first data time slot and the second data time slot are determined in the remaining time slots according to the ratio of the number of time slots.
  • this embodiment does not limit the value of the ratio of the number of time slots.
  • the ratio of the number of time slots is 1:1 or 2:1.
  • the ratio of the number of time slots is 1:1, that is, the number of first data time slots corresponding to the HiD2D mode is the same as the number of second data time slots corresponding to the STA mode.
  • the second synchronization time slot is not shown in the figure.
  • 2 first data time slots and 2 second data time slots are set at intervals.
  • the ratio of the number of time slots is 2:1, that is, the number of the first data time slots corresponding to the HiD2D mode is equal to the number of the second data time slots corresponding to the STA mode 2 times.
  • time slot 0 and time slot 1 are the first synchronization time slots
  • time slot 8 is the second synchronization time slot
  • time slots 2 to 5 are the first data time slots
  • time slots 6 to 5 are the first data time slots
  • 7 is the second data time slot. The status of the remaining slots is not shown.
  • the implementation is simple.
  • determining the first data time slot and the second data time slot in the remaining time slots may include:
  • the first data time slot and the second data time slot are determined in the remaining time slots according to M and N.
  • a dynamic allocation method is used to allocate the remaining time slots in the scheduling period except the first synchronization time slot and the second synchronization time slot.
  • the number M and number N of time slots needed are predicted according to the HiD2D mode only and the STA mode only, and then the allocation is coordinated according to M, N and the number of remaining time slots. Since the actual traffic demand is taken into consideration, the accuracy of determining the first data time slot and the second data time slot is improved.
  • predicting the number M of time slots required when only using the HiD2D mode for data transmission, and the number N of time slots corresponding to the time required for data transmission only using the STA mode can use existing implementations, This embodiment does not describe in detail. For example, forecasting is made based on factors such as business type, traffic size, and throughput bandwidth capability.
  • the value of the time slot control Bitmap can be all set to 1, that is, 100% of the time slots are scheduled; when the service performed by the electronic device is a light-load screen projection service, the value of the time slot control Bitmap can be "1100...
  • the first electronic device when the first electronic device conducts services with the second electronic device in the HiD2D mode, the first electronic device may be a service initiator or a service receiver. If the first electronic device is the initiator of the service, it can directly predict the number M of time slots required when only using the HiD2D mode for data transmission, and the number of time slots corresponding to the time required for data transmission only using the STA mode Number N. If the first electronic device is the recipient of the service, the first electronic device may receive relevant information sent by the second electronic device, and determine M and N according to the relevant information. Wherein, this embodiment does not limit the content of the relevant information, and the relevant information is used to determine M and N. For example, the relevant information may include at least one of service type, traffic size, and throughput bandwidth capability.
  • determining the first data time slot and the second data time slot in the remaining time slots according to M and N may include:
  • the value of the time slot control Bitmap may be a sequence of "1100", that is, 1/2 of the time slots are scheduled.
  • 1/2 of the time slots are scheduled.
  • M+N is 3/4 of the number of remaining time slots. Therefore, time slot 0 and time slot 1 are the first synchronization time slot, time slot 8 is the second synchronization time slot, time slot 2 to time slot 3, time slot 6 to time slot 7 are the first data time slots in HiD2D mode , time slot 9 is the second data time slot in the STA mode, and time slots 4 to 5 are idle time slots. The status of the remaining slots is not shown.
  • M+N ⁇ the number of remaining time slots it may also include:
  • the time slots other than the M time slots and the N time slots in the remaining time slots are determined as the first data time slots or the second data time slots.
  • determining the first data time slot and the second data time slot in the remaining time slots according to M and N may include:
  • the first data time slot and the second data time slot are determined in the remaining time slots according to a preset scheduling rule.
  • the preset scheduling rule includes any one of the following: strict priority (strict priority, SP) scheduling, round robin (RR) scheduling or weighted round robin (WRR) scheduling.
  • the remaining time slots cannot satisfy the M time slots required by the HiD2D mode and the N time slots required by the STA mode.
  • a preset scheduling algorithm needs to be used to coordinate the allocation of the first data time slot and the second data time slot. Data time slots, thereby improving the resource allocation effect.
  • the preset scheduling algorithm includes but not limited to: SP scheduling, RR scheduling and WRR scheduling.
  • SP scheduling can guarantee the allocation of data slots in high priority mode first.
  • RR scheduling follows the principle of fairness, and the numbers of the first data time slot and the number of the second data time slot may be the same or similar.
  • WRR scheduling can allocate data slots according to weights corresponding to HiD2D mode and STA mode respectively.
  • determining the first data time slot and the second data time slot in the remaining time slots according to the preset scheduling rule may include:
  • M slots in the remaining slots are determined as first data slots, and slots other than the M slots in the remaining slots are determined as second data slots. or,
  • N slots in the remaining slots are determined as second data slots, and slots other than the N slots in the remaining slots are determined as first data slots.
  • the data transmission requirement in the HiD2D mode can be met, or the data transmission requirement in the STA mode can be met.
  • determining the first data slot and the second data slot in the remaining slots according to the preset scheduling rule may include:
  • the value of the slot control Bitmap is a sequence of all 1s, that is, 100% of the slots are scheduled.
  • 1/2 of the time slots are scheduled. M+N is greater than the number of remaining time slots. Therefore, the numbers of data time slots required by the HiD2D mode and the STA mode are respectively reduced.
  • time slot 0 and time slot 1 are the first synchronization time slot
  • time slot 8 is the second synchronization time slot
  • time slot 2 to time slot 4 time slot 6 to time slot 7
  • time slot Slot 9 is the first data slot in the HiD2D mode
  • slot 5 is the second data slot in the STA mode. The status of the remaining slots is not shown.
  • the number of data time slots required by the HiD2D mode and the STA mode is relatively fair, so as to avoid large rate fluctuations for data transmission in the HiD2D mode and the STA mode.
  • determining the first data time slot and the second data time slot in the remaining time slots according to the preset scheduling rule may include:
  • the numbers of data time slots required for the HiD2D mode and the STA mode are reduced according to weights, so as to avoid large rate fluctuations for data transmission in the HiD2D mode and the STA mode.
  • this application also provides a resource allocation method in dual WiFi mode, which is applicable to the DBAC scenario of dual devices.
  • An electronic device for example, the mobile phone 1 in FIG. 9A.
  • the execution subject may be referred to as a first electronic device.
  • the first electronic device uses the HiD2D mode to perform the first service with the second electronic device, and the first electronic device initiates the first service.
  • Both the first electronic device and the second electronic device are connected to an access node AP.
  • the second electronic device is, for example, the mobile phone 2 in FIG. 9A .
  • the first electronic device sends time slot configuration information to the second electronic device.
  • the time slot configuration information is used to indicate the positions of the first data time slot and the second data time slot in the scheduling period.
  • the first electronic device may determine the time slot configuration information.
  • the time slot configuration information may be a time slot control Bitmap.
  • the first synchronization time slot in the scheduling period may include time slot configuration information.
  • the first synchronization time slot in the current scheduling period may include time slot configuration information of the current scheduling period.
  • the first synchronization time slot in the current scheduling period may include time slot configuration information of a next scheduling period after the current scheduling period.
  • this application also provides a resource allocation method in WiFi dual mode, which is suitable for DBAC scenarios with more than three devices.
  • the execution subject can use STA mode and HiD2D mode for DBAC multiplexing , for example, mobile phone 1, mobile phone 2 or mobile phone 3 in FIG. 10 .
  • the execution subject may be referred to as a first electronic device.
  • the first electronic device is respectively connected to the second electronic device and the third electronic device in HiD2D mode.
  • the first electronic device, the second electronic device and the third electronic device are all connected to the AP. Both the second electronic device and the third electronic device use the HiD2D mode and the STA mode to perform DBAC multiplexing.
  • determining the first data time slot and the second data time slot may include:
  • the first time slot configuration information between the first electronic device and the second electronic device, and the second time slot configuration information between the first electronic device and the third electronic device are acquired.
  • the first time slot configuration information is used to indicate the positions of the first data time slot and the second data time slot in the scheduling cycle when the first electronic device communicates with the second electronic device
  • the second time slot configuration information is used to indicate the position of the first data time slot
  • the union of the positions of the first data time slots respectively indicated by the first time slot configuration information and the second time slot configuration information is determined as the first data time slot, and the first time slot configuration information and the second time slot configuration information are determined as the first data time slot.
  • the intersection of the positions of the second data time slots respectively indicated by the configuration information of the two time slots is determined as the second data time slot.
  • the first electronic device, the second electronic device, or the third electronic device may obtain the time slot configuration information, and reference may be made to the foregoing embodiments of the present application, which will not be repeated here.
  • the first electronic device is a mobile phone 1
  • the second electronic device is a mobile phone 2
  • the third electronic device is a mobile phone 3 .
  • the first time slot configuration information between mobile phone 1 and mobile phone 2 indicates that time slots 2 to 3, and 6 to 7 are the first data time slots, and time slots 4 to 5 are Second data slot.
  • the second time slot configuration information between mobile phone 1 and mobile phone 3 indicates that time slot 2 and time slot 7 are the first data time slots, and time slots 3 to 6 are the second data time slots.
  • the resource configurations of time slot 3 and time slot 6 conflict.
  • the collection of the first data time slots respectively indicated by the first time slot configuration information and the second time slot configuration information is determined as the final first data time slot of mobile phone 1, including time slot 2 to time slot 3 , time slot 6 to time slot 7; the intersection of the second data time slot indicated by the first time slot configuration information and the second time slot configuration information respectively is determined as the final second data time slot of mobile phone 1, including time slot 4 ⁇ time slot 5.
  • the electronic device includes hardware and/or software modules corresponding to each function.
  • the electronic device may be a first electronic device, a second electronic device or a third electronic device.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions in combination with the embodiments for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • the embodiment of the present application may divide the electronic device into functional modules according to the above method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module. 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, and there may be other division methods in actual implementation. It should be noted that the names of the modules in the embodiments of the present application are illustrative, and the names of the modules are not limited during actual implementation.
  • FIG. 20 is a schematic structural diagram of a resource allocation device in a WiFi dual mode provided by an embodiment of the present application.
  • the resource allocation device under the WiFi dual mode provided in this embodiment is used to implement the resource allocation method under the WiFi dual mode provided by the method embodiment of the present application, and the technical principle and technical effect are similar.
  • the resource allocation device under the WiFi dual mode can be applied to the first electronic device, and the first electronic device uses the WiFi direct mode and the STA mode to perform DBAC multiplexing, and the device include:
  • the first determining module 2001 is configured to determine a first synchronization time slot and a second synchronization time slot in a plurality of time slots included in the scheduling period of the WiFi direct connection mode; the time slots are the time slots of the WiFi direct connection mode A time unit, the first synchronization time slot is used for time synchronization of the first electronic device in the WiFi direct mode, and the time corresponding to the second synchronization time slot is used for the time synchronization of the first electronic device in the WiFi direct mode. Time synchronization in the above STA mode;
  • the second determination module 2002 is configured to determine the first data time slot and the second data time slot in the remaining time slots; the remaining time slots are the first synchronization time slot and the first synchronization time slot among the plurality of time slots A time slot other than the second synchronization time slot, the first data time slot is used for data transmission of the first electronic device in the WiFi direct mode, and the time corresponding to the second data time slot is used for Data transmission of the first electronic device in the STA mode.
  • the first determination module 2001 is used for:
  • the offset time is used to indicate the minimum time interval between the reference time slot in the first synchronization time slot and the starting point of the beacon frame of the STA mode;
  • the second synchronization time slot is determined in the plurality of time slots; wherein, the second synchronization time slot is The time slot where the starting point of the beacon frame is located.
  • the first synchronization time slot includes the first T time slots in the plurality of time slots, the reference time slot is the first time slot in the first T time slots, and T is positive integer.
  • the first determination module 2001 is used for:
  • a switching module is also included, and the switching module is used for:
  • the DBAC multiplexing is switched from using the WiFi direct mode and the STA mode to using the STA mode.
  • the switching module is also used for:
  • the preset duration protection duration+beacon period*I of the beacon frame, where I is a positive integer.
  • the second determining module 2002 is used for:
  • the first data time slot and the second data time slot are determined in the remaining time slots according to the ratio of the number of time slots.
  • the second determining module 2002 is used for:
  • the second determining module 2002 is used for:
  • the second determining module 2002 is further configured to:
  • the second determining module 2002 is used for:
  • the preset The scheduling rule includes any one of the following: SP scheduling, RR scheduling or WRR scheduling.
  • the preset scheduling rule includes the SP scheduling
  • the second determining module 2002 is configured to:
  • the preset scheduling rule includes the RR scheduling
  • the second determining module 2002 is configured to:
  • the preset scheduling rule includes the WRR scheduling
  • the second determining module 2002 is configured to:
  • the first electronic device uses the WiFi direct connection mode to perform the first service with the second electronic device, and the first electronic device initiates the first service;
  • the second electronic device uses the The WiFi direct connection mode and the STA mode perform DBAC multiplexing, and also include a sending module, and the sending module is used for:
  • the first time slot configuration information is used to indicate the positions of the first data time slot and the second data time slot in the scheduling period.
  • the first electronic device is respectively connected to the second electronic device and the third electronic device using the WiFi direct connection mode; the second electronic device and the third electronic device both use the WiFi direct connection mode and the STA mode are DBAC multiplexed, and the second determination module 2002 is used for:
  • first time slot configuration information between the first electronic device and the second electronic device, and second time slot configuration information between the first electronic device and the third electronic device; wherein , the first time slot configuration information is used to indicate the positions of the first data time slot and the second data time slot in the scheduling period when the first electronic device communicates with the second electronic device, the first The two-slot configuration information is used to indicate the positions of the first data time slot and the second data time slot in the scheduling period when the first electronic device communicates with the third electronic device;
  • the first data time slot and the second data time slot are determined in the remaining time slots according to the first time slot configuration information and the second time slot configuration information.
  • the electronic device may be a first electronic device, a second electronic device or a third electronic device.
  • the electronic device includes: a processor 2101 , a receiver 2102 , a transmitter 2103 , a memory 2104 and a bus 2105 .
  • the processor 2101 includes one or more processing cores, and the processor 2101 executes various functional applications and information processing by running software programs and modules.
  • the receiver 2102 and the transmitter 2103 can be implemented as a communication component, and the communication component can be a baseband chip.
  • the memory 2104 is connected to the processor 2101 through the bus 2105 .
  • the memory 2104 may be used to store at least one program instruction, and the processor 2101 may be used to execute at least one program instruction, so as to implement the technical solutions of the above-mentioned embodiments. Its implementation principle and technical effect are similar to those of the related embodiments of the above method, and will not be repeated here.
  • the processor can read the software program in the memory, interpret and execute the instructions of the software program, and process the data of the software program.
  • the processor performs baseband processing on the data to be sent, and outputs the baseband signal to the control circuit in the control circuit. send.
  • the control circuit receives the radio frequency signal through the antenna, converts the radio frequency signal into a baseband signal, and outputs the baseband signal to the processor, and the processor converts the baseband signal into data and processes the data.
  • FIG. 21 only shows a memory and a processor. In an actual electronic device, there may be multiple processors and memories.
  • the storage may also be called a storage medium or a storage electronic device, etc., which is not limited in this embodiment of the present application.
  • the processor may include a baseband processor and a central processing unit, the baseband processor is mainly used for processing communication data, and the central processing unit is mainly used for executing software programs and processing data of the software programs.
  • the baseband processor and the central processing unit may be integrated into one processor, or may be independent processors interconnected through technologies such as a bus.
  • an electronic device may include multiple baseband processors to adapt to different network standards, an electronic device may include multiple central processors to enhance its processing capability, and various components of the electronic device may be connected through various buses.
  • the baseband processor may also be expressed as a baseband processing circuit or a baseband processing chip.
  • the central processing unit may also be expressed as a central processing circuit or a central processing chip.
  • the function of processing the communication protocol and communication data can be built in the processor, or can be stored in the memory in the form of a software program, and the processor executes the software program to realize the baseband processing function.
  • the memory can be integrated in the processor, or it can be independent from the processor.
  • the memory includes a high-speed cache, which can store frequently accessed data/instructions.
  • the processor may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or Execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application.
  • a general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • the memory may be a non-volatile memory, such as a hard disk (hard disk drive, HDD) or a solid-state drive (solid-state drive, SS), etc., or a volatile memory (volatile memory), such as Random-access memory (RAM).
  • a memory is, without limitation, any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
  • the memory in the embodiment of the present application may also be a circuit or any other device capable of implementing a storage function, and is used for storing program instructions and/or data.
  • the methods provided in the various embodiments of the present application may be fully or partially implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may 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 the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, network equipment, user equipment or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, 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 readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media integrated.
  • the available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape, etc.) ), optical media (for example, digital video disc (DWD), or semiconductor media (for example, SSD), etc.
  • An embodiment of the present application provides a computer program product.
  • the computer program product When the computer program product is running on an electronic device, it enables the electronic device to execute the technical solution in the above-mentioned method embodiment, and its realization principle and technical effect are similar to those of the above-mentioned related embodiments. , which will not be repeated here.
  • An embodiment of the present application provides a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by an electronic device, the electronic device executes the technical solutions of the foregoing embodiments. Its implementation principle and technical effect are similar to those of the above-mentioned related embodiments, and will not be repeated here.

Abstract

本申请实施例涉及通信技术领域,提供一种WiFi双模式下的资源分配方法、设备和存储介质,应用于采用WiFi直连模式和STA模式进行DBAC复用的电子设备。WiFi双模式下的资源分配方法包括:在WiFi直连模式的调度周期中先确定第一同步时隙和第二同步时隙,再确定第一数据时隙和第二数据时隙。其中,第一同步时隙用于WiFi直连模式的时间同步,第二同步时隙对应的时间用于STA模式的时间同步,第一数据时隙用于WiFi直连模式的数据传输,第二数据时隙对应的时间用于STA模式的数据传输。通过先确定同步时隙,再确定数据时隙,实现了电子设备采用STA模式和WiFi直连模式进行DBAC复用时的传输资源分配。

Description

WiFi双模式下的资源分配方法、设备和存储介质
本申请要求于2021年11月29日提交国家知识产权局、申请号为202111448207.1、申请名称为“WiFi双模式下的资源分配方法、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,尤其涉及一种WiFi双模式下的资源分配方法、设备和存储介质。
背景技术
无线保真(wireless fidelity,WiFi)技术是广泛使用的一种无线网络传输技术。随着WiFi技术和终端技术的发展,WiFi使用场景越来越多,例如,多设备之间的互联互通。该场景下,多个终端连接在一起协同工作,业务数据在多个终端设备传输,可以支持多设备协同工作的应用与业务,例如多屏协同、信息共享等。
在多设备互联互通的场景下,终端通常工作在多种WiFi模式下,例如,无线工作站(station,STA)模式和WiFi直连模式。终端工作在STA模式和WiFi直连模式时如何配置传输资源亟待解决。
发明内容
本申请实施例提供一种WiFi双模式下的资源分配方法、设备和存储介质,实现了电子设备采用STA模式和WiFi直连模式进行DBAC复用时的传输资源分配。
第一方面,本申请实施例提供了一种WiFi双模式下的资源分配方法,应用于第一电子设备,第一电子设备采用WiFi直连模式和STA模式进行DBAC复用,方法包括:在WiFi直连模式的调度周期包括的多个时隙中确定第一同步时隙和第二同步时隙;时隙为WiFi直连模式的时间单位,第一同步时隙用于第一电子设备在WiFi直连模式下的时间同步,第二同步时隙对应的时间用于第一电子设备在STA模式下的时间同步;在剩余时隙中确定第一数据时隙和第二数据时隙;剩余时隙为多个时隙中除第一同步时隙和第二同步时隙之外的时隙,第一数据时隙用于第一电子设备在WiFi直连模式下的数据传输,第二数据时隙对应的时间用于第一电子设备在STA模式下的数据传输。
通过第一方面提供的WiFi双模式下的资源分配方法,适用于电子设备采用STA模式和HiD2D模式进行DBAC复用场景。在HiD2D模式的调度周期中,首先确定第一同步时隙和第二同步时隙。第一同步时隙确保了电子设备在HiD2D模式下与其他设备通信时的时间同步,第二同步时隙确保了电子设备在STA模式下与其他设备通信时的时间同步。然后,再确定用于数据传输的第一数据时隙和第二数据时隙。通过在调度周期中先确定用于同步的时隙,再确定用于数据传输的时隙,在STA模式和HiD2D模式采用不同的时隙结构时,实现了电子设备采用STA模式和HiD2D模式进行DBAC复用时的资源分配,实现了电子 设备同时和多个设备进行WiFi通信,满足了分布式业务的需求。
一种可能的实现方式中,在WiFi直连模式的调度周期包括的多个时隙中确定第一同步时隙和第二同步时隙,包括:在多个时隙中确定第一同步时隙;获取偏移时间;偏移时间用于指示第一同步时隙中的基准时隙与STA模式的信标帧的起始点之间的最小时间间隔;根据基准时隙、偏移时间和信标帧的信标周期,在多个时隙中确定第二同步时隙;其中,第二同步时隙为信标帧的起始点所在的时隙。
在该实现方式中,通过设置偏移时间,第一同步时隙和第二同步时隙在调度周期中的位置更加灵活。
一种可能的实现方式中,第一同步时隙包括多个时隙中的前T个时隙,基准时隙为前T个时隙中的第一个时隙,T为正整数。
一种可能的实现方式中,根据基准时隙、偏移时间和信标帧的信标周期,在多个时隙中确定第二同步时隙,包括:根据基准时隙和偏移时间,在多个时隙中确定基准时隙之后的第一个第二同步时隙;根据第一个第二同步时隙和信标周期,在多个时隙中继续确定第二同步时隙。
一种可能的实现方式中,WiFi双模式下的资源分配方法还包括:确定在第二同步时隙对应的时间内是否接收到AP发送的信标帧;若在第二同步时隙对应的时间内没有接收到AP发送的信标帧,且在连续的预设个数的第二同步时隙对应的时间内均没有接收到AP发送的信标帧,则从采用WiFi直连模式和STA模式进行DBAC复用切换为采用STA模式。
在该实现方式中,如果电子设备连续接收不到AP发送的信标帧达到预设个数,可以触发信标帧的强制同步,即,从采用HiD2D模式和STA模式进行DBAC复用切换为只采用STA模式,等待接收信标帧,为电子设备可以成功接收到信标帧提供保障。
一种可能的实现方式中,WiFi双模式下的资源分配方法还包括:若在采用STA模式之后的预设时长内没有接收到AP发送的信标帧,则从采用STA模式切换为采用WiFi直连模式。
在该实现方式中,电子设备强制进行信标帧的同步后,依然接收不到信标帧,可以确定STA掉线,从只采用STA模式切换为只采用HiD2D模式,确保电子设备可以采用HiD2D模式进行业务。
一种可能的实现方式中,预设时长=保护时长+信标帧的信标周期*I,I为正整数。
一种可能的实现方式中,在剩余时隙中确定第一数据时隙和第二数据时隙,包括:获取第一数据时隙和第二数据时隙的时隙个数比值;根据时隙个数比值在剩余时隙中确定第一数据时隙和第二数据时隙。
在该实现方式中,采用静态分配的方式将剩余的时隙按照预设的比例分配给HiD2D模式和STA模式,实现方式简单。
一种可能的实现方式中,在剩余时隙中确定第一数据时隙和第二数据时隙,包括:确定只采用WiFi直连模式进行数据传输时需要的时隙的个数M,以及,只采用STA模式进行数据传输时需要的时间对应的时隙的个数N;M和N均为正整数;根据M和N在剩余时隙中确定第一数据时隙和第二数据时隙。
在该实现方式中,采用动态分配的方式在剩余时隙中确定第一数据时隙和第二数据时隙。先分别按照只采用HiD2D模式和只采用STA模式预测需要的时隙个数M和个数N, 再根据M、N和剩余时隙的个数协调分配。由于考虑了实际业务量需求,提高了确定第一数据时隙和第二数据时隙的准确性。
一种可能的实现方式中,根据M和N在剩余时隙中确定第一数据时隙和第二数据时隙,包括:若M+N≤剩余时隙的个数,则将剩余时隙中的M个时隙确定为第一数据时隙,并将剩余时隙中除M个时隙之外的N个时隙确定为第二数据时隙。
在该实现方式中,剩余时隙可以满足电子设备在HiD2D模式和STA模式的数据传输需求,没有资源分配冲突,可以为HiD2D模式分配M个时隙,并为STA模式分配N个时隙。
一种可能的实现方式中,若M+N<剩余时隙的个数,WiFi双模式下的资源分配方法还包括:将剩余时隙中除M个时隙和N个时隙之外的时隙确定为第一数据时隙或第二数据时隙。
一种可能的实现方式中,根据M和N在剩余时隙中确定第一数据时隙和第二数据时隙,包括:若M+N>剩余时隙的个数,则按照预设调度规则在剩余时隙中确定第一数据时隙和第二数据时隙;其中,预设调度规则包括下列中的任意一项:SP调度、RR调度或WRR调度。
在该实现方式中,剩余时隙无法满足电子设备在HiD2D模式和STA模式的数据传输需求,存在资源分配冲突,可以按照SP调度、RR调度或WRR调度为HiD2D模式和STA模式分配时隙。
一种可能的实现方式中,预设调度规则包括SP调度,按照预设调度规则在剩余时隙中确定第一数据时隙和第二数据时隙,包括:将剩余时隙中的M个时隙确定为第一数据时隙,将剩余时隙中除M个时隙之外的时隙确定为第二数据时隙;或者,将剩余时隙中的N个时隙确定为第二数据时隙,将剩余时隙中除N个时隙之外的时隙确定为第一数据时隙。
在该实现方式中,采用SP调度规则,可以满足HiD2D模式下的数据传输需求,或者满足STA模式下的数据传输需求。
一种可能的实现方式中,预设调度规则包括RR调度,按照预设调度规则在剩余时隙中确定第一数据时隙和第二数据时隙,包括:将剩余时隙中的M-(M+N-K)/2个时隙确定为第一数据时隙,将剩余时隙中除M-(M+N-K)/2个时隙之外的时隙确定为第二数据时隙;其中,K为剩余时隙的个数。
在该实现方式中,采用RR调度规则,对HiD2D模式和STA模式分别所需的数据时隙个数相对公平的进行减少,避免对HiD2D模式和STA模式下的数据传输造成较大的速率波动。
一种可能的实现方式中,预设调度规则包括WRR调度,按照预设调度规则在剩余时隙中确定第一数据时隙和第二数据时隙,包括:将剩余时隙中的M-(M+N-K)*q个时隙确定为第一数据时隙,将剩余时隙中除M-(M+N-K)*q个时隙之外的时隙确定为第二数据时隙;其中,K为剩余时隙的个数,0<q<1。
在该实现方式中,采用WRR调度规则,对HiD2D模式和STA模式分别所需的数据时隙个数按照权值都进行减少,避免对HiD2D模式和STA模式下的数据传输造成较大的速率波动。
一种可能的实现方式中,第一电子设备采用WiFi直连模式与第二电子设备进行第一 业务,且第一电子设备发起第一业务;第二电子设备采用WiFi直连模式和STA模式进行DBAC复用,WiFi双模式下的资源分配方法还包括:向第二电子设备发送第一时隙配置信息;第一时隙配置信息用于指示调度周期中第一数据时隙和第二数据时隙的位置。
在该实现方式中,适用于双设备的DBAC场景,即,进行通信的两个设备均采用WiFi直连模式和STA模式进行DBAC复用,且接入同一个AP。该场景下,可以由业务的发起者决策两个设备之间的资源分配结果。
一种可能的实现方式中,第一电子设备采用WiFi直连模式分别与第二电子设备和第三电子设备连接;第二电子设备和第三电子设备均采用WiFi直连模式和STA模式进行DBAC复用,在剩余时隙中确定第一数据时隙和第二数据时隙,包括:获取第一电子设备和第二电子设备之间的第一时隙配置信息,以及,第一电子设备和第三电子设备之间的第二时隙配置信息;其中,第一时隙配置信息用于指示第一电子设备和第二电子设备通信时在调度周期中第一数据时隙和第二数据时隙的位置,第二时隙配置信息用于指示第一电子设备和第三电子设备通信时在调度周期中第一数据时隙和第二数据时隙的位置;根据第一时隙配置信息和第二时隙配置信息,在剩余时隙中确定第一数据时隙和第二数据时隙。
在该实现方式中,适用于三设备以上的DBAC场景,即,进行相互通信的至少三个设备均采用WiFi直连模式和STA模式进行DBAC复用,且接入同一个AP。该场景下,对于每个设备,该电子设备可以先按照双设备的DBAC场景下的方法获取与其他设备之间的资源调度结果,再根据多个资源调度结果确定最终的资源调度结果。
第二方面,本申请实施例提供一种WiFi双模式下的资源分配装置,应用于第一电子设备,第一电子设备采用WiFi直连模式和STA模式进行DBAC复用,装置包括:第一确定模块,用于在WiFi直连模式的调度周期包括的多个时隙中确定第一同步时隙和第二同步时隙;时隙为WiFi直连模式的时间单位,第一同步时隙用于第一电子设备在WiFi直连模式下的时间同步,第二同步时隙对应的时间用于第一电子设备在STA模式下的时间同步;第二确定模块,用于在剩余时隙中确定第一数据时隙和第二数据时隙;剩余时隙为多个时隙中除第一同步时隙和第二同步时隙之外的时隙,第一数据时隙用于第一电子设备在WiFi直连模式下的数据传输,第二数据时隙对应的时间用于第一电子设备在STA模式下的数据传输。
一种可能的实现方式中,第一确定模块用于:在多个时隙中确定第一同步时隙;获取偏移时间;偏移时间用于指示第一同步时隙中的基准时隙与STA模式的信标帧的起始点之间的最小时间间隔;根据基准时隙、偏移时间和信标帧的信标周期,在多个时隙中确定第二同步时隙;其中,第二同步时隙为信标帧的起始点所在的时隙。
一种可能的实现方式中,第一同步时隙包括多个时隙中的前T个时隙,基准时隙为前T个时隙中的第一个时隙,T为正整数。
一种可能的实现方式中,第一确定模块用于:根据基准时隙和偏移时间,在多个时隙中确定基准时隙之后的第一个第二同步时隙;根据第一个第二同步时隙和信标周期,在多个时隙中继续确定第二同步时隙。
一种可能的实现方式中,还包括切换模块,切换模块用于:确定在第二同步时隙对应的时间内是否接收到AP发送的信标帧;若在第二同步时隙对应的时间内没有接收到AP发送的信标帧,且在连续的预设个数的第二同步时隙对应的时间内均没有接收到AP发送 的信标帧,则从采用WiFi直连模式和STA模式进行DBAC复用切换为采用STA模式。
一种可能的实现方式中,切换模块还用于:若在采用STA模式之后的预设时长内没有接收到AP发送的信标帧,则从采用STA模式切换为采用WiFi直连模式。
一种可能的实现方式中,预设时长=保护时长+信标帧的信标周期*I,I为正整数。
一种可能的实现方式中,第二确定模块用于:获取第一数据时隙和第二数据时隙的时隙个数比值;根据时隙个数比值在剩余时隙中确定第一数据时隙和第二数据时隙。
一种可能的实现方式中,第二确定模块用于:确定只采用WiFi直连模式进行数据传输时需要的时隙的个数M,以及,只采用STA模式进行数据传输时需要的时间对应的时隙的个数N;M和N均为正整数;根据M和N在剩余时隙中确定第一数据时隙和第二数据时隙。
一种可能的实现方式中,第二确定模块用于:若M+N≤剩余时隙的个数,则将剩余时隙中的M个时隙确定为第一数据时隙,并将剩余时隙中除M个时隙之外的N个时隙确定为第二数据时隙。
一种可能的实现方式中,若M+N<剩余时隙的个数,第二确定模块还用于:将剩余时隙中除M个时隙和N个时隙之外的时隙确定为第一数据时隙或第二数据时隙。
一种可能的实现方式中,第二确定模块用于:若M+N>剩余时隙的个数,则按照预设调度规则在剩余时隙中确定第一数据时隙和第二数据时隙;其中,预设调度规则包括下列中的任意一项:SP调度、RR调度或WRR调度。
一种可能的实现方式中,预设调度规则包括SP调度,第二确定模块用于:将剩余时隙中的M个时隙确定为第一数据时隙,将剩余时隙中除M个时隙之外的时隙确定为第二数据时隙;或者,将剩余时隙中的N个时隙确定为第二数据时隙,将剩余时隙中除N个时隙之外的时隙确定为第一数据时隙。
一种可能的实现方式中,预设调度规则包括RR调度,第二确定模块用于:将剩余时隙中的M-(M+N-K)/2个时隙确定为第一数据时隙,将剩余时隙中除M-(M+N-K)/2个时隙之外的时隙确定为第二数据时隙;其中,K为剩余时隙的个数。
一种可能的实现方式中,预设调度规则包括WRR调度,第二确定模块用于:将剩余时隙中的M-(M+N-K)*q个时隙确定为第一数据时隙,将剩余时隙中除M-(M+N-K)*q个时隙之外的时隙确定为第二数据时隙;其中,K为剩余时隙的个数,0<q<1。
一种可能的实现方式中,第一电子设备采用WiFi直连模式与第二电子设备进行第一业务,且第一电子设备发起第一业务;第二电子设备采用WiFi直连模式和STA模式进行DBAC复用,还包括发送模块,发送模块用于:向第二电子设备发送第一时隙配置信息;第一时隙配置信息用于指示调度周期中第一数据时隙和第二数据时隙的位置。
一种可能的实现方式中,第一电子设备采用WiFi直连模式分别与第二电子设备和第三电子设备连接;第二电子设备和第三电子设备均采用WiFi直连模式和STA模式进行DBAC复用,第二确定模块用于:获取第一电子设备和第二电子设备之间的第一时隙配置信息,以及,第一电子设备和第三电子设备之间的第二时隙配置信息;其中,第一时隙配置信息用于指示第一电子设备和第二电子设备通信时在调度周期中第一数据时隙和第二数据时隙的位置,第二时隙配置信息用于指示第一电子设备和第三电子设备通信时在调度周期中第一数据时隙和第二数据时隙的位置;根据第一时隙配置信息和第二时隙配置信息, 在剩余时隙中确定第一数据时隙和第二数据时隙。
第三方面,提供一种电子设备,包括处理器,处理器用于与存储器耦合,并读取存储器中的指令并根据指令使得电子设备执行第一方面提供的方法。
第四方面,提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当指令在计算机或处理器上运行时,实现第一方面提供的方法。
第五方面,提供一种程序产品,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中,电子设备的至少一个处理器可以从所述可读存储介质读取所述计算机程序,所述至少一个处理器执行所述计算机程序使得该电子设备实施第一方面提供的方法。
附图说明
图1为本申请实施例提供的AP和STA通信的一种场景示意图;
图2为本申请实施例提供的AP广播信标帧的一种示意图;
图3为本申请实施例提供的电子设备采用P2P模式通信的一种场景示意图;
图4为本申请实施例提供的电子设备采用STA模式和P2P模式进行DBAC复用的一种场景示意图;
图5为图4中DBAC复用的工作原理示意图;
图6为本申请实施例提供的电子设备采用STA模式和P2P模式进行DBAC复用时的一种时隙分配示意图;
图7为本申请实施例提供的多设备互联互通的一种场景示意图;
图8A~图8B为本申请实施例提供的电子设备采用STA模式和HiD2D模式进行DBAC复用的一组场景示意图;
图9A~图9B为本申请实施例提供的电子设备采用STA模式和HiD2D模式进行DBAC复用的另一组场景示意图;
图10为本申请实施例提供的电子设备采用STA模式和HiD2D模式进行DBAC复用的另一个场景示意图;
图11为本申请实施例提供的HiD2D模式的时隙结构和时隙控制位映射的示意图;
图12为本申请实施例提供的第一同步时隙和第二同步时隙的一种示意图;
图13为本申请实施例提供的第一同步时隙和第二同步时隙的另一种示意图;
图14为本申请实施例提供的WiFi双模式下的资源分配方法的一种流程图;
图15为本申请实施例提供的第一数据时隙和第二数据时隙的一种示意图;
图16为本申请实施例提供的第一数据时隙和第二数据时隙的另一种示意图;
图17为本申请实施例提供的第一数据时隙和第二数据时隙的又一种示意图;
图18为本申请实施例提供的第一数据时隙和第二数据时隙的又一种示意图;
图19为本申请实施例提供的第一数据时隙和第二数据时隙的又一种示意图;
图20为本申请实施例提供的WiFi双模式下的资源分配装置的一种结构示意图;
图21为本申请实施例提供的电子设备的一种结构示意图。
具体实施方式
下面结合附图描述本申请实施例。
本申请实施例提供的WiFi双模式下的资源分配方法,应用于电子设备采用WiFi双模式进行双频自适应并发(dual band adaptive concurrent,DBAC)复用的场景。WiFi双模式是指两种不同的WiFi工作模式。
本申请实施例对电子设备的名称和类型不做限定。例如,电子设备也称为终端、终端设备、用户设备、移动终端或WiFi设备等,可以进行WiFi通信。目前,一些电子设备的举例为:手机、平板电脑、笔记本电脑、掌上电脑、个人电脑、智能音箱、可穿戴设备、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、移动互联网设备(mobile internet device,MID)或者智慧家庭(smart home)中的设备等。
为了方便说明,本申请实施例以电子设备为手机作为示例。
下面,对本申请实施例涉及的概念进行说明。
1、访问节点(access point,AP)模式、STA模式、信标(Beacon)帧、信标(Beacon)周期
电气与电子工程师协会(institute of electrical and electronics engineers,IEEE)802.11协议定义了AP和STA的两种工作模式。
AP是无线网络的创建者,是无线网络的中心节点,例如,路由器、无线网关、无线网桥等。连接到无线网络中的电子设备称为STA站点或STA,例如,手机、电脑等。AP工作在AP模式,为STA提供无线接入服务,提供数据访问。STA工作在STA模式,通过连接AP进行数据访问,STA本身不接受其他设备的无线接入。AP和AP之间可以连接,STA与STA之间无法直接连接。由AP和STA组成的无线网络是一种以AP为中心的中心式网络通信结构。
示例性的,图1为本申请实施例提供的AP和STA通信的一种场景示意图。如图1所示,路由器作为AP,工作在AP模式。手机1、手机2和手机3均作为STA,分别与路由器连接,工作在STA模式。手机1和手机2之间、手机1和手机3之间、手机2和手机3之间无法直接WiFi通信。
其中,本申请实施例对STA进行的业务不做限定,例如,上网类业务,包括但不限于浏览网页、聊天、收发邮件、视频通话等。
IEEE802.11协议中规定了多种类型的帧结构,例如,信标(Beacon)帧、探测请求(Probe Request)帧、探测响应(Probe Response)帧、数据(Data)帧等。
(1)信标帧:AP周期性广播信标帧,用于让周围的STA或AP发现自己。相应的,STA监听AP广播的信标帧。AP广播信标帧的周期称为信标(Beacon)周期或信标(Beacon)间隔,可以标记为参数Beacon_Interval。信标帧包括头部(header),用于AP与STA之间的时间同步。
示例性的,图2为本申请实施例提供的AP广播信标帧的一种示意图。如图2所示,AP根据信标周期广播信标帧。本申请实施例对信标周期的数值不做限定,例如,100ms。
(2)Probe Request帧:是STA主动搜索附近的AP时发送的,用于探测可以接入的AP。
(3)Probe Response帧:当AP接收到STA发送的Probe Request帧后,可以回应Probe  Response帧。
(4)数据帧:用于STA和AP建立连接后的数据传输,可以采用信标周期的时隙结构。
2、WiFi点对点(peer to peer,P2P)模式
WiFi P2P协议基于802.11协议框架开发,是一种点对点的连接技术,使得多个电子设备在没有AP的情况下也能构成一个网络,称为P2P网络(P2P Network)或者P2P组(P2P Group)。
两个电子设备之间可以直接建立连接,工作模式称为WiFi P2P模式或P2P模式。这两个电子设备中,一个电子设备类似于AP,称为群组拥有者(group owner,GO),另一个电子设备类似于STA,称为群组用户(group client,GC)。P2P网络中只能有一个GO,GO作为网络的中心节点可以与一个或多个GC通信,GC和GC之间不能直接通信。P2P网络是一种以GO为中心的中心式网络通信结构。
示例性的,图3为本申请实施例提供的电子设备采用P2P模式通信的一种场景示意图。如图3所示,手机4作为GO,工作在P2P模式。手机1、手机2和手机3均作为GC,分别与手机4连接,工作在P2P模式。手机1和手机2之间、手机1和手机3之间、手机2和手机3之间无法直接进行WiFi通信。
其中,本申请实施例对电子设备在P2P模式下进行的业务不做限定,例如,投屏、文件传输等。
其中,电子设备在P2P模式下传输数据时,可以采用信标周期的时隙结构。
3、DBAC
一个电子设备可以同时和多个设备进行WiFi通信,本申请实施例对电子设备的WiFi工作模式和工作频率不做限定。例如,电子设备可以使用相同的工作频率和多个设备进行WiFi通信,也可以使用不同的工作频率分别和多个设备进行WiFi通信。
当电子设备采用时分复用的方式共享一套硬件资源,使用不同的工作频率分别和多个设备进行WiFi通信时,称为DBAC或DBAC复用。
下面结合图4和图5进行示例性说明。电子设备采用STA模式和P2P模式进行DBAC复用,但图4和图5并不对DBAC复用形成限定。
如图4所示,场景中包括路由器、手机1和手机2。手机1使用5GHz频段的信道40与路由器进行WiFi通信,例如进行上网业务,手机1工作在STA模式,路由器工作在AP模式。手机1还使用5GHz频段的信道36与手机2进行WiFi通信,例如进行投屏业务,手机1和手机2均工作在P2P模式。手机1采用时分复用的方式共享一套硬件资源,在某一时刻与路由器通信或者与手机2通信。示例性的,如图5所示,手机1通过动态分时切换,可以在T1时段和T5时段工作在信道40,与路由器连接进行上网业务;在T3时段工作在信道36,与手机2进行投屏业务。其中,T2时段和T4时段为电子设备切换频点的时间开销,本申请实施例对T1~T5时段的取值不做限定。
可见,电子设备在DBAC复用时,由于采用时分复用的方式通信,需要在时域上为不同的工作频率或为不同的工作方式分配传输资源。
4、电子设备采用STA模式和P2P模式进行DBAC复用时的资源分配
电子设备采用STA模式或P2P模式传输数据时,均采用信标周期的时隙结构。由于时 隙结构相同,当电子设备采用STA模式和P2P模式进行DBAC复用时,在一种实现方式中,可以采用固定时间片轮询的方式为STA模式和P2P模式分别分配传输资源。
示例性的,图6为本申请实施例提供的电子设备采用STA模式和P2P模式进行DBAC复用时的一种时隙分配示意图。如图6所示,信标周期例如为100ms,可以将信标周期拆分为4个25ms的时隙,进行P2P模式和STA模式的动态轮询调度分配。例如,第1个25ms分配给P2P模式,包括P2P时间片和信道切换时长。P2P时间片用于电子设备采用P2P模式进行数据传输,信道切换时长可以为2~5ms,为P2P模式与STA模式之间的切换时间开销。第2个25ms分配给STA模式,包括STA时间片和信道切换时长,STA时间片用于电子设备采用STA模式进行数据传输。
5、多设备之间互联互通的应用场景、WiFi直连模式、HiD2D模式
随着WiFi技术和终端技术的发展,WiFi使用场景越来越多,场景中设备的数量也越来越多。例如,一种应用场景为多设备之间的互联互通。该场景下,多个设备连接在一起协同工作,业务数据在多个设备之间传输,支持多设备协同工作的应用与业务,可以称为分布式业务。例如,多屏协同业务、信息共享业务等。
示例性的,图7为本申请实施例提供的多设备互联互通的一种场景示意图。如图7所示,场景中包括5个设备,分别为:手机、笔记本电脑、平板电脑、个人电脑和智能音箱。其中,任意两个设备之间可以通信。例如,手机可以与笔记本电脑和平板电脑进行多屏协同业务,手机上的内容可以在笔记本电脑和平板电脑上投屏显示。又例如,笔记本电脑可以与个人电脑进行投屏业务。又例如,平板电脑可以与智能音箱进行文件分享业务,例如,平板电脑上的音乐在智能音箱上播放。
可见,在多设备协同工作的场景中,要求任意两个设备之间可以建立连接,进行WiFi通信,可以对用户呈现出一个由多设备组成的超级终端。在该场景中,虽然可以采用WiFi P2P模式,但是,由于GO和GC的角色限制,并不能实现任意两个设备之间的连接,因此限制了分布式业务的实际应用需求。
本申请实施例提供了WiFi直连模式,电子设备工作在WiFi直连模式时,可以实现任意两个设备之间的WiFi通信。本申请实施例对WiFi直连模式的名称不做限定,当设备厂商不同、协议提出者等不同时,名称可以不同。例如,一种WiFi直连模式的名称为HiD2D模式。HiD2D是一种基于WiFi的终端互连组网协议,可以提供电子设备的多对多无角色自由互连。
6、电子设备采用STA模式和HiD2D模式进行DBAC复用的应用场景
为了满足多设备互联互通场景下分布式业务的需求,电子设备需要采用STA模式和HiD2D模式进行DBAC复用,从而实现一个电子设备同时和多个设备进行WiFi通信。此时,电子设备需要在时域上为STA模式和HiD2D模式分别分配传输资源。
下面对本申请实施例涉及的应用场景进行示例性说明。
(1)单设备的DBAC场景
可选的,在一个示例中,如图8A所示,场景中包括AP、手机1和手机2。手机1使用5GHz频段的信道36与AP进行WiFi通信,手机1工作在STA模式。手机1还使用5GHz频段的信道60与手机2进行WiFi通信,手机1和手机2均工作在HiD2D模式。手机1在某一时刻与AP通信或者与手机2通信,手机1采用STA模式和HiD2D模式进行DBAC 复用。可选的,对于手机1和手机2之间的业务,手机1可以为业务的发起者,也可以为业务的接收者。
可选的,在另一个示例中,如图8B所示,场景中包括AP1、AP2、手机1和手机2。
对于手机1,手机1使用5GHz频段的信道36与AP1进行WiFi通信,手机1工作在STA模式。手机1还使用5GHz频段的信道60与手机2进行WiFi通信,手机1和手机2均工作在HiD2D模式。手机1在某一时刻与AP1通信或者与手机2通信,手机1采用STA模式和HiD2D模式进行DBAC复用。可选的,对于手机1和手机2之间的业务,手机1可以为业务的发起者,也可以为业务的接收者。
对于手机2,手机2使用5GHz频段的信道60与AP1和手机1进行WiFi通信,工作频率相同,不是DBAC复用场景。
在单设备的DBAC场景中,传输资源的分配以产生DBAC的电子设备为主。例如,图8A或图8B中的手机1。
(2)双设备的DBAC场景
可选的,在一个示例中,如图9A所示,场景中包括AP、手机1和手机2。手机1和手机2与同一个AP连接。
对于手机1,手机1使用5GHz频段的信道36与AP进行WiFi通信,手机1工作在STA模式。手机1还使用5GHz频段的信道60与手机2进行WiFi通信,手机1和手机2均工作在HiD2D模式。手机1在某一时刻与AP通信或者与手机2通信,手机1采用STA模式和HiD2D模式进行DBAC复用。可选的,对于手机1和手机2之间的业务,手机1可以为业务的发起者,也可以为业务的接收者。
相似的,手机2采用了STA模式和HiD2D模式进行DBAC复用。
由于手机1和手机2连接同一个AP,共享AP发送的信标帧,所以手机1、手机2和AP可以时间同步。在该场景中,手机1和手机2可以协商确定传输资源的分配结果。可选的,可以由手机1和手机2之间的业务发起者确定最终的传输资源分配结果。例如,在图9A中,假设手机1投屏给手机2,则由手机1确定手机1和手机2之间的资源分配结果。相应的,手机2可以接收手机1确定的资源分配结果。
可选的,在另一个示例中,如图9B所示,场景中包括AP1、AP2、手机1和手机2。手机1和手机2与不同的AP连接。
对于手机1,手机1使用5GHz频段的信道36与AP1进行WiFi通信,手机1工作在STA模式。手机1还使用5GHz频段的信道60与手机2进行WiFi通信,手机1和手机2均工作在HiD2D模式。手机1在某一时刻与AP1通信或者与手机2通信,手机1采用STA模式和HiD2D模式进行DBAC复用。
对于手机2,手机2使用5GHz频段的信道149与AP2进行WiFi通信,手机2工作在STA模式。手机2还使用5GHz频段的信道60与手机1进行WiFi通信,手机1和手机2均工作在HiD2D模式。手机2在某一时刻与AP2通信或者与手机1通信,手机2采用STA模式和HiD2D模式进行DBAC复用。
但是,手机1和手机2连接不同的AP,AP1发送的信标帧的时间和AP2发送的信标帧的时间可能不同步,导致手机1、手机2、AP1和AP2之间不同步。在该场景中,手机1和手机2可以不用协商资源分配,通过AP引导迁移、中继代理上网等方式来规避该场 景。
(3)三设备以上的DBAC场景
在三设备以上的DBAC场景中,存在至少3个电子设备均采用STA模式和HiD2D模式进行DBAC复用,这至少3个电子设备均连接同一个AP。本申请实施例对场景中电子设备的总数量、采用STA模式和HiD2D模式进行DBAC复用的电子设备的数量不做限定。
示例性的,参见图10,示出了3个电子设备均采用STA模式和HiD2D模式进行DBAC复用的情况。如图10所示,场景中包括AP、手机1、手机2和手机3。手机1、手机2和手机3与同一个AP连接。
对于手机1,手机1使用5GHz频段的信道36与AP进行WiFi通信,手机1工作在STA模式。手机1还使用5GHz频段的信道60分别与手机2和手机3进行WiFi通信。手机1和手机2通信时,手机1和手机2均工作在HiD2D模式;相似的,手机1和手机3通信时,手机1和手机3均工作在HiD2D模式。手机1在某一时刻与AP通信或者与手机2通信或者与手机3通信,手机1采用STA模式和HiD2D模式进行DBAC复用。
相似的,手机2和手机3均采用了STA模式和HiD2D模式进行DBAC复用。
由于手机1、手机2和手机3连接同一个AP,共享AP发送的信标帧,所以手机1、手机2、手机3和AP可以时间同步。在该场景中,手机1、手机2和手机3之间可以协商确定资源分配结果。
在本申请实施例中,每个电子设备可以先按照双设备的DBAC场景下的方法获取与其他设备之间的资源分配结果,再根据多个资源分配结果确定最终的资源分配结果。举例说明,以手机1为示例。手机1、手机2和AP为双设备的DBAC场景,手机1可以获取手机1和手机2之间的资源分配结果12。可选的,若手机1是手机1和手机2之间的业务的发起者,手机1可以确定资源分配结果12;若手机1是手机1和手机2之间的业务的接收者,手机2可以确定资源分配结果12,并且,手机1可以接收手机2发送的资源分配结果12。相似的,手机1、手机3和AP为双设备的DBAC场景,手机1可以获取手机1和手机3之间的资源分配结果13。从而,手机1可以根据资源分配结果12和资源分配结果13确定最终的资源分配结果。
可选的,在一种实现方式中,当手机1获取的多个资源分配结果之间存在STA模式和HiD2D模式的分配冲突,则按照HiD2D模式优先的原则,确保HiD2D模式的资源分配。后续通过图10和图19进行详细说明。
7、HiD2D模式的时隙结构、调度周期、时隙控制位映射(Bitmap)
在HiD2D协议中,以1024us为一个时间单元(time unit,TU),以16个TU为一个时隙(Slot),将K个时隙组成一个调度周期。其中,时隙是HiD2D协议中的最小单位时间。K为大于1的正整数,例如,取值为32。
电子设备以调度周期为单位动态生成时隙控制位映射(Bitmap),调度周期中的每个时隙对应1bit取值。可选的,时隙对应的1bit取值为1表示该时隙处于HiD2D工作状态;时隙对应的1bit取值为0表示该时隙处于非HiD2D工作状态,例如,该时隙处于休眠状态或处于STA工作状态。
由于每个时隙通过1bit数值就可以指示出该时隙是否处于HiD2D工作状态,时隙控制Bitmap实现简单,调度方式灵活,而且传输时占用的空口资源很少。
示例性的,图11为本申请实施例提供的HiD2D模式的时隙结构和时隙控制位映射的示意图。如图11所示,调度周期包括32个时隙,可以标记为时隙0~时隙31,或者,slot0~slot31。在图11中,时隙0~时隙3对应的时隙控制Bitmap取值为1,表示时隙0~时隙3处于HiD2D工作状态。时隙4~时隙31对应的时隙控制Bitmap取值为0,表示时隙4~时隙31处于非HiD2D工作状态。
可选的,通过时隙控制Bitmap可以指示电子设备采用STA模式和HiD2D模式进行DBAC复用时的时隙分配情况。例如,在时隙控制Bitmap中,时隙对应的1bit取值为1表示电子设备在该时隙处于HiD2D模式,时隙对应的1bit取值为0表示电子设备在该时隙处于STA模式或休眠状态。
8、第一同步时隙、第二同步时隙
电子设备采用HiD2D模式和STA模式进行DBAC复用时,电子设备需要分别完成HiD2D模式和STA模式的时间同步,从而进行后续的数据传输。
在HiD2D模式的调度周期包括的多个时隙中,将电子设备在HiD2D模式下进行时间同步的时隙称为第一同步时隙。举例说明。假设,第一电子设备和第二电子设备采用HiD2D模式进行WiFi通信,第一电子设备和第二电子设备之间需要进行时间同步。第一电子设备可以在第一同步时隙发送预设的同步信号,相应的,第二电子设备可以接收信号,并检测接收的信号是否为预设的同步信号。当第二电子设备确定接收到预设的同步信号时,可以在时间上确定第一同步时隙的位置,从而完成第一电子设备和第二电子设备之间的时间同步。本申请实施例对预设的同步信号不做限定。
电子设备采用STA模式和AP进行WiFi通信时,也需要和AP完成时间同步。相关技术中,AP周期性发送信标帧,相应的,电子设备通过接收AP发送的信标帧完成同步。在HiD2D模式的调度周期包括的多个时隙中,将信标帧的起始位置所在的时隙称为第二同步时隙。第二同步时隙对应的时间用于电子设备在STA模式下的时间同步。
可选的,第一同步时隙还用于电子设备与其他设备之间的信令交互。
在时隙控制Bitmap中,第一同步时隙对应的取值可以为1,第二同步时隙对应的取值可以为0。
可选的,第一同步时隙包括HiD2D模式的调度周期中的前T个时隙,T为正整数。例如,第一同步时隙包括调度周期中的第一个时隙和第二个时隙。
示例性的,图12为本申请实施例提供的第一同步时隙和第二同步时隙的一种示意图。如图12所示,HiD2D模式的调度周期包括32个时隙,标记为时隙0~时隙31,每个时隙为16ms。第一同步时隙包括时隙0和时隙1。信标周期为100ms,信标周期对应了100ms/16ms=6.25个时隙。在HiD2D模式的调度周期中可以包括多个第二同步时隙。如图12所示,假设,时隙2为第二同步时隙,那么,下一个第二同步时隙可以为时隙8。示例性的,如图13所示,在HiD2D模式的调度周期中,第二同步时隙可以包括时隙2、时隙8、时隙14、时隙21和时隙27。
9、偏移时间
偏移时间用于指示第一同步时隙中的基准时隙与STA模式的信标帧的起始点之间的最小时间间隔。偏移时间可以用于确定第二同步时隙。
其中,基准时隙可以为第一同步时隙中的任意一个时隙。可选的,为了便于统计和处 理,基准时隙可以为第一同步时隙中的第一个时隙。
可选的,偏移时间可以为基准时隙与位于基准时隙之后的信标帧的起始点之间的最小时间间隔,或者,偏移时间可以为基准时隙与位于基准时隙之前的信标帧的起始点之间的最小时间间隔。
可选的,偏移时间可以为基准时隙的起始点与信标帧的起始点之间的最小时间间隔,或者,偏移时间可以为基准时隙的结束点与信标帧的起始点之间的最小时间间隔。
示例性的,如图12或图13所示,基准时隙可以为时隙0,偏移时间为时隙0的起始时间与位于时隙0之后的第一个信标帧的起始点之间的时间间隔。
10、第一数据时隙、第二数据时隙
电子设备采用HiD2D模式和STA模式进行DBAC复用时,电子设备可以分别在HiD2D模式下和STA模式下进行数据传输。
在HiD2D模式的调度周期包括的多个时隙中,将电子设备在HiD2D模式下进行数据传输的时隙称为第一数据时隙,将电子设备在STA模式下进行数据传输的时间对应的时隙称为第二数据时隙。
在时隙控制Bitmap中,第一数据时隙对应的取值可以为1,第二数据时隙对应的取值可以为0。
可选的,电子设备在HiD2D模式的调度周期中实际调度第二数据时隙时,可以将第二同步时隙调度为第二数据时隙。可以理解为:对于HiD2D模式的调度周期中的一个时隙,既是第二同步时隙,也是第二数据时隙,该时隙对应的时间用于电子设备完成STA模式下的时间同步,同时也可以用于STA模式下的数据传输。该实现方式通常用于调度周期中除了第一同步时隙和第二同步时隙之外的剩余时隙不足以满足HiD2D模式和STA模式下的数据传输需求的场景。
目前,电子设备可以采用STA模式和WiFi P2P模式进行DBAC复用,从而实现一个电子设备同时和多个设备进行WiFi通信。其中,STA模式和WiFi P2P模式可以采用相同的时隙结构。由于WiFi P2P模式中GO和GC的角色分配,限制了分布式业务的应用需求,因此,电子设备采用WiFi直连模式实现任意两个设备之间的通信。但是,STA模式和WiFi直连模式的时隙结构不同,因此,本申请实施例提供了一种WiFi双模式下的资源分配方法,WiFi双模式中包括WiFi直连模式,且在时域上采用时分复用的方式为WiFi双模式分别配置传输资源,实现了电子设备采用WiFi双模式进行DBAC复用时的传输资源分配,从而可以实现分布式业务的应用需求。
下面通过具体的实施例对本申请的技术方案进行详细说明。下面的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
本申请实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。本申请实施例中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
需要说明,本申请实施例以WiFi直连模式为HiD2D模式为例进行说明,但并不对WiFi直连模式形成限定。
需要说明,本申请实施例以WiFi双模式包括HiD2D模式和STA模式为例进行说明, 但并不对WiFi双模式形成限定,WiFi双模式还可以包括其他的两种工作模式。例如,WiFi双模式还可以包括WiFi P2P模式和HiD2D模式。
图14为本申请实施例提供的WiFi双模式下的资源分配方法的一种流程图。本实施例提供的WiFi双模式下的资源分配方法,适用于单设备的DBAC场景,例如,图8A或图8B所示场景,执行主体可以为采用STA模式和HiD2D模式进行DBAC复用的电子设备,例如,图8A或图8B中的手机1。为了方便描述以及区分不用的场景,执行主体可以称为第一电子设备。如图14所示,本实施例提供的WiFi双模式下的资源分配方法,可以包括:
S1401、在HiD2D模式的调度周期中确定第一同步时隙和第二同步时隙。其中,调度周期包括K个HiD2D模式的时隙,K为大于1的正整数。第一同步时隙用于电子设备在HiD2D模式下的时间同步,第二同步时隙对应的时间用于电子设备在STA模式下的时间同步。
具体的,在STA模式下,电子设备通过接收AP发送的信标帧进行时间同步,在数据传输时可以采用信标周期的时隙结构,可以参见802.11协议,此处不再赘述。HiD2D是一种基于WiFi的终端互连组网协议,HiD2D模式具有和STA模式不同的时隙结构,因此,需要在HiD2D模式的调度周期包括的K个时隙中,确定处于HiD2D工作状态的时隙和处于非HiD2D工作状态的时隙。
其中,第一同步时隙处于HiD2D工作状态,用于电子设备在HiD2D模式下的时间同步,时隙控制Bitmap可以取值1。第二同步时隙处于非HiD2D工作状态,或者说处于STA工作状态,电子设备可以在第二同步时隙对应的时间内进行STA模式下的时间同步,时隙控制Bitmap可以取值0。
本实施例对第一同步时隙和第二同步时隙包括的时隙的个数不做限定。例如,可以为1个,也可以为多个,多个是指2个及2个以上。
S1402、在K个时隙中除第一同步时隙和第二同步时隙之外的剩余时隙中,确定第一数据时隙和/或第二数据时隙。其中,第一数据时隙用于电子设备在HiD2D模式下的数据传输,第二数据时隙对应的时间用于电子设备在STA模式下的数据传输。
具体的,在一个调度周期内,除了确定同步时隙之外,剩余的时隙可以用于STA模式和HiD2D模式下的数据传输。其中,第一数据时隙处于HiD2D工作状态,用于电子设备在HiD2D模式下的数据传输,时隙控制Bitmap可以取值1。第二数据时隙处于非HiD2D工作状态,或者说处于STA工作状态,电子设备可以在第二同步时隙对应的时间内进行STA模式下的数据传输,时隙控制Bitmap可以取值0。
其中,本实施例对第一数据时隙和第二数据时隙在调度周期中N个时隙中的具体位置不做限定。若第一数据时隙包括多个时隙,所有第一数据时隙可以位置连续,也可以间隔分布。相似的,若第二数据时隙包括多个时隙,所有第二数据时隙可以位置连续,也可以间隔分布。
本实施例对第一数据时隙和第二数据时隙包括的时隙的个数不做限定。例如,可以为0个,也可以为1个,或者可以为多个,多个是指2个及2个以上。
可见,本实施例提供的WiFi双模式下的资源分配方法,适用于电子设备采用STA模式和HiD2D模式进行DBAC复用场景。在HiD2D模式的调度周期中,首先确定第一同步 时隙和第二同步时隙。第一同步时隙确保了电子设备在HiD2D模式下的时间同步,第二同步时隙确保了电子设备在STA模式下的时间同步。然后,再确定用于数据传输的第一数据时隙和第二数据时隙。本实施例提供的WiFi双模式下的资源分配方法,在STA模式和HiD2D模式采用不同的时隙结构时,实现了电子设备采用STA模式和HiD2D模式进行DBAC复用时的资源分配,实现了电子设备同时和多个设备进行WiFi通信,满足了分布式业务的需求。
可选的,本实施例提供的WiFi双模式下的资源分配方法,还可以包括:
确定调度周期的时隙控制位映射。其中,第一同步时隙和第一数据时隙对应的取值为1,第二同步时隙和第二数据时隙对应的取值为0。
下面,对S1401中确定第一同步时隙和第二同步时隙的实现方式进行说明。
可选的,S1401中,在HiD2D模式的调度周期中确定第一同步时隙和第二同步时隙,可以包括:
在K个时隙中确定第一同步时隙。
获取偏移时间。偏移时间用于指示第一同步时隙中的基准时隙与STA模式的信标帧的起始点之间的最小时间间隔。
根据基准时隙、偏移时间和信标帧的信标周期,在K个时隙中确定第二同步时隙。其中,第二同步时隙为信标帧的起始点所在的时隙。
结合图12进行说明。HiD2D协议中通常规定了第一同步时隙的位置,所以先确定第一同步时隙。可选的,第一同步时隙可以包括K个时隙中的第一个时隙和第二个时隙,即,图12中的时隙0和时隙1,时隙控制Bitmap可以取值1。之后,通过偏移时间、第一同步时隙中的基准时隙和信标帧的信标周期,可以在调度周期的K个时隙中确定出所有的第二同步时隙。第二同步时隙的时隙控制Bitmap可以取值0。
其中,本实施例对偏移时间的取值不做限定。偏移时间可以标记为参数Beacon_offset。
其中,本实施例对第一同步时隙中的基准时隙不做限定。例如,基准时隙为第一同步时隙中的第一个时隙,例如,图12中的时隙0。
可选的,根据基准时隙、偏移时间和信标帧的信标周期,在K个时隙中确定第二同步时隙,可以包括:
根据基准时隙和偏移时间,在K个时隙中确定基准时隙之后的第一个第二同步时隙。
根据第一个第二同步时隙和信标周期,在K个时隙中继续确定第二同步时隙。
结合图12和图13进行说明。如图12所示,基准时隙为时隙0,获取偏移时间后,可以确定第一同步时隙之后的第一个第二同步时隙为时隙2。进而,可以根据信标帧的信标周期确定出所有的第二同步时隙。如图13所示,第二同步时隙可以包括时隙2、时隙8、时隙14、时隙21和时隙27。
可选的,本实施例提供的WiFi双模式下的资源分配方法,还可以包括:
确定在第二同步时隙对应的时间内是否接收到AP发送的信标帧。
若在第二同步时隙对应的时间内没有接收到AP发送的信标帧,且在连续的预设个数的第二同步时隙对应的时间内均没有接收到AP发送的信标帧,则从采用HiD2D模式和STA模式进行DBAC复用切换为采用STA模式。
其中,本实施例对预设个数的取值不做限定。例如,预设个数为25。
具体的,电子设备工作在STA模式时,电子设备通过接收AP广播的信标帧与AP进行时间同步。如果在第二同步时隙对应的时间内接收到AP发送的信标帧,电子设备可以根据信标帧与AP时间同步,还可以进行信令交互。如果在第二同步时隙对应的时间内没有接收到AP发送的信标帧,可以将信标帧丢失(Beacon_miss)计数器的数值加1,并继续在下一个第二同步时隙对应的时间内判断是否接收到AP发送的信标帧。如果信标帧丢失计数器的数值超过预设个数,说明电子设备在连续相当长的时间内都没有接收到信标帧,则可以触发信标帧的强制同步,即,从采用HiD2D模式和STA模式进行DBAC复用切换为只采用STA模式,等待接收信标帧。通过切换为只采用STA模式,为电子设备可以成功接收到信标帧提供保障。
可选的,本实施例提供的WiFi双模式下的资源分配方法,还可以包括:
若在采用STA模式之后的预设时长内没有接收到AP发送的信标帧,则从采用STA模式切换为采用HiD2D模式。
其中,本实施例对预设时长的取值不做限定。可选的,预设时长=保护时长+信标帧的信标周期*I,I为正整数。保护时长可以用参数Guard_Time表示,用于电子设备从采用HiD2D模式和STA模式进行DBAC复用切换为只采用STA模式的时间开销。本实施例对保护时长的取值不做限定,例如,20ms。
具体的,电子设备从采用HiD2D模式和STA模式进行DBAC复用切换为只采用STA模式,等待接收信标帧。如果在预设时长内还没有接收到信标帧,可以确定STA掉线,从只采用STA模式切换为只采用HiD2D模式,比如,电子设备断开与其他设备之间的STA连接,确保电子设备可以采用HiD2D模式进行业务。
下面,对S1402中确定第一数据时隙和/或第二数据时隙的实现方式进行说明。
可选的,在一种实现方式中,S1402中,在剩余时隙中,确定第一数据时隙和第二数据时隙,可以包括:
获取第一数据时隙和第二数据时隙的时隙个数比值。
根据时隙个数比值在剩余时隙中确定第一数据时隙和第二数据时隙。
其中,本实施例对时隙个数比值的取值不做限定。例如,时隙个数比值为1:1或2:1。
示例性的,在一种实现方式中,时隙个数比值为1:1,即,HiD2D模式对应的第一数据时隙的个数和STA模式对应的第二数据时隙的个数相同。如图15所示,为了体现数据时隙,图中未示出第二同步时隙。在图15中,2个第一数据时隙和2个第二数据时隙间隔设置。
示例性的,在另一种实现方式中,时隙个数比值为2:1,即,HiD2D模式对应的第一数据时隙的个数是STA模式对应的第二数据时隙的个数的2倍。如图16所示,时隙0和时隙1为第一同步时隙,时隙8为第二同步时隙,时隙2~时隙5为第一数据时隙,时隙6~时隙7为第二数据时隙。其余时隙的状态未示出。
可见,在该实现方式中,在调度周期的K个时隙中确定第一同步时隙和第二同步时隙之后,采用静态分配的方式将剩余的时隙按照预设的比例分配给HiD2D模式和STA模式,实现方式简单。
可选的,在另一种实现方式中,S1402中,在剩余时隙中,确定第一数据时隙和第二数据时隙,可以包括:
确定只采用HiD2D模式进行数据传输时需要的时隙的个数M,以及,只采用STA模式进行数据传输时需要的时间对应的时隙的个数N。M和N均为正整数。
根据M和N在剩余时隙中确定第一数据时隙和第二数据时隙。
在该实现方式中,采用动态分配的方式,对调度周期中除了第一同步时隙和第二同步时隙之外的剩余时隙进行分配。先分别按照只采用HiD2D模式和只采用STA模式预测需要的时隙个数M和个数N,再根据M、N和剩余时隙的个数协调分配。由于考虑了实际业务量需求,提高了确定第一数据时隙和第二数据时隙的准确性。
其中,预测只采用HiD2D模式进行数据传输时需要的时隙的个数M,以及,只采用STA模式进行数据传输时需要的时间对应的时隙的个数N,可以采用现有的实现方式,本实施例不做详细说明。例如,根据业务类型、流量大小、吞吐量带宽能力等因素进行预测。例如,当预测只采用HiD2D模式进行数据传输时需要的时隙的个数M时,根据业务类型和流量大小,当电子设备执行的业务为60帧率(frame per second,FPS)的视频重载投屏业务,时隙控制Bitmap的取值可以全部全置1,即调度100%的时隙;当电子设备执行的业务为轻载投屏业务,时隙控制Bitmap的取值可以为“1100…”序列,即调度1/2的时隙;当电子设备处于保活状态,可以设置时隙0和时隙1的时隙控制Bitmap取值为1,其余取值为0,即,调度0%的时隙。又例如,当预测只采用STA模式进行数据传输时需要的时间对应的时隙的个数N时,根据业务的流量大小和吞吐量带宽能力,假设,业务的流量为100Mbps,带宽能力为800Mbps,则在HiD2D模式的调度周期中,需要调度1/8的时隙用于STA模式的业务传输。
可选的,第一电子设备采用HiD2D模式与第二电子设备进行业务时,第一电子设备可以为业务的发起者,也可以为业务的接收者。若第一电子设备为业务的发起者,则可以直接预测只采用HiD2D模式进行数据传输时需要的时隙的个数M,以及,只采用STA模式进行数据传输时需要的时间对应的时隙的个数N。若第一电子设备为业务的接收者,第一电子设备可以接收第二电子设备发送的相关信息,根据相关信息确定M和N。其中,本实施例对相关内息的内容不做限定,相关信息用于确定M和N。例如,相关信息可以包括业务类型、流量大小、吞吐量带宽能力中的至少一项。
可选的,在一个场景中,根据M和N在剩余时隙中确定第一数据时隙和第二数据时隙,可以包括:
若M+N≤剩余时隙的个数,则将剩余时隙中的M个时隙确定为第一数据时隙,并将剩余时隙中除M个时隙之外的N个时隙确定为第二数据时隙。
示例性的,如图17所示,只采用HiD2D模式时,时隙控制Bitmap的取值可以为“1100…”序列,即调度1/2的时隙。只采用STA模式时,调度1/4的时隙。M+N为剩余时隙的个数的3/4。所以,时隙0和时隙1为第一同步时隙,时隙8为第二同步时隙,时隙2~时隙3、时隙6~时隙7为HiD2D模式的第一数据时隙,时隙9为STA模式的第二数据时隙,时隙4~时隙5为空闲时隙。其余时隙的状态未示出。
在该实现方式中,剩余时隙中除了HiD2D模式需要的M个时隙和STA模式需要的N个时隙之外,还有空闲时隙,说明剩余时隙可以满足HiD2D模式和STA模式的数据传输需求,没有资源分配冲突,可以为HiD2D模式分配M个时隙,并为STA模式分配N个时隙。
可选的,若M+N<剩余时隙的个数,还可以包括:
将剩余时隙中除M个时隙和N个时隙之外的时隙确定为第一数据时隙或第二数据时隙。
通过将剩余时隙中的空闲时隙分配给HiD2D模式或STA模式,提高了应对HiD2D模式或STA模式下突发业务流量的能力。
可选的,在另一个场景中,根据M和N在剩余时隙中确定第一数据时隙和第二数据时隙,可以包括:
若M+N>剩余时隙的个数,则按照预设调度规则在剩余时隙中确定第一数据时隙和第二数据时隙。其中,预设调度规则包括下列中的任意一项:严格优先级(strict priority,SP)调度、循环(round robin,RR)调度或加权循环(weighted round robin,WRR)调度。
在该实现方式中,剩余时隙无法满足HiD2D模式需要的M个时隙和STA模式需要的N个时隙,存在资源分配冲突,需要采用预设调度算法协调分配第一数据时隙和第二数据时隙,从而提升资源分配效果。
其中,预设调度算法包括但不限于:SP调度、RR调度和WRR调度。SP调度可以按照HiD2D模式和STA模式的优先级,优先保障高优先级模式的数据时隙分配。RR调度遵循公平原则,第一数据时隙和第二数据时隙的个数可以相同或相近。WRR调度可以根据HiD2D模式和STA模式分别对应的权值分配数据时隙。
可选的,当预设调度规则为SP调度时,按照预设调度规则在剩余时隙中确定第一数据时隙和第二数据时隙,可以包括:
将剩余时隙中的M个时隙确定为第一数据时隙,将剩余时隙中除M个时隙之外的时隙确定为第二数据时隙。或者,
将剩余时隙中的N个时隙确定为第二数据时隙,将剩余时隙中除N个时隙之外的时隙确定为第一数据时隙。
在该实现方式中,可以满足HiD2D模式下的数据传输需求,或者满足STA模式下的数据传输需求。
可选的,当预设调度规则为RR调度时,按照预设调度规则在剩余时隙中确定第一数据时隙和第二数据时隙,可以包括:
将剩余时隙中的M-(M+N-K)/2个时隙确定为第一数据时隙,将剩余时隙中除M-(M+N-K)/2个时隙之外的时隙确定为第二数据时隙。其中,K为剩余时隙的个数。
示例性的,如图18所示,只采用HiD2D模式时,时隙控制Bitmap的取值为全1序列,即调度100%的时隙。只采用STA模式时,调度1/2的时隙。M+N大于剩余时隙的个数。所以,对HiD2D模式和STA模式分别所需的数据时隙个数都进行减少。调整后,如图18所示,时隙0和时隙1为第一同步时隙,时隙8为第二同步时隙,时隙2~时隙4、时隙6~时隙7、时隙9为HiD2D模式的第一数据时隙,时隙5为STA模式的第二数据时隙。其余时隙的状态未示出。
在该实现方式中,对HiD2D模式和STA模式分别所需的数据时隙个数相对公平的都进行减少,避免对HiD2D模式和STA模式下的数据传输造成较大的速率波动。
可选的,当预设调度规则为WRR调度时,按照预设调度规则在剩余时隙中确定第一数据时隙和第二数据时隙,可以包括:
将剩余时隙中的M-(M+N-K)*q个时隙确定为第一数据时隙,将剩余时隙中除M-(M+N-K)*q个时隙之外的时隙确定为第二数据时隙。其中,K为剩余时隙的个数,0<q<1。
其中,本实施例对q的取值不做限定。HiD2D模式对应的权值为q,STA模式对应的权值可以为1-q。例如,q=1/3。
在该实现方式中,对HiD2D模式和STA模式分别所需的数据时隙个数按照权值都进行减少,避免对HiD2D模式和STA模式下的数据传输造成较大的速率波动。
可选的,本申请还提供一种WiFi双模式下的资源分配方法,适用于双设备的DBAC场景,例如,图9A所示场景,执行主体可以为采用STA模式和HiD2D模式进行DBAC复用的电子设备,例如,图9A中的手机1。为了方便描述以及区分不用的场景,执行主体可以称为第一电子设备。第一电子设备采用HiD2D模式与第二电子设备进行第一业务,且第一电子设备发起第一业务。第一电子设备和第二电子设备均与访问节点AP连接。第二电子设备例如为图9A中的手机2。
本实施例提供的WiFi双模式下的资源分配方法,还可以包括:
第一电子设备向第二电子设备发送时隙配置信息。时隙配置信息用于指示调度周期中第一数据时隙和第二数据时隙的位置。
其中,第一电子设备可以确定时隙配置信息。第一电子设备确定时隙配置信息可以参见图14所示实施例,此处不再赘述。可选的,时隙配置信息可以为时隙控制Bitmap。
可选的,调度周期中的第一同步时隙可以包括时隙配置信息。
可选的,在一种实现方式中,当前调度周期中的第一同步时隙可以包括当前调度周期的时隙配置信息。
可选的,在另一种实现方式中,当前调度周期中的第一同步时隙可以包括当前调度周期之后下一个调度周期的时隙配置信息。
可选的,本申请还提供一种WiFi双模式下的资源分配方法,适用于三设备以上的DBAC场景,例如,图10所示场景,执行主体可以为采用STA模式和HiD2D模式进行DBAC复用的电子设备,例如,图10中的手机1、手机2或手机3。为了方便描述以及区分不用的场景,执行主体可以称为第一电子设备。第一电子设备采用HiD2D模式分别与第二电子设备和第三电子设备连接。第一电子设备、第二电子设备和第三电子设备均与AP连接。第二电子设备和第三电子设备均采用HiD2D模式和STA模式进行DBAC复用。
本实施例提供的WiFi双模式下的资源分配方法,S1402中,在剩余时隙中,确定第一数据时隙和第二数据时隙,可以包括:
获取第一电子设备和第二电子设备之间的第一时隙配置信息,以及,第一电子设备和第三电子设备之间的第二时隙配置信息。其中,第一时隙配置信息用于指示第一电子设备和第二电子设备通信时在调度周期中第一数据时隙和第二数据时隙的位置,第二时隙配置信息用于指示第一电子设备和第三电子设备通信时在调度周期中第一数据时隙和第二数据时隙的位置。
在剩余时隙中,将第一时隙配置信息和第二时隙配置信息分别指示的第一数据时隙的 位置的并集确定为第一数据时隙,将第一时隙配置信息和第二时隙配置信息分别指示的第二数据时隙的位置的交集确定为第二数据时隙。
其中,第一电子设备、第二电子设备或第三电子设备可以获取时隙配置信息,可以参见本申请上述实施例,此处不再赘述。
下面结合图10和图19进行说明。其中,第一电子设备为手机1,第二电子设备为手机2,第三电子设备为手机3。
对于手机1,手机1和手机2之间的第一时隙配置信息指示,时隙2~时隙3、时隙6~时隙7为第一数据时隙,时隙4~时隙5为第二数据时隙。
手机1和手机3之间的第二时隙配置信息指示,时隙2和时隙7为第一数据时隙,时隙3~时隙6为第二数据时隙。
可见,根据第一时隙配置信息和第二时隙配置信息,时隙3和时隙6资源配置冲突。则按照HiD2D模式优先,将第一时隙配置信息和第二时隙配置信息分别指示的第一数据时隙的合集确定为手机1最终的第一数据时隙,包括时隙2~时隙3、时隙6~时隙7;将第一时隙配置信息和第二时隙配置信息分别指示的第二数据时隙的交集确定为手机1最终的第二数据时隙,包括时隙4~时隙5。
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。其中,电子设备可以为第一电子设备、第二电子设备或第三电子设备。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个模块中。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。需要说明的是,本申请实施例中模块的名称是示意性的,实际实现时对模块的名称不做限定。
示例性的,图20为本申请实施例提供的WiFi双模式下的资源分配装置的一种结构示意图。本实施例提供的WiFi双模式下的资源分配装置,用于执行本申请方法实施例提供的WiFi双模式下的资源分配方法,技术原理和技术效果相似。
如图20所示,本实施例提供的WiFi双模式下的资源分配装置,可以应用于第一电子设备,所述第一电子设备采用WiFi直连模式和STA模式进行DBAC复用,所述装置包括:
第一确定模块2001,用于在所述WiFi直连模式的调度周期包括的多个时隙中确定第一同步时隙和第二同步时隙;所述时隙为所述WiFi直连模式的时间单位,所述第一同步时隙用于所述第一电子设备在所述WiFi直连模式下的时间同步,所述第二同步时隙对应的时间用于所述第一电子设备在所述STA模式下的时间同步;
第二确定模块2002,用于在剩余时隙中确定第一数据时隙和第二数据时隙;所述剩余时隙为所述多个时隙中除所述第一同步时隙和所述第二同步时隙之外的时隙,所述第一数据时隙用于所述第一电子设备在所述WiFi直连模式下的数据传输,所述第二数据时隙对 应的时间用于所述第一电子设备在所述STA模式下的数据传输。
可选的,所述第一确定模块2001用于:
在所述多个时隙中确定所述第一同步时隙;
获取偏移时间;所述偏移时间用于指示所述第一同步时隙中的基准时隙与所述STA模式的信标帧的起始点之间的最小时间间隔;
根据所述基准时隙、所述偏移时间和所述信标帧的信标周期,在所述多个时隙中确定所述第二同步时隙;其中,所述第二同步时隙为所述信标帧的起始点所在的时隙。
可选的,所述第一同步时隙包括所述多个时隙中的前T个时隙,所述基准时隙为所述前T个时隙中的第一个时隙,T为正整数。
可选的,所述第一确定模块2001用于:
根据所述基准时隙和所述偏移时间,在所述多个时隙中确定所述基准时隙之后的第一个第二同步时隙;
根据所述第一个第二同步时隙和所述信标周期,在所述多个时隙中继续确定所述第二同步时隙。
可选的,还包括切换模块,所述切换模块用于:
确定在所述第二同步时隙对应的时间内是否接收到AP发送的信标帧;
若在所述第二同步时隙对应的时间内没有接收到所述AP发送的信标帧,且在连续的预设个数的所述第二同步时隙对应的时间内均没有接收到所述AP发送的信标帧,则从采用WiFi直连模式和STA模式进行DBAC复用切换为采用所述STA模式。
可选的,所述切换模块还用于:
若在采用所述STA模式之后的预设时长内没有接收到所述AP发送的信标帧,则从采用所述STA模式切换为采用所述WiFi直连模式。
可选的,所述预设时长=保护时长+所述信标帧的信标周期*I,I为正整数。
可选的,所述第二确定模块2002用于:
获取所述第一数据时隙和所述第二数据时隙的时隙个数比值;
根据所述时隙个数比值在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙。
可选的,所述第二确定模块2002用于:
确定只采用所述WiFi直连模式进行数据传输时需要的所述时隙的个数M,以及,只采用所述STA模式进行数据传输时需要的时间对应的所述时隙的个数N;M和N均为正整数;
根据所述M和所述N在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙。
可选的,所述第二确定模块2002用于:
若M+N≤所述剩余时隙的个数,则将所述剩余时隙中的M个时隙确定为所述第一数据时隙,并将所述剩余时隙中除所述M个时隙之外的N个时隙确定为所述第二数据时隙。
可选的,若M+N<所述剩余时隙的个数,所述第二确定模块2002还用于:
将所述剩余时隙中除所述M个时隙和所述N个时隙之外的时隙确定为所述第一数据时隙或所述第二数据时隙。
可选的,所述第二确定模块2002用于:
若M+N>所述剩余时隙的个数,则按照预设调度规则在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙;其中,所述预设调度规则包括下列中的任意一项:SP调度、RR调度或WRR调度。
可选的,所述预设调度规则包括所述SP调度,所述第二确定模块2002用于:
将所述剩余时隙中的M个时隙确定为所述第一数据时隙,将所述剩余时隙中除所述M个时隙之外的时隙确定为所述第二数据时隙;或者,
将所述剩余时隙中的N个时隙确定为所述第二数据时隙,将所述剩余时隙中除所述N个时隙之外的时隙确定为所述第一数据时隙。
可选的,所述预设调度规则包括所述RR调度,所述第二确定模块2002用于:
将所述剩余时隙中的M-(M+N-K)/2个时隙确定为所述第一数据时隙,将所述剩余时隙中除所述M-(M+N-K)/2个时隙之外的时隙确定为所述第二数据时隙;其中,K为所述剩余时隙的个数。
可选的,所述预设调度规则包括所述WRR调度,所述第二确定模块2002用于:
将所述剩余时隙中的M-(M+N-K)*q个时隙确定为所述第一数据时隙,将所述剩余时隙中除所述M-(M+N-K)*q个时隙之外的时隙确定为所述第二数据时隙;其中,K为所述剩余时隙的个数,0<q<1。
可选的,所述第一电子设备采用所述WiFi直连模式与第二电子设备进行第一业务,且所述第一电子设备发起所述第一业务;所述第二电子设备采用所述WiFi直连模式和所述STA模式进行DBAC复用,还包括发送模块,所述发送模块用于:
向所述第二电子设备发送第一时隙配置信息;所述第一时隙配置信息用于指示所述调度周期中所述第一数据时隙和所述第二数据时隙的位置。
可选的,所述第一电子设备采用所述WiFi直连模式分别与第二电子设备和第三电子设备连接;所述第二电子设备和所述第三电子设备均采用所述WiFi直连模式和所述STA模式进行DBAC复用,所述第二确定模块2002用于:
获取所述第一电子设备和所述第二电子设备之间的第一时隙配置信息,以及,所述第一电子设备和所述第三电子设备之间的第二时隙配置信息;其中,所述第一时隙配置信息用于指示所述第一电子设备和所述第二电子设备通信时在所述调度周期中第一数据时隙和第二数据时隙的位置,所述第二时隙配置信息用于指示所述第一电子设备和所述第三电子设备通信时在所述调度周期中第一数据时隙和第二数据时隙的位置;
根据所述第一时隙配置信息和所述第二时隙配置信息,在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙。
请参考图21,其示出了本申请实施例提供的电子设备的一种结构,电子设备可以为第一电子设备、第二电子设备或第三电子设备。电子设备包括:处理器2101、接收器2102、发射器2103、存储器2104和总线2105。处理器2101包括一个或者多个处理核心,处理器2101通过运行软件程序以及模块,从而执行各种功能的应用以及信息处理。接收器2102和发射器2103可以实现为一个通信组件,该通信组件可以是一块基带芯片。存储器2104通过总线2105和处理器2101相连。存储器2104可用于存储至少一个程序指令,处理器2101用于执行至少一个程序指令,以实现上述实施例的技术方案。其实现原理和技术效果 与上述方法相关实施例类似,此处不再赘述。
当电子设备开机后,处理器可以读取存储器中的软件程序,解释并执行软件程序的指令,处理软件程序的数据。当需要通过天线发送数据时,处理器对待发送的数据进行基带处理后,输出基带信号至控制电路中的控制电路,控制电路将基带信号进行射频处理后将射频信号通过天线以电磁波的形式向外发送。当有数据发送到电子设备时,控制电路通过天线接收到射频信号,将射频信号转换为基带信号,并将基带信号输出至处理器,处理器将基带信号转换为数据并对该数据进行处理。
本领域技术人员可以理解,为了便于说明,图21仅示出了一个存储器和处理器。在实际的电子设备中,可以存在多个处理器和存储器。存储器也可以称为存储介质或者存储电子设备等,本申请实施例对此不做限制。
作为一种可选的实现方式,处理器可以包括基带处理器和中央处理器,基带处理器主要用于对通信数据进行处理,中央处理器主要用于执行软件程序,处理软件程序的数据。本领域技术人员可以理解,基带处理器和中央处理器可以集成在一个处理器中,也可以是各自独立的处理器,通过总线等技术互联。本领域技术人员可以理解,电子设备可以包括多个基带处理器以适应不同的网络制式,电子设备可以包括多个中央处理器以增强其处理能力,电子设备的各个部件可以通过各种总线连接。该基带处理器也可以表述为基带处理电路或者基带处理芯片。该中央处理器也可以表述为中央处理电路或者中央处理芯片。对通信协议以及通信数据进行处理的功能可以内置在处理器中,也可以以软件程序的形式存储在存储器中,由处理器执行软件程序以实现基带处理功能。该存储器可以集成在处理器中,也可以独立在处理器之外。该存储器包括高速缓存Cache,可以存放频繁访问的数据/指令。
在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
在本申请实施例中,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SS)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,不限于此。
本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。本申请各实施例提供的方法中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、用户设备或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line, DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机可以存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DWD)、或者半导体介质(例如,SSD)等。
本申请实施例提供一种计算机程序产品,当所述计算机程序产品在电子设备运行时,使得所述电子设备执行上述方法实施例中的技术方案,其实现原理和技术效果与上述相关实施例类似,此处不再赘述。
本申请实施例提供一种计算机可读存储介质,其上存储有程序指令,所述程序指令被电子设备执行时,使得所述电子设备执行上述实施例的技术方案。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。
综上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (17)

  1. 一种无线保真WiFi双模式下的资源分配方法,其特征在于,应用于第一电子设备,所述第一电子设备采用WiFi直连模式和无线工作站STA模式进行双频自适应并发DBAC复用,所述方法包括:
    在所述WiFi直连模式的调度周期包括的多个时隙中确定第一同步时隙和第二同步时隙;所述时隙为所述WiFi直连模式的时间单位,所述第一同步时隙用于所述第一电子设备在所述WiFi直连模式下的时间同步,所述第二同步时隙对应的时间用于所述第一电子设备在所述STA模式下的时间同步;
    在剩余时隙中确定第一数据时隙和第二数据时隙;所述剩余时隙为所述多个时隙中除所述第一同步时隙和所述第二同步时隙之外的时隙,所述第一数据时隙用于所述第一电子设备在所述WiFi直连模式下的数据传输,所述第二数据时隙对应的时间用于所述第一电子设备在所述STA模式下的数据传输。
  2. 根据权利要求1所述的方法,其特征在于,所述在所述WiFi直连模式的调度周期包括的多个时隙中确定第一同步时隙和第二同步时隙,包括:
    在所述多个时隙中确定所述第一同步时隙;
    获取偏移时间;所述偏移时间用于指示所述第一同步时隙中的基准时隙与所述STA模式的信标帧的起始点之间的最小时间间隔;
    根据所述基准时隙、所述偏移时间和所述信标帧的信标周期,在所述多个时隙中确定所述第二同步时隙;其中,所述第二同步时隙为所述信标帧的起始点所在的时隙。
  3. 根据权利要求2所述的方法,其特征在于,所述第一同步时隙包括所述多个时隙中的前T个时隙,所述基准时隙为所述前T个时隙中的第一个时隙,T为正整数。
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述基准时隙、所述偏移时间和所述信标帧的信标周期,在所述多个时隙中确定所述第二同步时隙,包括:
    根据所述基准时隙和所述偏移时间,在所述多个时隙中确定所述基准时隙之后的第一个第二同步时隙;
    根据所述第一个第二同步时隙和所述信标周期,在所述多个时隙中继续确定所述第二同步时隙。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,还包括:
    确定在所述第二同步时隙对应的时间内是否接收到访问节点AP发送的信标帧;
    若在所述第二同步时隙对应的时间内没有接收到所述AP发送的信标帧,且在连续的预设个数的所述第二同步时隙对应的时间内均没有接收到所述AP发送的信标帧,则从采用WiFi直连模式和STA模式进行DBAC复用切换为采用所述STA模式。
  6. 根据权利要求5所述的方法,其特征在于,还包括:
    若在采用所述STA模式之后的预设时长内没有接收到所述AP发送的信标帧,则从采用所述STA模式切换为采用所述WiFi直连模式。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述在剩余时隙中确定第一数据时隙和第二数据时隙,包括:
    获取所述第一数据时隙和所述第二数据时隙的时隙个数比值;
    根据所述时隙个数比值在所述剩余时隙中确定所述第一数据时隙和所述第二数据时 隙。
  8. 根据权利要求1-6中任一项所述的方法,其特征在于,所述在剩余时隙中确定第一数据时隙和第二数据时隙,包括:
    确定只采用所述WiFi直连模式进行数据传输时需要的所述时隙的个数M,以及,只采用所述STA模式进行数据传输时需要的时间对应的所述时隙的个数N;M和N均为正整数;
    根据所述M和所述N在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙。
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述M和所述N在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙,包括:
    若M+N≤所述剩余时隙的个数,则将所述剩余时隙中的M个时隙确定为所述第一数据时隙,并将所述剩余时隙中除所述M个时隙之外的N个时隙确定为所述第二数据时隙。
  10. 根据权利要求8所述的方法,其特征在于,所述根据所述M和所述N在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙,包括:
    若M+N>所述剩余时隙的个数,则按照预设调度规则在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙;其中,所述预设调度规则包括下列中的任意一项:严格优先级SP调度、循环RR调度或加权循环WRR调度。
  11. 根据权利要求10所述的方法,其特征在于,所述预设调度规则包括所述SP调度,所述按照预设调度规则在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙,包括:
    将所述剩余时隙中的M个时隙确定为所述第一数据时隙,将所述剩余时隙中除所述M个时隙之外的时隙确定为所述第二数据时隙;或者,
    将所述剩余时隙中的N个时隙确定为所述第二数据时隙,将所述剩余时隙中除所述N个时隙之外的时隙确定为所述第一数据时隙。
  12. 根据权利要求10所述的方法,其特征在于,所述预设调度规则包括所述RR调度,所述按照预设调度规则在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙,包括:
    将所述剩余时隙中的M-(M+N-K)/2个时隙确定为所述第一数据时隙,将所述剩余时隙中除所述M-(M+N-K)/2个时隙之外的时隙确定为所述第二数据时隙;其中,K为所述剩余时隙的个数。
  13. 根据权利要求10所述的方法,其特征在于,所述预设调度规则包括所述WRR调度,所述按照预设调度规则在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙,包括:
    将所述剩余时隙中的M-(M+N-K)*q个时隙确定为所述第一数据时隙,将所述剩余时隙中除所述M-(M+N-K)*q个时隙之外的时隙确定为所述第二数据时隙;其中,K为所述剩余时隙的个数,0<q<1。
  14. 根据权利要求1-13中任一项所述的方法,其特征在于,所述第一电子设备采用所述WiFi直连模式与第二电子设备进行第一业务,且所述第一电子设备发起所述第一业务;所述第二电子设备采用所述WiFi直连模式和所述STA模式进行DBAC复用,所述方法还包括:
    向所述第二电子设备发送第一时隙配置信息;所述第一时隙配置信息用于指示所述调度周期中所述第一数据时隙和所述第二数据时隙的位置。
  15. 根据权利要求1-13中任一项所述的方法,其特征在于,所述第一电子设备采用所述WiFi直连模式分别与第二电子设备和第三电子设备连接;所述第二电子设备和所述第三电子设备均采用所述WiFi直连模式和所述STA模式进行DBAC复用,所述在剩余时隙中确定第一数据时隙和第二数据时隙,包括:
    获取所述第一电子设备和所述第二电子设备之间的第一时隙配置信息,以及,所述第一电子设备和所述第三电子设备之间的第二时隙配置信息;其中,所述第一时隙配置信息用于指示所述第一电子设备和所述第二电子设备通信时在所述调度周期中第一数据时隙和第二数据时隙的位置,所述第二时隙配置信息用于指示所述第一电子设备和所述第三电子设备通信时在所述调度周期中第一数据时隙和第二数据时隙的位置;
    根据所述第一时隙配置信息和所述第二时隙配置信息,在所述剩余时隙中确定所述第一数据时隙和所述第二数据时隙。
  16. 一种电子设备,其特征在于,所述电子设备包括处理器,所述处理器用于与存储器耦合,并读取存储器中的指令并根据所述指令使得所述电子设备执行权利要求1-15中任一项所述的方法。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-15中任一项所述的方法。
PCT/CN2022/128345 2021-11-29 2022-10-28 WiFi双模式下的资源分配方法、设备和存储介质 WO2023093461A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111448207.1 2021-11-29
CN202111448207.1A CN116209064A (zh) 2021-11-29 2021-11-29 WiFi双模式下的资源分配方法、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2023093461A1 true WO2023093461A1 (zh) 2023-06-01

Family

ID=86506420

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/128345 WO2023093461A1 (zh) 2021-11-29 2022-10-28 WiFi双模式下的资源分配方法、设备和存储介质

Country Status (2)

Country Link
CN (1) CN116209064A (zh)
WO (1) WO2023093461A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010043949A1 (en) * 2008-10-14 2010-04-22 Thomson Licensing Performance improvement of dual mode devices for data-over-cable applications
CN103529793A (zh) * 2013-10-18 2014-01-22 中山司南物联网科技有限公司 一种基于wifi的sta模式与ap模式的物联网控制系统及其控制方法
CN105165106A (zh) * 2013-05-03 2015-12-16 高通股份有限公司 用于对等和ap话务复用的系统和方法
CN107534604A (zh) * 2015-05-29 2018-01-02 华为技术有限公司 一种数据处理方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010043949A1 (en) * 2008-10-14 2010-04-22 Thomson Licensing Performance improvement of dual mode devices for data-over-cable applications
CN105165106A (zh) * 2013-05-03 2015-12-16 高通股份有限公司 用于对等和ap话务复用的系统和方法
CN103529793A (zh) * 2013-10-18 2014-01-22 中山司南物联网科技有限公司 一种基于wifi的sta模式与ap模式的物联网控制系统及其控制方法
CN107534604A (zh) * 2015-05-29 2018-01-02 华为技术有限公司 一种数据处理方法及装置

Also Published As

Publication number Publication date
CN116209064A (zh) 2023-06-02

Similar Documents

Publication Publication Date Title
TWI433577B (zh) 用於異質無線網路之多重無線射頻協調的設備及方法
JP7246510B2 (ja) マルチリンク端末及びそのアドレス割り当て方法、ネットワークアクセス装置及び媒体
US11418999B2 (en) Buffer status report for high priority transmission
JP2022541085A (ja) ネットワークアクセス装置に接続する方法、端末及びコンピュータ読み取り可能な記憶媒体
TW201433186A (zh) Wifi即時串流及藍牙共存
US20220264675A1 (en) System and method for processing data
US20220132511A1 (en) Resource allocation device
WO2021180091A1 (zh) 一种协作通信的方法和应用于协作通信的装置
US20230345221A1 (en) Method for transmitting data in near field, device, and system
WO2021174536A1 (zh) 一种通信方法及相关装置
TW202339539A (zh) 通訊裝置、通訊裝置之控制方法、及通訊控制程式
JP2023528613A (ja) 無線通信方法及び装置、端末及び記憶媒体
US10064097B2 (en) Interface shaping for virtual interfaces
WO2023093461A1 (zh) WiFi双模式下的资源分配方法、设备和存储介质
WO2022062838A1 (zh) 资源配置方法及装置
WO2021217534A1 (zh) 一种通信方法和装置
EP3952462A1 (en) Communication method, communication apparatus, and terminal device
Chang et al. QoS-Oriented Uplink OFDMA Random Access Scheme for IEEE 802.11 be
Venkateswaran et al. Cognitive radio ad-Hoc networks: some new results on multi-channel hidden terminal problem
WO2023279359A1 (zh) 通信方法和装置
WO2024067062A1 (zh) 数据传输方法和相关产品
WO2024032730A1 (zh) 资源指示方法以及通信装置
WO2024067186A1 (zh) 一种通信方法及装置
US11974363B2 (en) Communication method, communication apparatus, and terminal device
WO2023045714A1 (zh) 一种调度方法及通信装置

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: 22897544

Country of ref document: EP

Kind code of ref document: A1