WO2023061217A1 - 一种数据传输方法及装置 - Google Patents

一种数据传输方法及装置 Download PDF

Info

Publication number
WO2023061217A1
WO2023061217A1 PCT/CN2022/121905 CN2022121905W WO2023061217A1 WO 2023061217 A1 WO2023061217 A1 WO 2023061217A1 CN 2022121905 W CN2022121905 W CN 2022121905W WO 2023061217 A1 WO2023061217 A1 WO 2023061217A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
discovery window
data frame
threshold
cluster
Prior art date
Application number
PCT/CN2022/121905
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 WO2023061217A1 publication Critical patent/WO2023061217A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • 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
    • H04W8/00Network data management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • the present application relates to the technical field of communications, and in particular to a data transmission method and device.
  • Wi-Fi Internet access Due to the lower tariff and faster network speed, Wi-Fi Internet access has become the preferred way for many users to access the Internet.
  • Wi-Fi devices are used in Wi-Fi Internet access, and Wi-Fi devices can be access points (access point, AP), stations (station, STA) and other devices including Wi-Fi chips.
  • the Wi-Fi network may include a neighbor awareness networking (NAN).
  • NAN divides resources dedicated to transmitting control information and resources dedicated to transmitting data information for devices, and devices can use corresponding resources for communication.
  • the system allocates fixed resources for devices, resulting in low resource utilization and low data transmission performance.
  • the present application provides a data transmission method and device, which can improve data transmission performance in a neighbor-aware network.
  • a data transmission method is provided, which is applied to the first electronic device or a component (such as a chip system) capable of realizing the function of the first electronic device.
  • the first electronic device is added to the first cluster, and the network where the first cluster is located is the first cluster.
  • a network the method includes: determining that there is a data frame to be sent within the discovery window, and sending the data frame within the discovery window. It can be seen that the devices in the cluster (such as the first electronic device) can not only exchange management frames in the discovery window, but also exchange data frames in the discovery window according to service requirements.
  • the idle time-domain resources in the discovery window can be used to transmit data frames, thereby improving the utilization rate of the time-domain resources and avoiding waste of idle time-domain resources.
  • the transmission timing of the data frame can be advanced within the discovery window, so that the service delay can be reduced.
  • the method before sending the data frame within the discovery window, the method further includes: determining whether the first condition for allowing the first electronic device to send the data frame within the discovery window is met;
  • Sending the data frame within the discovery window includes: if the first condition is met, then sending the data frame within the discovery window.
  • the method before sending the data frame within the discovery window, the method further includes: receiving first indication information from the second electronic device, where the first indication information is used to indicate that the data frame is allowed to be sent within the discovery window; second the electronic device is the master device;
  • Sending the data frame in the discovery window includes: sending the data frame in the discovery window according to the first indication information.
  • other devices in the cluster can dynamically instruct the first electronic device whether to allow the first electronic device to send data frames in the discovery window, which increases the flexibility of data frame scheduling in the WLAN.
  • determining that there is a data frame to be sent in the discovery window includes: detecting that there is a data frame to be sent within the time period corresponding to the discovery window, or detecting that there is a data frame to be sent within the discovery window During the time period corresponding to the window, there are newly arrived data frames to be sent.
  • the method before sending the data frame within the discovery window, the method further includes: receiving a first instruction input by the user, where the first instruction is used to instruct to enable the first function, and the first Capabilities are functions that improve data transfer performance.
  • the method before sending the data frame within the discovery window, the method further includes: detecting that it is in a preset scene, and enabling a first function; the first function is a function to improve data transmission performance;
  • the preset scene includes a combination of one or more of the following scenes:
  • the first electronic device starts a preset application program, and the data frame to be sent is a data frame of the preset application program; the first electronic device starts a preset function of the preset application program, and The data frame to be sent is the data frame of the preset function.
  • the method before detecting the preset scene, the method further includes: receiving a second instruction input by a user, where the second instruction is used to set the preset application.
  • the first condition includes any one or more of the following: the channel busyness of the first network is less than the first threshold, the packet loss rate of the first electronic device is less than the second threshold, the The retransmission rate is less than the third threshold, the number of devices in the first cluster is less than the fifth threshold, the service priority of the first electronic device is higher than the fourth threshold, and the RSSI of the first electronic device is higher than the sixth threshold.
  • the first condition is a condition that can indicate that there are idle time domain resources in the discovery window. That is to say, in the technical solutions of the embodiments of the present application, the electronic device may be allowed to use the discovery window to send data frames when it is determined that there are idle time domain resources in the discovery window. In this way, technical problems such as packet loss of data frames caused by the congestion of the discovery window can be avoided, and the time domain resources of the discovery window can be fully utilized to improve data transmission performance.
  • the data frame sent by the first electronic device within the discovery window satisfies any one or more of the following conditions: the amount of data is less than the seventh threshold, the sending rate is less than the eighth threshold, and the number of sending times is less than the ninth threshold .
  • the data volume, sending rate, and sending times sent by the device in the discovery window can be dynamically adjusted, so that the data volume, sending rate, and sending times match the current network conditions, and a higher data transfer performance.
  • a data transmission method is provided, which is applied to a second electronic device or a component (such as a chip system) capable of realizing the function of the second electronic device.
  • the second electronic device joins the first cluster, and the second electronic device is the master device; the network where the first cluster is located is the first network, and the method includes: determining first indication information, and sending the first indication information to the first electronic device, where the first indication information is used to indicate that the first electronic device is allowed within the discovery window Send a data frame.
  • determining the first indication information includes: determining the first indication information when a first condition that allows the first electronic device to send the data frame within the discovery window is met.
  • the first condition includes any one or more of the following: the channel busyness of the first network is less than the first threshold, the packet loss rate of the first electronic device is less than the second threshold, the The retransmission rate is less than the third threshold, the number of devices in the first cluster is less than the fifth threshold, the service priority of the first electronic device is higher than the fourth threshold, and the RSSI of the first electronic device is higher than the sixth threshold.
  • a first electronic device joins the first cluster, and the network where the first cluster is located is the first network.
  • the device includes:
  • a processor configured to determine that there is a data frame to be sent in the discovery window
  • Transceiver to send data frames within the discovery window.
  • the processor is further configured to determine whether a first condition for allowing the first electronic device to send data frames within the discovery window is met;
  • the transceiver is configured to send the data frame within the discovery window, including: if the first condition is met, then send the data frame within the discovery window.
  • the transceiver is further configured to receive first indication information from the second electronic device, where the first indication information is used to indicate that data frames are allowed to be sent within the discovery window; the second electronic device is a master device;
  • the transceiver configured to send the data frame within the discovery window, includes: sending the data frame within the discovery window according to the first indication information.
  • the processor is configured to determine that there is a data frame to be sent within the discovery window, including: detecting that there is already a data frame to be sent within the time period corresponding to the discovery window, or , detecting that there is a newly arrived data frame to be sent within the time period corresponding to the discovery window.
  • the processor is further configured to receive a first instruction input by a user, where the first instruction is used to instruct enabling a first function, and the first function is a function of improving data transmission performance.
  • the processor is further configured to detect that it is in a preset scene, and enable a first function; the first function is a function of improving data transmission performance;
  • the preset scene includes a combination of one or more of the following scenes:
  • the first electronic device starts a preset application program, and the data frame to be sent is a data frame of the preset application program; the first electronic device starts a preset function of the preset application program, and The data frame to be sent is the data frame of the preset function.
  • the processor is further configured to receive a second instruction input by a user, where the second instruction is used to set the preset application.
  • the first condition includes any one or more of the following: the channel busyness of the first network is less than the first threshold, the packet loss rate of the first electronic device is less than the second threshold, the The retransmission rate is less than the third threshold, the number of devices in the first cluster is less than the fifth threshold, the service priority of the first electronic device is higher than the fourth threshold, and the RSSI of the first electronic device is higher than the sixth threshold.
  • the data frame sent by the first electronic device within the discovery window satisfies any one or more of the following conditions: the amount of data is less than the seventh threshold, the sending rate is less than the eighth threshold, and the number of sending times is less than the ninth threshold .
  • a second electronic device is provided.
  • the second electronic device is added to the first cluster, and the second electronic device is the master device;
  • the network where the first cluster is located is the first network, and the device includes:
  • a processor configured to determine first indication information
  • the transceiver is configured to send first indication information to the first electronic device, where the first indication information is used to indicate that the first electronic device is allowed to send data frames within the discovery window.
  • the processor configured to determine the first indication information, includes: determining the first indication information when a first condition that allows the first electronic device to send the data frame within the discovery window is satisfied.
  • the first condition includes any one or more of the following: the channel busyness of the first network is less than the first threshold, the packet loss rate of the first electronic device is less than the second threshold, the The retransmission rate is less than the third threshold, the number of devices in the first cluster is less than the fifth threshold, the service priority of the first electronic device is higher than the fourth threshold, and the RSSI of the first electronic device is higher than the sixth threshold.
  • an electronic device including: a processor, a memory, and a Wi-Fi module, the memory, the Wi-Fi module, and the processor are coupled, and the memory is used to store computer program codes, and the computer program codes include computer instructions.
  • the processor reads computer instructions from the memory, so that the electronic device executes the method in any of the above aspects and in any possible implementation manner.
  • an apparatus which is included in an electronic device, and has a function of realizing the behavior of the electronic device in any method in the above aspect and possible implementation manners.
  • This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
  • Hardware or software includes at least one module or unit corresponding to the above functions. For example, a communication module or unit, a control module or unit, etc.
  • a computer-readable storage medium including computer instructions.
  • the computer instructions When the computer instructions are run on the electronic device, the electronic device is made to execute the method in the above aspect and any possible implementation manner.
  • a computer program product is provided.
  • the computer program product is run on a computer, the computer is made to execute the method in the above aspect and any possible implementation manner.
  • a ninth aspect provides a chip system, including a processor.
  • the processor executes an instruction, the processor executes the method in the above aspect and any possible implementation manner.
  • a data transmission system including the first electronic device (or the chip system realizing the function of the first electronic device) and the second electronic device (or the chip system realizing the function of the second electronic device) in any possible design of any aspect above. chip system).
  • FIG. 1 is a schematic diagram of the system architecture provided by the embodiment of the present application.
  • FIG. 2A is a schematic diagram of a scheduling cycle provided by an embodiment of the present application.
  • FIG. 2B is an example diagram of the data transmission method provided by the embodiment of the present application.
  • FIG. 3 and FIG. 4 are schematic structural diagrams of the electronic equipment provided by the embodiment of the present application.
  • FIG. 5 is an example diagram of a data transmission method provided in an embodiment of the present application.
  • FIG. 6A, FIG. 6B, and FIG. 7 are schematic diagrams of the interface provided by the embodiment of the present application.
  • FIG. 8 is a flowchart of a data transmission method provided in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the software and hardware queues of data frames and management frames provided by the embodiment of the present application.
  • FIG. 10 is an example diagram of a data transmission method provided in an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a frame format provided by an embodiment of the present application.
  • FIG. 12 is a flowchart of a data transmission method provided by an embodiment of the present application.
  • FIG. 13 is an example diagram of a data transmission method provided by an embodiment of the present application.
  • FIG. 24 is a schematic diagram of a frame format provided by an embodiment of the present application.
  • FIG. 25 and Figure 26 are schematic diagrams of the interface provided by the embodiment of the present application.
  • FIG. 27 is a schematic diagram of a core structure in an electronic device provided by an embodiment of the present application.
  • FIG. 28 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
  • FIG. 1 it is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • the communication system includes an electronic device 100 - an electronic device 700 .
  • the electronic device 100-the electronic device 700 may be devices supporting a WLAN awareness protocol (or NAN protocol).
  • Devices that support the Wi-Fi awareness protocol can enable the Wi-Fi awareness function. After the WLAN sensing function is turned on, the electronic device can discover (discover) its neighboring devices, and can join the cluster where the neighboring devices are located. As shown in FIG. 1 , electronic devices 100 - 700 may form a cluster. As a possible implementation manner, all devices in the same cluster share a set of NAN parameters.
  • the NAN parameters include but are not limited to a NAN cluster identifier (ID).
  • the devices in the cluster can serve as master (master) devices or slave (non-master) devices.
  • the master device in the cluster can be determined through election among the devices.
  • the master device may be a device such as an access point, or a device such as a station.
  • the slave device may be a device such as an access point, or a device such as a station.
  • the protagonist level value of the device is related to one or more parameters such as battery power and device type.
  • the master device can perform a series of operations corresponding to the master device.
  • For slave devices in the cluster perform operations corresponding to the slave devices.
  • the corresponding operations of the master device include but are not limited to: sending a beacon (beacon) frame, and the beacon frame may carry time synchronization function (time synchronization function, TSF) clock information.
  • the operations corresponding to the slave device include but are not limited to: extracting TSF clock information after receiving the beacon frame from the master device, and completing time synchronization with the master device according to the TSF clock information.
  • the slave device can realize time synchronization with the master device according to the TSF clock information and the locally estimated delay (such as the local delay from receiving from the antenna port to the final processing).
  • the locally estimated delay such as the local delay from receiving from the antenna port to the final processing.
  • other ways of synchronizing the time from the device can also be used, which is not limited here.
  • devices outside the cluster shown in Figure 1 can discover and join the cluster shown in Figure 1 .
  • the electronic device 800 (not shown in FIG. 1 ) enables the WLAN awareness function, it can search for beacon frames. ), the electronic device 800 can synchronize to the electronic device according to the beacon frame. In this way, the electronic device 800 joins the cluster shown in FIG. 1 .
  • a cluster such as that shown in FIG. 1 may also be referred to as a domain (cluster).
  • the devices in the cluster may include devices that have established data connections with other devices, and devices that have not established data connections with other devices.
  • data frames and management frames can be exchanged between devices establishing a data connection. Between devices that have not established a data connection, management frames can be exchanged, but data frames cannot be exchanged.
  • an island (called a data cluster in the NAN protocol) can be formed between devices that have established data connections.
  • a data cluster in the NAN protocol
  • the electronic devices 300-700 form a cluster.
  • the device 100 and the device 300 form an island (subsequently, other devices may also join the island).
  • the device 400 establishes a data connection with the device 500
  • the device 400 establishes a data connection with the device 600
  • the device 400, the device 500, and the device 600 can form an island.
  • the devices 700 and 200 have not established data connections with other devices, and the devices 700 and 200 are not in the island.
  • a scheduling cycle usually includes a discovery window (discovery window, DW), there is an interval GAP between the discovery windows of different scheduling cycles, and the GAP can be used to transmit data, which can be called a business time slot or a working time. Gap.
  • devices in the cluster can exchange management frames (frames other than data frames are collectively referred to as management frames) within the discovery window of the scheduling period, and exchange data frames outside the discovery window of the scheduling period. That is to say, the discovery window is usually used to exchange management frames other than data frames, and the management frames include but are not limited to any one or more of the following frames: beacon frame, period notification frame (PNF).
  • PNF period notification frame
  • the master device can broadcast window parameters.
  • the window parameters include any two of discovery window length, scheduling period, and service time slot length.
  • devices in the cluster can exchange management frames on the same channel.
  • devices on the same island can exchange data frames on the same channel, and devices on different islands can exchange data frames on different channels.
  • FIG. 2B shows the time domain position and the frequency domain position of the management frame of each device in the cluster shown in FIG. 1 .
  • each device in the cluster shown in FIG. 1 can transmit management frames on the same common channel 36 in the discovery window within the scheduling period.
  • FIG. 2B also shows the time-domain and frequency-domain positions of data frames of some devices in the cluster shown in FIG. 1 .
  • FIG. 2B is illustrated by taking device 100 and device 300 in island 1 shown in FIG. 1 using channel 40 to exchange data frames, and devices 400, 500, and 600 in island 2 shown in FIG. 1 using channel 149 to exchange data frames as an example.
  • the time-domain positions and/or frequency-domain positions of the data frames and management frames interacted between devices in the cluster may also be other, and are not limited to the manners listed above.
  • devices on different islands can use the same channel to exchange data frames.
  • island 1 uses channel10 interaction data frame
  • island 2 also uses channel10 interaction data frame.
  • the fastest sending timing of data frames is within the non-discovery window of this scheduling cycle.
  • the fastest sending timing of data frames is the discovery window of the first scheduling cycle. When the window ends, that is, time t1. In this way, service delay may be caused. For services with high delay, service delay will seriously affect WLAN performance, thereby degrading user experience.
  • devices in the cluster can also exchange data frames in the discovery window according to service requirements.
  • the idle time domain resources in the discovery window can be used to transmit data frames, thereby improving the utilization rate of the time domain resources and avoiding waste of idle time domain resources of the WLAN.
  • the transmission timing of the data frame can be advanced within the discovery window, thus reducing the service delay.
  • the electronic device in this application can be a mobile phone, a tablet computer, a personal computer (personal computer, PC), a personal digital assistant (personal digital assistant, PDA), a smart watch, a netbook, a wearable electronic device, an augmented reality technology (augmented reality, AR) equipment, virtual reality (virtual reality, VR) equipment, vehicle-mounted equipment, smart cars, smart audio, robots, etc., this application does not specifically limit the specific form of the electronic equipment.
  • augmented reality technology augmented reality, AR
  • VR virtual reality
  • vehicle-mounted equipment smart cars, smart audio, robots, etc.
  • first and second in the specification and drawings of the present application are used to distinguish different objects, or to distinguish different processes for the same object. Words such as “first” and “second” can distinguish the same or similar items with basically the same function and effect. For example, the first device and the second device are only used to distinguish different devices, and their sequence is not limited. Those skilled in the art can understand that words such as “first” and “second” do not limit the number and execution order, and words such as “first” and “second” do not necessarily limit the difference.
  • At least one means one or more
  • Multiple means two or more.
  • a and/or B describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural.
  • the character "/" generally indicates that the contextual objects are an "or” relationship.
  • At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
  • FIG. 3 shows a schematic structural diagram of the electronic device.
  • the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and user An identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor (which can detect ambient light brightness), bone conduction sensors, etc.
  • the structure shown in the embodiment of the present invention does not constitute a specific limitation on the electronic device.
  • the electronic device may include more or fewer components than shown in the illustrations, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing modules, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing modules may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to a touch sensor, a charger, a flashlight, a camera 193 and the like through different I2C bus interfaces.
  • the processor 110 can be coupled to the touch sensor through the I2C interface, so that the processor 110 and the touch sensor can communicate through the I2C bus interface to realize the touch function of the electronic device.
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both I2S interface and PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device.
  • the processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device.
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other terminals, such as AR devices.
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device.
  • the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide WLAN (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), FM (frequency modulation, FM), near field communication (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the processor 110 is configured to determine that there is a data frame to be sent within the discovery window, and control a sending module (such as a WLAN module) to send the data frame to be sent within the discovery window.
  • a sending module such as a WLAN module
  • the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc.
  • GNSS can include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou satellite navigation system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi-zenith) satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou satellite navigation system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quasi-zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device realizes the display function through the GPU, the display screen 194, and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device can realize the shooting function through ISP, camera 193 , video codec, GPU, display screen 194 and application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when an electronic device selects a frequency point, a digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
  • Video codecs are used to compress or decompress digital video.
  • An electronic device may support one or more video codecs.
  • the electronic device can play or record video in multiple encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • the NPU is a neural-network (NN) computing processor.
  • NPU neural-network
  • Applications such as intelligent cognition of electronic devices can be realized through NPU, such as: image recognition, face recognition, speech recognition, text understanding, etc.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • the electronic device can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device receives a call or a voice message, it can listen to the voice by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device may be provided with at least one microphone 170C.
  • the electronic device can be provided with two microphones 170C, which can also implement a noise reduction function in addition to collecting sound signals.
  • the electronic device can also be equipped with three, four or more microphones 170C to realize sound signal collection, noise reduction, identify sound sources, and realize directional recording functions, etc.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to realize contact and separation with the electronic device.
  • the electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device interacts with the network through the SIM card to realize functions such as calling and data communication.
  • the electronic device adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
  • the electronic device in this application is a device that can also provide a wireless Internet access function for the electronic device, such as a wireless router, customer premise equipment (Customer Premise Equipment, CPE), etc.
  • the electronic device may include a processor 201, a memory 203, a communication module 202, an antenna (not shown in FIG. 4), a power module (not shown in FIG. 4 )wait.
  • the communication module includes a Wi-Fi module, an Internet access module for connecting to the Internet, and the like.
  • the Wi-Fi module can be used to establish a Wi-Fi connection with electronic devices such as mobile phones. In this way, the mobile phone can use the Internet access module of the router to access the Internet.
  • FIG. 5 an application example of the transmission method of the embodiment of the present application is shown.
  • Devices in the cluster can not only exchange data frames in service time slots (that is, GAPs), but also exchange data frames in discovery windows.
  • some idle time domain resources in the discovery window can be used to transmit data frames, thereby improving the utilization rate of WLAN time domain resources.
  • the transmission timing of the data frame can be advanced from the end time of the discovery window (such as t1 shown in FIG. 2B ) to within the discovery window (such as t2 shown in FIG. 5 ), so that the delay of WLAN services can be reduced. It can be seen that the technical solutions of the embodiments of the present application can comprehensively improve the transmission performance of the WLAN.
  • the electronic device may always enable the WLAN transmission performance enhancement function by default.
  • WLAN transmission performance enhancement may refer to allowing data frames to be transmitted within a discovery window during WLAN transmission.
  • a switch may be set in the electronic device, through which the user may manually enable or disable the function of improving the WLAN transmission performance of the electronic device provided by the embodiment of the present application.
  • a switch control 501 can be set in the setting page of the "Settings" application 501, which is used for the user to turn on or off the WLAN transmission provided by the embodiment of the present application.
  • Enhanced functions i.e. first functions that improve data transmission performance).
  • the electronic device displays the setting interface as shown in (2) of FIG.
  • the electronic device displays the WLAN setting interface as shown in (3) of FIG. 6B , the WLAN setting interface includes a switch 504, which can be used to enable or disable the function of improving WLAN transmission performance in the embodiment of the present application.
  • the WLAN transmission enhancement function can be turned on,
  • the WLAN transmission performance enhancement function can be enabled on the setting interface of different applications, for example, it can be enabled on the setting interface of the Huawei video application.
  • Data frames can be sent to the call peer, for example, video image data frames and audio data frames are sent to the call peer both within the discovery window and outside the discovery window, so as to improve resource utilization.
  • the switch 504 shown in (3) in FIG. 6B has been turned on, and the mobile phone is in the process of unblocked communication, if the first condition is met, the data frame is allowed to be sent within the discovery window.
  • the first condition is met, the data frame is allowed to be sent within the discovery window.
  • the WLAN transmission enhancement function is enabled, that is, the method provided by the embodiment of the present application is used to allow sending data frames within the discovery window, so as to improve the electronic device.
  • the preset scene may include but not limited to the following single condition or a combination of multiple conditions: the electronic device opens a preset application program; the data frame to be sent is a data frame of the preset application program; the electronic device opens a preset application program The preset function; the data frame to be sent is the data frame of the preset function.
  • the preset applications are low-latency service applications, such as instant messaging applications and game applications.
  • the preset application program can be set by the electronic device, or set by the user. For example, the electronic device turns on the WLAN transmission enhancement function of certain service types of applications by default.
  • the data frame of the preset application can be sent in time within the discovery window, without waiting for the end of the discovery window to send the data frame, which can ensure the low cost of the business. Delay, avoiding the waste of time-domain resources caused by waiting for the end of the discovery window.
  • the preset functions of the preset application include, but are not limited to, low-latency service functions.
  • the functions of the low-latency service include but are not limited to functions such as voice calls, video calls, and screen projection.
  • the first electronic device may automatically enable the WLAN transmission performance enhancement function, or prompt the user to enable it.
  • the method for transmitting data in the WLAN provided by the embodiment of the present application can be used to improve the transmission performance of the application program during transmission (such as sending and/or receiving) data frames.
  • the user can trigger the pop-up control 603 of the mobile phone through an operation such as clicking the control 601 .
  • This control can be used to select how to set the corresponding WLAN transmission enhancement function when the target application is started.
  • the technical solution of the embodiment of the present application can be used, that is, if the target application has data to be sent frame, the data frame may be allowed to be sent within the discovery window.
  • the electronic device may also provide an entry for setting a target application (or called a preset application).
  • a target application or called a preset application.
  • the mobile phone can display the control 602. If the user's operation such as clicking the control 602 is detected, the mobile phone can jump to the interface 604 shown in (4) of FIG. 7 . Through the interface 604, the user may receive a second instruction input by the user to set a target application. Subsequently, the data frame of the target application can be sent within the discovery window, which can reduce the service delay of the target application.
  • the above-mentioned setting entry provided by the electronic device to the user for setting the application for enabling the WLAN transmission enhancement function is only an example, and the setting entry (including but not limited to setting through the interface) can also be other.
  • the first electronic device may automatically enable or prompt the user to enable the function of improving WLAN transmission performance.
  • the embodiment of the present application does not specifically limit how to enable the function of improving WLAN transmission performance.
  • the WLAN transmission enhancement function of multiple devices in the cluster may be enabled through any of the above methods.
  • both the master device and the slave devices in the cluster enable the WLAN transmission enhancement function described above.
  • the method for transmitting data in the WLAN provided by the embodiment of the present application is described in detail as follows, as shown in FIG. 8, the method may include the following steps:
  • the first electronic device determines that there is a data frame to be sent within the discovery window.
  • the first electronic device may be a master device or a slave device in the first cluster, which is not limited here.
  • the network where the first cluster is located is the first network.
  • the first electronic device may store the data generated by the upper-layer application program in a storage area such as a queue, and when it needs to be sent, take corresponding data from the queue and send it.
  • a storage area such as a queue
  • data frames and management frames may be stored in different queues.
  • the queues may include software queues and hardware queues.
  • FIG. 9 shows an example of a queue used in this embodiment of the present application.
  • the first electronic device may store the data frame generated by the upper-layer application program into the hardware queue of the data frame.
  • the first electronic device may store the data frame generated by the upper-layer application Store to software queue for data frames.
  • the software queue of data frames when the software queue of data frames is also filled, subsequent data frames may be discarded.
  • the first electronic device may also store the management frame to be sent in a queue corresponding to the management frame.
  • the queues corresponding to the management frames can also be divided into software queues and hardware queues. For the working principles of the software queues and hardware queues of the management frames, please refer to the software queues and hardware queues of the data frames.
  • the first electronic device may execute step S102, that is, send the data frame to be sent within the discovery window, so as to prompt resource utilization and reduce service delay.
  • the first electronic device sends the data frame to be sent within the discovery window.
  • (2) in FIG. 10 shows the relationship between the queue scheduling and the discovery window in the embodiment of the present application.
  • frame 1, frame 2, and frame 3 in FIG. 10 refer to data frames.
  • the scheduling process of the data frame queue is not suspended.
  • the scheduling processing of the software queue and the hardware queue of the data frame is not suspended. That is to say, when there is a data frame to be sent in the software queue or the hardware queue, the data frame to be sent can be directly scheduled and sent within the discovery window.
  • the scheme prioror art scheme
  • the data transmission method of the embodiment of the present application by allowing data frames to be sent in the discovery window, can not only reduce the service delay as much as possible, but also improve resource utilization, thereby obtaining a higher WLAN performance.
  • the scheduling process of the data frame since the scheduling process of the data frame is not suspended, it can also be regarded as The scheduling process of the data frame is not interrupted, so the data frame to be sent can be taken out of the queue and sent in time, providing more storage area for the queue, thereby reducing the probability of queue overflow and reducing the number of data frames caused by queue overflow. throw away.
  • the device 200 in FIG. 1 as the main device and the first electronic device as the device 200 as an example, if the device 200 determines that there are data frames to be sent in the current data frame queue and is currently in the discovery window, then The data frame can be sent in time during the discovery window, thus improving resource utilization and reducing service delay.
  • the device 200 determines that there is a data frame to be sent in the current data frame queue and is currently in the discovery window, the device 200 needs to wait for the discovery window to end before sending the data frame, and the resource utilization rate is low. , the service delay is large.
  • the device 100 in FIG. 1 as the slave device and the first electronic device as the device 100 as an example, if the device 100 determines that there are data frames to be sent in the current data frame queue, and is currently in the discovery window (such as In the discovery window 1 shown in (2) of Fig. 10, then the data frame to be sent can be sent in this discovery window. If device 100 determines that there is a data frame to be sent in the current data frame queue, and is currently outside the discovery window ( For example, GAP1) shown in (2) of Figure 10, then the data frame to be sent can be sent in the GAP1.
  • the discovery window such as In the discovery window 1 shown in (2) of Fig. 10
  • the device determines that there is a data frame to be sent in the data frame queue, it can directly To send the data frame to be sent, it is not necessary to judge whether to allow the data frame to be sent according to whether it is currently in the discovery window.
  • the data frame and the management frame can be distinguished through the 2bit Type field in the Wi-Fi MAC frame format.
  • 10 means Data frame
  • 00 means Management frame
  • 01 means Control frame
  • 11 means Extension frame (extended frame).
  • Management frame, Control frame, and Extension frame can be collectively referred to as management frames.
  • Fig. 11 exemplarily shows a MAC frame format.
  • the type field in the bold box can be used to distinguish the data frame and the management frame. It can be understood that this is only an example for distinguishing data frames from management frames. In actual implementation, other arbitrary bit fields in other frame formats can also be used. Due to space limitations, this embodiment of the present application does not exhaust all possible situation.
  • step S201 may be executed to determine whether to allow sending data frames in the discovery window, and if it is allowed to send data frames in the discovery window, then the first electronic device executes step S102, if If it is not allowed (prohibited) to send the data frame within the discovery window, the first electronic device executes step S202 to send the data frame after the discovery window ends.
  • the first electronic device judges whether it is allowed to send data frames within the discovery window, which may be implemented as follows: the first electronic device judges whether the first condition for allowing the first electronic device to send data frames within the discovery window is met, and if the first electronic device is satisfied. If the first condition is not satisfied, the data frame is not allowed to be sent within the discovery window.
  • the first electronic device judges whether to allow sending data frames within the discovery window, which may be implemented as: other electronic devices (such as the second electronic device in the cluster) judge whether the first electronic device is allowed to send data frames within the discovery window, If allowed, the second electronic device notifies the first electronic device that it is allowed to send data frames (first indication information) within the discovery window; Send a data frame.
  • the second electronic device judges whether to allow the first electronic device to send data frames within the discovery window, which may be implemented as follows: the second electronic device judges whether the first condition is met, and if the first condition is met, the second electronic device The first electronic device is notified that the data frame is allowed to be sent within the discovery window, and if the first condition is not met, the second electronic device is notified to the first electronic device that the data frame is not allowed to be sent within the discovery window.
  • the first condition includes a combination of any one or more of the following conditions: the channel busyness of the discovery window is less than the first threshold, the packet loss rate of the network where the cluster is located is less than the second threshold, and the retransmission rate of the network where the cluster is located is less than The third threshold, the number of devices in the cluster is less than the fifth threshold, the received signal strength indication (RSSI) is higher than the sixth threshold, and the service priority of the data frame to be sent is higher than the fourth threshold.
  • the channel busyness of the discovery window is less than the first threshold
  • the packet loss rate of the network where the cluster is located is less than the second threshold
  • the retransmission rate of the network where the cluster is located is less than The third threshold
  • the number of devices in the cluster is less than the fifth threshold
  • the received signal strength indication (RSSI) is higher than the sixth threshold
  • the service priority of the data frame to be sent is higher than the fourth threshold.
  • each of the above thresholds may be preset, such as factory-set, or may be set in a subsequent communication process.
  • the embodiment of the present application does not limit the way of setting the threshold and the specific value of the threshold.
  • the data frame may be sent through the idle time domain resource of the discovery window.
  • the Wi-Fi-based carrier sense mechanism sends data frames within the discovery window when the channel is detected to be idle. In this way, the utilization rate of time-domain resources in the discovery window can be improved, and the waste of air interface resources can be avoided.
  • the delay of data frames can be reduced, thereby reducing service delay.
  • the first electronic device determines that there are data frames to be sent, and the number of devices in the cluster is greater than or equal to the fifth threshold (indicating strong air interface competition), it is not allowed to send data frames within the discovery window, that is, it needs to be within the current Send the data frame to be sent after the discovery window ends. In this way, loss of management frames caused by air interface contention can be avoided.
  • the packet loss rate of the network is small, indicating that the network is in good condition, and the competition between devices is small within the discovery window. In this case, there are likely to be many idle time domain resources in the discovery window. Considering this situation, in this embodiment of the present application, if the first electronic device determines that the packet loss rate of the network is less than the second threshold, it allows sending data frames within the discovery window, so as to efficiently utilize idle time domain resources. Conversely, if the first electronic device determines that the packet loss rate of the network is greater than or equal to the second threshold, it is not allowed to send data frames within the discovery window, so as to avoid too many devices competing for the resources of the discovery window.
  • high-priority services may include, but are not limited to, low-latency services.
  • low-latency services include but are not limited to any one or more of the following: games, online courses, instant messaging, live broadcast, red envelope grabbing, screen projection, Internet of Things services, and industrial Internet of Things services.
  • the first electronic device determines that a data frame to be sent is to be sent, and the service priority of the data frame to be sent is higher (greater than) the fourth threshold, the first electronic device is allowed to send the data to be sent within the discovery window frames to meet business needs as much as possible. Conversely, if the first electronic device determines that there is a data frame to be sent, and the service priority of the data frame to be sent is less than or equal to the fourth threshold, the first electronic device is not allowed to send the data frame to be sent within the discovery window.
  • the received signal strength indication (RSSI) of the device indicates that the signal strength is strong, indicating that the network condition is good.
  • RSSI received signal strength indication
  • the degree of competition between devices is often small , it is found that there are likely to be many idle time domain resources in the window.
  • the first electronic device determines that there is a data frame to be sent and detects that the RSSI is higher than the sixth threshold, the data frame to be sent is allowed to be sent within the discovery window.
  • the first electronic device determines that there is a data frame to be sent, and detects that the RSSI is less than or equal to the sixth threshold, it is not allowed to send the data frame to be sent within the discovery window.
  • the first electronic device or other devices in the cluster may count the values of the parameters in the above first condition periodically or by other strategies, and the first electronic device may determine whether to allow sending data frames within the discovery window according to the statistical values.
  • the first electronic device can detect the packet loss rate of the network in the period before the discovery window, such as the packet loss rate of the network in the first half of the discovery window, if the packet loss rate in the first half of the discovery window is If the rate is less than the threshold, it can be inferred that the packet loss rate in the second half of the discovery window is also small, then the first electronic device is allowed to send data frames in the second half of the discovery window. Conversely, if the packet loss rate in the first half of the discovery window is greater than or equal to the threshold, data frames are not allowed to be sent in the second half of the discovery window.
  • the first electronic device determines whether to send the data frame in the discovery window of the current scheduling period by judging the packet loss rate in the discovery window of the previous N (N is a positive integer) scheduling periods. For example, if the packet loss rate in the discovery window of the previous scheduling cycle is less than the threshold, it can be inferred that the packet loss rate in the current discovery window is also smaller, then the first electronic device is allowed to send data frames in the current discovery window. Conversely, if the packet loss rate in the last discovery window is greater than or equal to the threshold, data frames are not allowed to be sent in the current discovery window.
  • the first electronic device determines the packet loss rate of the discovery window network based on other methods.
  • the embodiment of the present application does not limit the specific implementation manner of determining the packet loss rate within the discovery window.
  • the mobile phone determines that there are data frames to be sent within the discovery window (data frames that need to be sent within the discovery window), and the current packet loss rate of the cluster network where the mobile phone is located is relatively small, then the mobile phone can send within the discovery window Data Frame.
  • the mobile phone determines that there are data frames to be sent within the discovery window (data frames that need to be sent within the discovery window), and the current retransmission rate of the cluster network where the mobile phone is located is relatively small, then the mobile phone can be within the discovery window Send a data frame.
  • the mobile phone determines that there is a data frame to be sent within the discovery window, and the service priority of the data frame is higher (for example, the red envelope grabbing service), then the mobile phone can send the data frame within the discovery window.
  • the mobile phone determines that there is a data frame to be sent within the discovery window, and the current RSSI of the cluster network where the mobile phone is located is relatively large, then the mobile phone can send the data frame within the discovery window.
  • the mobile phone determines that there is a data frame to be sent in the discovery window, and the service priority of the data frame is higher (for example, the red packet grab service), and the current number of devices in the cluster is less, then the mobile phone can be in Send data frames within the discovery window.
  • the service priority of the data frame is higher (for example, the red packet grab service), and the current number of devices in the cluster is less, then the mobile phone can be in Send data frames within the discovery window.
  • the WLAN transmission enhancement function implemented in the present application is enabled by the application of smooth connection, then, when the number of devices in the cluster is small, the data of smooth connection can be sent within the discovery window.
  • the WLAN transmission enhancement function implemented in this application is enabled by the Unconnected Call application, and it is assumed that the voice call is a high-priority service, then, when the subsequent user makes a voice call through the Unconnected Call application, the electronic device can be in the Send voice data within the discovery window.
  • the first condition may also be any other condition that can indicate that there are idle time domain resources in the discovery window.
  • the embodiment of the present application does not limit the specific content of the first condition.
  • the first electronic device may schedule and send data frames in time within discovery window 1, for example, schedule and send data frame 1.
  • the discovery window 2 there are data frames 3, 4, and 5 to be sent in the data frame queue.
  • the first condition is not satisfied (for example, the number of devices in the cluster is large)
  • the first electronic device cannot be in the The data frame is scheduled to be sent within the discovery window 2, and the data frame can be scheduled to be sent only after the discovery window 2 ends.
  • Embodiment 2 Compared with the default allowing to send data frames within the discovery window in Embodiment 1, in the technical solution of Embodiment 2, it is possible to dynamically adjust whether to allow data frames to be sent in the discovery window according to the first condition, so that it can be allowed under suitable conditions. Send data frames within the discovery window.
  • the above-mentioned first condition (the condition for judging whether to allow sending data frames within the discovery window) can be judged by the first electronic device itself, or other devices in the cluster can judge the first condition, and the first The judgment result of the condition, for example, an indication message indicating whether to allow the first electronic device to send data frames within the discovery window is sent to the first electronic device, so that the first electronic device can determine whether to allow the first electronic device to send data frames within the discovery window.
  • the two ways of judging the first condition are distinguished as follows.
  • the first electronic device or other devices in the cluster may judge the first condition periodically or according to other strategies.
  • whether the first condition is satisfied can be judged once every scheduling period. As shown in FIG. 13 , if the first condition is satisfied in the first scheduling period within the two scheduling periods, then the first electronic device may send data frames within the discovery window. In the second scheduling period, if the first condition is not satisfied, then the first electronic device needs to wait for the end of the discovery window before sending the data frame.
  • the scheduling strategies in different discovery windows can be adjusted in time, which can further reduce service delay and adjust resource utilization in time.
  • whether the first condition is satisfied may be judged every L (L is a positive integer) scheduling cycles.
  • L is a positive integer
  • the embodiment of the present application does not limit the specific period and manner of judging the first condition. When the detection period is long, the complexity of detecting the first condition can be reduced.
  • the embodiment of the present application also provides a data transmission method.
  • Other devices judge the first condition, and send the judgment result of the first condition, such as an indication message indicating whether the first electronic device is allowed to send data frames within the discovery window, to the second device.
  • an electronic device As shown in Figure 14, the method includes:
  • the second electronic device determines whether a first condition is met. If the first condition is met, execute step S302; if not, execute S303.
  • the second electronic device sends first indication information to the first electronic device.
  • the second electronic device broadcasts the first indication information within the discovery window.
  • the first electronic device receives the first indication information within the discovery window.
  • the first indication information is used to indicate that the first electronic device is allowed to send data frames within the discovery window.
  • the second electronic device sends fourth indication information to the first electronic device.
  • the second electronic device broadcasts the fourth indication information within the discovery window.
  • the first electronic device receives fourth indication information within the discovery window.
  • the fourth indication information is used to indicate that the data frame is not allowed to be sent within the sending window.
  • the first electronic device determines that there is a data frame to be sent within the discovery window.
  • the first electronic device may determine whether to allow sending data frames within the discovery window according to the indication information, and send the data frames according to the indication information.
  • the indication information indicates that data frames are allowed to be sent within the discovery window, and then the first electronic device performs the following steps S201a and S102. In other cases, the indication information indicates that data frames are allowed to be sent within the discovery window, and the first electronic device performs the following steps S201b and S202.
  • the first electronic device determines, according to the first indication information, that data frames are allowed to be sent within the discovery window.
  • step S201a can be regarded as a branch of the above step S201.
  • the first electronic device sends the data frame within the discovery window.
  • the first electronic device determines, according to the fourth indication information, that the data frame is not allowed to be sent within the discovery window.
  • step S201b may be regarded as another branch of the above step S201.
  • the first electronic device sends the data frame after the discovery window ends.
  • the first electronic device needs to wait for the end of the discovery window before sending the data frame.
  • the first electronic device may also determine whether to allow the second electronic device to send data frames within the discovery window. If so, send second indication information to the second electronic device, used to indicate that the second electronic device is allowed to send data frames within the discovery window, if not, send third indication information to the second electronic device, used to indicate that the second electronic device is not allowed The second electronic device sends data frames within the discovery window.
  • the first electronic device may also determine whether the second condition allowing the second electronic device to send data frames within the discovery window is met; if the second condition is met, then send the second indication information to the second electronic device , the second indication information is used to indicate that the data frame is allowed to be sent within the discovery window; if the second condition is not met, the third indication information is sent to the second electronic device, and the third indication information is used to indicate that the data frame is not allowed to be sent within the discovery window Data Frame.
  • the second condition includes any one or more of the following: the channel busyness of the first network is less than the first threshold, the packet loss rate of the second electronic device is less than the second threshold, and the retransmission rate of the second electronic device is less than The third threshold, the number of devices in the first cluster is less than the fifth threshold, the service priority of the second electronic device is higher than the fourth threshold, and the RSSI of the second electronic device is higher than the sixth threshold.
  • FIG. 15 shows an interaction process of the data transmission method according to the embodiment of the present application when the first condition is that the number of devices in the cluster is less than the fifth threshold.
  • step S301 in FIG. 14 can be implemented as S301a-S301c in FIG. 15 .
  • the method includes:
  • the first electronic device sends the first frame to the second electronic device.
  • the second electronic device receives the first frame from the first electronic device.
  • the first frame carries an identifier of the cluster where the first electronic device is located.
  • the second electronic device determines the number of devices in the cluster according to one or more first frames.
  • the second electronic device may receive the first frames from all other devices in the cluster except itself, and may determine the number of devices in the cluster according to the cluster identifiers in the first frames.
  • the identifier of the cluster where the second electronic device is located is 10, and the first frames from 10 devices are received, and the first frames indicate that the 10 devices are all in the cluster with the identifier 10, then the second electronic device may It is determined that the number of devices in the cluster is 11 (including the second electronic device itself).
  • the second electronic device may be a master device or a slave device
  • the first electronic device may also be a master device or a slave device.
  • the first frame may be but not limited to a periodic announcement frame
  • the second frame may be but not limited to a beacon frame
  • the third frame may be But not limited to beacon frames.
  • the second electronic device may receive periodic announcement frames from all other devices in the cluster except itself, and may determine the number of devices in the cluster according to cluster identifiers in these periodic announcement frames.
  • the first electronic device can be other slave devices and a master device in the cluster
  • the first frame can be but not limited to a periodic announcement frame, a beacon frame
  • the second The frame may be, but not limited to, a periodic announcement frame
  • the third frame may be, but not limited to, a periodic announcement frame.
  • the second electronic device can receive periodic announcement frames from all other slave devices in the cluster except itself, receive beacon frames from the master device, and can determine the number of devices in the cluster according to the periodic announcement frames and the cluster identifier in the beacon frame.
  • the second electronic device determines whether the number of devices in the cluster is smaller than a fifth threshold. If yes, execute step S302a. If not, execute step S303a.
  • the second electronic device sends the second frame.
  • the second frame is used to indicate that data frames are allowed to be sent within the discovery window.
  • devices in the cluster can be allowed to send data frames within the discovery window.
  • the second electronic device broadcasts the second frame in the discovery window.
  • other devices in the cluster receive the second frame in the discovery window.
  • the first electronic device determines that there is a data frame to be sent within the discovery window.
  • the first electronic device determines, according to the second frame, that data frames are allowed to be sent within the discovery window.
  • the first electronic device may determine according to the indication of the second frame that data frames are allowed to be sent within the discovery window, and may perform the following step S102.
  • the first electronic device sends the data frame within the discovery window.
  • the second electronic device sends the third frame.
  • the third frame is used to indicate that data frames are not allowed to be sent within the discovery window.
  • the second electronic device broadcasts the third frame within the discovery window.
  • other devices in the cluster such as the first electronic device may receive the third frame within the discovery window.
  • the first electronic device determines that it is not allowed to send data frames within the discovery window.
  • the first electronic device sends the data frame after the discovery window ends.
  • FIG. 15 only shows a possible implementation of determining the number of devices in the cluster, and other ways can also be used to determine the number of devices in the cluster.
  • the embodiment of the present application is limited in space, and all implementations are not exhaustive.
  • the method corresponding to FIG. 15 is illustrated below by taking the second electronic device as the master device and the first electronic device as the slave device as an example. As shown in Figure 16, the method includes:
  • the master device sends a beacon frame.
  • slave devices A and B are shown in FIG. 16 .
  • the cluster may also include other slave devices, which are not shown in FIG. 16 .
  • the master device broadcasts a beacon frame during the discovery window.
  • slave devices in the cluster receive beacon frames during the discovery window.
  • both slave devices A and B can receive the beacon frame from the master device.
  • the beacon frame carries an election attribute of the master device, and the election attribute includes an identification (ID) of the cluster.
  • the beacon frame can be used to indicate the cluster where the master device is located.
  • the cluster ID may be, but not limited to, a basic service set identifier (basic service set identifier, BSSID) of the master device in the cluster.
  • FIG. 17 exemplarily shows a possible frame format of a beacon frame.
  • the beacon frame includes one or more custom attributes (One or More HiD2D Attributes) fields.
  • One or more attributes include election attributes.
  • the election attribute carries the BSSID (master BSSID) of the master device.
  • slave device B announces frames during the discovery window broadcast period.
  • the master device receives the periodic announcement frame from the slave device B within the discovery window.
  • Other slave devices in the cluster receive the periodic announcement frame of the slave device B in the discovery window.
  • slave device A receives a periodic announcement frame from slave device B.
  • the periodic announcement frame sent by the slave device carries the election attribute of the master device, and the election attribute includes the ID of the cluster.
  • the periodic announcement frame can be used to indicate the cluster to which the device belongs.
  • the ID of the cluster may be, but not limited to, the BSSID of the master device in the cluster.
  • FIG. 18 exemplarily shows a possible frame format of the periodic announcement frame, and a possible format of the election attribute.
  • the slave device A sends a cycle announcement frame.
  • the master device determines the number of devices in the cluster according to one or more periodic announcement frames.
  • the master device matches the cluster ID in the periodic announcement frame to obtain the
  • the cluster ID (such as BSSID) of the master device is 11, the cluster ID of the slave device A is 11, and the cluster ID of the slave device B is 11, then the master device determines that both the slave devices A and B belong to the cluster Device, the number of devices in this cluster is 2 (excluding the master device) or 3 (including the master device).
  • the master device judges whether the number of devices in the cluster is smaller than a fifth threshold. If yes, execute step S302a1; if not, execute step S303a1.
  • the master device sends a beacon frame (an example of a second frame).
  • the master device broadcasts beacon frames within the discovery window.
  • the slave device receives beacon frames from the master device within the discovery window.
  • both slave devices A and B can receive the beacon frame from the master device.
  • the beacon frame carries indication information.
  • the indication information is used to indicate that data frames are allowed to be sent within the discovery window.
  • the beacon frame carries one or more attributes (One or More HiD2D Attributes) fields, where one or more attributes include radio resource management (radio resource management, RRM) attributes, and the RRM attributes carry RRM Control (control) field, the RRM control field is used to indicate whether to allow sending data frames in the discovery window.
  • RRM radio resource management
  • control control
  • the indication information may be a field value of the RRM control field.
  • the RRM control (control) field occupies 1 byte (8 bits), and the indication information may be represented by 1 bit in the RRM control (control) field.
  • the second bit of the RRM control (control) field may be used to indicate indication information.
  • the second bit of the RRM control (control) field is 1, it means that the data frame is allowed to be sent within the discovery window, and if the second bit of the RRM control field is 0, it means that the data frame is not allowed to be sent within the discovery window Data Frame.
  • the second bit of the RRM control field is 0, it means that the data frame is allowed to be sent within the discovery window, and if the second bit of the RRM control field is 1, it means that the data frame is not allowed to be sent within the discovery window.
  • any bit in the third to eighth bits of the RRM control field can also be used to represent the indication information, and this embodiment of the present application does not limit the specific implementation of the indication information.
  • the slave device B determines that there is a data frame to be sent within the discovery window.
  • the slave device B after the slave device B receives the beacon frame from the master device, it can parse the beacon frame and obtain the indication information. If the indication information indicates that data frames are allowed to be sent within the discovery window, the slave device B can perform the following steps S201a and S102.
  • the slave device B determines that data frames are allowed to be sent within the discovery window.
  • the slave device B determines that the data frame is allowed to be sent within the discovery window according to the indication information in the beacon frame.
  • the slave device B sends the data frame within the discovery window.
  • the master device sends a beacon frame (an example of a third frame).
  • the beacon frame carries indication information.
  • the indication information is used to indicate that the data frame is not allowed to be sent within the discovery window.
  • the master device broadcasts beacon frames within the discovery window.
  • each slave device receives the beacon frame within the discovery window.
  • the slave device B can parse the beacon frame to obtain the indication information. If the indication information indicates that the data frame is not allowed to be sent within the discovery window, the slave device B can perform the following steps S201b and S202.
  • the slave device B determines that it is not allowed to send the data frame within the discovery window.
  • the slave device B sends the data frame after the discovery window ends.
  • the embodiment of the present application also provides a data transmission method, in which the first electronic device judges whether the first condition is satisfied according to a certain strategy.
  • the data transmission method is introduced as follows by taking the first condition that the number of devices in the cluster is less than the fifth threshold as an example. As shown in Figure 20, the method includes:
  • the second electronic device sends a fourth frame to the first electronic device.
  • the first electronic device receives the fourth frame from the second electronic device.
  • the fourth frame carries the identifier of the cluster.
  • the first electronic device determines that there is a data frame to be sent within the discovery window.
  • the first electronic device determines the number of devices in the cluster according to one or more fourth frames.
  • the first electronic device may be a master or a slave
  • the second electronic device may be a master or a slave
  • the fourth frame may be a periodic announcement frame of other slave devices in the cluster and a beacon frame of the master device in the cluster.
  • the first electronic device determines the number of devices in the cluster according to the periodic announcement frames from all other slave devices in the cluster and the beacon frame of the master device in the cluster.
  • the fourth frame may be a periodic announcement frame of the slave device in the cluster, and the first electronic device determines the devices in the cluster according to the cluster identification carried in these periodic announcement frames number.
  • the first electronic device determines whether the number of devices in the cluster is smaller than a fifth threshold. If yes, execute step S201c and step S102, if not, execute step S201d and step S202.
  • the first electronic device determines that sending data frames within the discovery window is allowed.
  • the first electronic device sends the data frame within the discovery window.
  • the first electronic device determines that it is not allowed to send data frames within the discovery window.
  • the first electronic device sends the data frame after the discovery window ends.
  • the method includes:
  • the master device sends a beacon frame.
  • the master device carries an identifier of the cluster.
  • the master device broadcasts beacon frames within the discovery window.
  • the slave devices in the cluster receive beacon frames within the discovery window.
  • the cluster includes slave devices A and B as an example for illustration, and the cluster may also include other slave devices, which are not explicitly shown in the figure.
  • both slave devices A and B can receive the beacon frame from the master device.
  • the slave device A sends a cycle announcement frame.
  • the period announcement frame carries the identifier of the cluster.
  • the slave device broadcasts a periodic announcement frame within the discovery window.
  • the master device in the cluster receives the periodic announcement frame within the discovery window.
  • Other slave devices in the cluster receive the periodic announcement frame within the discovery window.
  • slave device A broadcasts a periodic announcement frame (carrying a cluster identifier), and both slave device B and the master device in the cluster can receive the broadcast frame.
  • the slave device B also broadcasts a periodic announcement frame (carrying the cluster identifier), and the slave device A and the master device can receive the periodic announcement frame from the slave device B.
  • the slave device B determines that there is a data frame to be sent within the discovery window.
  • the slave device B determines the number of devices in the cluster according to the received beacon frame and periodic announcement frame.
  • the identity of the cluster where the slave device B is located is 10, and it receives the beacon frame of the master device with the cluster identity 10, and receives the periodic announcement frames of the 9 slave devices with the cluster identity 10, then the slave device B determines The number of devices in the cluster is 11.
  • the slave device B determines whether the number of devices in the cluster is smaller than a fifth threshold. If yes, execute step S201c and step S102, if not, execute step S201d and step S202.
  • the slave device B determines that the data frame is allowed to be sent within the discovery window.
  • the slave device B sends the data frame within the discovery window.
  • the slave device B determines that it is not allowed to send data frames within the discovery window.
  • the slave device B sends the data frame after the discovery window ends.
  • the method includes:
  • the master device sends a beacon frame.
  • the master device carries an identifier of the cluster.
  • the master device broadcasts beacon frames within the discovery window.
  • the slave devices in the cluster receive beacon frames within the discovery window.
  • both slave devices A and B can receive the beacon frame from the master device.
  • the slave device A sends a cycle announcement frame.
  • the period announcement frame carries the identifier of the cluster.
  • the slave device broadcasts a periodic announcement frame within the discovery window.
  • the master device in the cluster receives the periodic announcement frame within the discovery window.
  • Other slave devices in the cluster receive the periodic announcement frame within the discovery window.
  • slave device A broadcasts a periodic announcement frame (carrying a cluster identifier), and both slave device B and the master device in the cluster can receive the broadcast frame.
  • the slave device B sends a periodic declaration frame.
  • the periodic announcement frame carries a cluster identifier.
  • the slave device B broadcasts a periodic announcement frame.
  • the slave device A and the master device can receive the periodic announcement frame from the slave device B.
  • the master device determines that there is a data frame to be sent in the discovery window.
  • the master device determines the number of devices in the cluster according to the received periodic announcement frame.
  • the cluster ID of the master device is 10, and the periodic announcement frames of 10 slave devices with the cluster ID 10 are received, the master device determines that the number of devices in the cluster is 11.
  • the master device judges whether the number of devices in the cluster is smaller than a fifth threshold. If yes, execute step S201c and step S102, if not, execute step S201d and step S202.
  • the master device determines that it is allowed to send data frames within the discovery window.
  • the master device sends data frames within the discovery window.
  • the master device determines that it is not allowed to send data frames within the discovery window.
  • the master device sends the data frame after the discovery window ends.
  • the slave device may carry its own service priority and/or service type and/or RSSI in its periodic announcement frame (PNF), The master device judges whether the first condition is met according to the service priority and/or service type and/or RSSI, and if the first condition is met, it indicates that the slave device can send data frames within the discovery window.
  • PNF periodic announcement frame
  • the first electronic device may detect the packet loss rate and retransmission rate of the network, and determine whether the first condition is met according to the packet loss rate and retransmission rate.
  • the first electronic device can identify the type of service to which the data frame belongs by means of deep packet inspection (deep packet inspection, DPI), access control list (access control list, ACL), port, etc., and then determine the priority of the service.
  • the embodiment of the present application also provides a data transmission method, which can allow some devices in the cluster to send data frames within the discovery window. As shown in Figure 23, the method includes:
  • the second electronic device determines a device that is allowed to send data frames within a discovery window.
  • the second electronic device is the main device.
  • the second electronic device may also be a slave device.
  • the embodiment of the present application does not limit the role of the second electronic device.
  • the second electronic device may decide which devices are allowed to send data frames in the discovery window.
  • the second electronic device may allow all devices in the cluster to send data frames within the discovery window by default.
  • the second electronic device determines whether the second condition for allowing the first electronic device to send data frames within the discovery window is met, and if so, allows the first electronic device to send data frames within the discovery window.
  • the second condition includes but is not limited to any one or more of the following: the busyness of the channel of the first network where the cluster is located is less than the first threshold, the packet loss rate of the first electronic device is less than the second threshold, the first electronic The retransmission rate of the device is less than the third threshold, the number of devices in the first cluster is less than the fifth threshold, the RSSI of the first electronic device is higher than the sixth threshold, and the service priority of the first electronic device is higher than the fourth threshold.
  • the channel of the first network where the cluster is located may refer to a common channel within the discovery window, and the common channel may be used to transmit management frames between devices.
  • the channel busyness of the first network may refer to the busyness of the public channel.
  • the second electronic device sends the fifth frame to the first electronic device.
  • the first electronic device receives the fifth frame from the second electronic device.
  • the fifth frame is used to indicate devices that are allowed to send data frames within the discovery window.
  • the beacon frame carries one or more attributes (One or More HiD2D Attributes).
  • the one or more attributes include RRM attributes.
  • the indication field of the RRM attribute includes a device number (Device Cnt) field, and the device number field can be used to indicate whether to allow the number of devices sending data frames in the discovery window.
  • the Media Access Control Address (Mac Addr) field can be used to indicate the Mac addresses of devices that are allowed to send data frames during the discovery window.
  • the RRM control field shown in Figure 24 1 bit is used to indicate that data frames are allowed to be sent within the discovery window, and the device number (Device Cnt) field is defaulted or deleted, and is listed after the RRM control field Indicates the Mac addresses of devices that are allowed to send data frames within the discovery window.
  • the first electronic device determines that there is a data frame to be sent within the discovery window.
  • the first electronic device determines that the data frame is allowed to be sent within the discovery window.
  • the first electronic device sends the data frame within the discovery window.
  • the first electronic device After the first electronic device receives the beacon frame shown in Figure 24, it parses the beacon frame, reads the Mac address field, and if the Mac address field indicates its own Mac address, it means that it is allowed to display in the discovery window Send a data frame. Then, the first electronic device may send the data frame in time within the discovery window, so as to improve resource utilization.
  • the first electronic device determines that it is not allowed to send the data frame within the discovery window.
  • the first electronic device After the first electronic device receives the beacon frame shown in Figure 24, it parses the beacon frame, reads the Mac address field, and if the Mac address indicated by the Mac address field does not include its own Mac address, it indicates that its own If it is not allowed to send data frames in the discovery window, the first electronic device needs to execute S202.
  • the first electronic device sends the data frame after the discovery window ends.
  • the data frames sent by the first electronic device within the discovery window meet any one or more of the following conditions: the amount of data is smaller than the seventh threshold, the sending rate is smaller than the eighth threshold, and the number of sending times is smaller than the ninth threshold. In this way, the problem of discovery window congestion caused by the first electronic device sending too much data in the discovery window can be avoided, and the stability of network performance can be maintained.
  • the seventh threshold, the eighth threshold, and the ninth threshold may be preset, for example, the device is preset at the factory, or may be dynamically interacted between devices.
  • the seventh threshold, the eighth threshold, and the ninth threshold can be determined according to the current network conditions. For example, when the number of devices in the cluster is large, the seventh threshold is relatively small; when the number of devices in the cluster is large, the seventh threshold The threshold is correspondingly larger.
  • the data volume, sending rate, and sending times sent by the device in the discovery window can be dynamically adjusted by adjusting the values of each threshold, so that the data amount, sending rate, and sending times match the current network conditions, and obtain higher data transfer performance.
  • the enhanced WLAN transmission function may be automatically enabled. After the enhanced WLAN transmission function is enabled, the electronic device may send data frames within the discovery window. This implementation manner can improve the transmission performance of the WLAN without the user being aware of it.
  • the electronic device presents a prompt interface, so as to prompt that the WLAN transmission enhancement function has been enabled.
  • the mobile phone is searching for screen projection devices, and the mobile phone determines that screen projection is a high-priority service, and automatically enables the WLAN transmission enhancement function.
  • the mobile phone may also display an interface as shown in (2) in FIG. 25 for prompting the user that the enhanced WLAN transmission function has been enabled.
  • the electronic device before enabling the enhanced WLAN transmission function, presents a prompt interface to ask the user whether to enable the enhanced WLAN transmission function.
  • the mobile phone is searching for a screen projection device, and the mobile phone determines that screen projection is a high-priority service, and displays an interface as shown in (2) of FIG. 26 .
  • the interface includes a control 601 for prompting the user whether to enable the WLAN transmission enhancement function.
  • the mobile phone may send data frames within the discovery window.
  • the fields and frames in the embodiments of the present application are exemplary examples, and the used information may also be encapsulated in other fields of other frames when the technical solution is actually implemented.
  • the interfaces in the embodiments of the present application are all examples, and the embodiments of the present application do not limit the specific presentation manner and effects of the interfaces.
  • the foregoing technical solution may be applied in a communication process between devices in a cluster, and may also be applied in a communication process between devices in different clusters, which is not limited in this embodiment of the present application.
  • step S101 there is no limitation on the execution sequence between step S101 and step S302.
  • steps in the method embodiments may be equivalently replaced by other possible steps.
  • some steps in the method embodiments may be optional, and may be deleted in some usage scenarios.
  • other possible steps may be added in the method embodiments.
  • the apparatus may be the above-mentioned electronic device (the first electronic device or the second electronic device).
  • the apparatus may include memory and one or more processors.
  • the memory is coupled to the processor.
  • the memory is used to store computer program code comprising computer instructions.
  • the processor executes the computer instructions, the electronic device can execute various functions or steps performed by the mobile phone in the above method embodiments.
  • FIG. 4 or FIG. 3 For the structure of the electronic device, reference may be made to the electronic device shown in FIG. 4 or FIG. 3 .
  • the core structure of the electronic device may be represented as the structure shown in FIG. 27 , and the core structure may include: a processing module 1301 , an input module 1302 , a storage module 1303 and a communication module 1304 .
  • the processing module 1301 may include at least one of a central processing unit (CPU), an application processor (Application Processor, AP) or a communication processor (Communication Processor, CP).
  • the processing module 1301 may perform operations or data processing related to control and/or communication of at least one of other elements of the user electronic device.
  • the input module 1302 is configured to obtain instructions or data input by the user, and transmit the obtained instructions or data to other modules of the electronic device. For example, the input module may obtain the user's input operation, generate an input signal according to the obtained input operation, and transmit the input signal to the processing module 1301 . If the electronic device is a mobile phone, in the embodiment of the present application, the input module may be used to receive a setting instruction input by a user, and/or perform other steps.
  • the storage module 1303 may include a volatile memory and/or a nonvolatile memory.
  • the storage module is used to store at least one instruction or data related to other modules of the user terminal equipment.
  • the communication module 1304 is configured to support the electronic device to communicate with other electronic devices.
  • the communication module can be connected to a network via wireless communication or wired communication to communicate with other personal terminals or a network server.
  • the wireless communication may employ at least one of cellular communication protocols, such as Long Term Evolution (LTE), Long Term Evolution-Advanced (LTE-A), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Universal Mobile Communications System (UMTS), Wireless Broadband (WiBro), or Global System for Mobile Communications (GSM).
  • Wireless communications may include, for example, short-range communications.
  • the short-range communication may include at least one of wireless fidelity (Wi-Fi), Bluetooth, near field communication (NFC), magnetic stripe transmission (MST), or GNSS.
  • the chip system includes at least one processor 1101 and at least one interface circuit 1102 .
  • the processor 1101 and the interface circuit 1102 may be interconnected through wires.
  • the interface circuit 1102 may be used to receive signals from other devices, such as a memory of the first electronic device 100 .
  • the interface circuit 1102 may be used to send signals to other devices (such as the processor 1101).
  • the interface circuit 1102 can read instructions stored in the memory, and send the instructions to the processor 1101 .
  • the first electronic device When the instructions are executed by the processor 1101, the first electronic device may be made to perform various steps performed by the first electronic device 100 (for example, a mobile phone) in the foregoing embodiments.
  • the chip system may also include other discrete devices, which is not specifically limited in this embodiment of the present application.
  • the embodiment of the present application also provides an apparatus, which is included in the first electronic device or the second electronic device, and has the function of realizing the behavior of the first electronic device or the second electronic device in any method in the above embodiments.
  • This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
  • Hardware or software includes at least one module or unit corresponding to the above functions. For example, a detection module or unit, a determination module or unit, and the like.
  • An embodiment of the present application also provides a computer-readable storage medium, including computer instructions.
  • the computer instructions When the computer instructions are run on the first electronic device or the second electronic device, the first electronic device or the second electronic device executes the above-mentioned embodiment. either method.
  • An embodiment of the present application further provides a computer program product, which, when the computer program product is run on a computer, causes the computer to execute any method in the foregoing embodiments.
  • the above-mentioned electronic devices include corresponding hardware structures and/or software modules for performing each function.
  • the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the example units and algorithm steps described in the embodiments disclosed herein. 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 for each specific application, but such implementation should not be regarded as exceeding the scope of the embodiments of the present invention.
  • the embodiment of the present application may divide the above-mentioned electronic equipment into functional modules according to the above-mentioned method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present invention is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
  • Each functional unit in each embodiment of the embodiment of the present application may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage
  • the medium includes several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) or a processor execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, and other various media capable of storing program codes.

Landscapes

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

Abstract

一种数据传输方法及装置,涉及终端技术领域,可以在邻居感知网络中提升数据传输性能,该方法可以应用于第一电子设备,所述第一电子设备加入到第一集群中,所述第一集群所在的网络为第一网络,该方法包括:确定发现窗口内存在待发送的数据帧,并在发现窗口内发送所述数据帧。

Description

一种数据传输方法及装置
本申请要求于2021年10月12日提交国家知识产权局、申请号为202111187778.4、发明名称为“一种数据传输方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种数据传输方法及装置。
背景技术
由于资费更低,网速更快,使得Wi-Fi上网成为很多用户的上网首选方式。Wi-Fi上网中会使用到Wi-Fi设备,Wi-Fi设备可以是接入点(access point,AP)、站点(station,STA)等包括Wi-Fi芯片的设备。
Wi-Fi网络可包括邻居感知网络(neighbor awareness networking,NAN)。NAN为设备划分了专用于传输控制信息的资源以及专用于传输数据信息的资源,设备可以使用相应资源进行通信。但是,由于现有的资源划分方式中,系统为设备划分的资源固定,导致资源利用率不高,数据传输性能低。
发明内容
本申请提供一种数据传输方法及装置,可以在邻居感知网络中提升数据传输性能。
为了实现上述目的,本申请实施例提供了以下技术方案:
第一方面,提供数据传输方法,应用于第一电子设备或能够实现第一电子设备功能的组件(比如芯片系统),第一电子设备加入到第一集群中,第一集群所在的网络为第一网络,方法包括:确定发现窗口内存在待发送的数据帧,并在发现窗口内发送数据帧。可见,集群内的设备(比如第一电子设备)除了可以在发现窗口内交互管理帧,还可以根据业务需求,在发现窗口内交互数据帧。如此一来,一方面,能够利用发现窗口中闲置的时域资源来传输数据帧,进而能够提升时域资源的利用率,避免空闲时域资源的浪费。另一方面,由于不再局限于发现窗口结束后才能传输数据帧,则数据帧的传输时机可以提前至发现窗口内,如此,能够降低业务的时延。综上,本申请实施例的技术方案,能够综合提高数据传输性能。
在一种可能的设计中,在发现窗口内发送数据帧之前,方法还包括:确定是否满足允许第一电子设备在发现窗口内发送数据帧的第一条件;
在发现窗口内发送数据帧,包括:若满足第一条件,则在发现窗口内发送数据帧。
通过该方案,可以根据第一条件动态调整是否允许在发现窗口发送数据帧,使得能够在适合的条件下允许在发现窗口内发送数据帧。
在一种可能的设计中,在发现窗口内发送数据帧之前,方法还包括:从第二电子设备接收第一指示信息,第一指示信息用于指示允许在发现窗口内发送数据帧;第二电子设备是主设备;
在发现窗口内发送数据帧,包括:根据第一指示信息,在发现窗口内发送数 据帧。
通过该方案,可以由集群中的其他设备(比如第二电子设备)动态指示第一电子设备是否允许第一电子设备在发现窗口发送数据帧,增加了WLAN中数据帧调度的灵活性。
在一种可能的设计中,确定发现窗口内存在待发送的数据帧,包括:检测到在所述发现窗口对应的时间段内,已存在待发送的数据帧,或者,检测到在所述发现窗口对应的时间段内,有新到达的待发送的数据帧。
在一种可能的设计中,在发现窗口内发送所述数据帧之前,所述方法还包括:接收用户输入的第一指令,所述第一指令用于指示开启第一功能,所述第一功能是提升数据传输性能的功能。
在一种可能的设计中,在发现窗口内发送所述数据帧之前,所述方法还包括:检测到处于预设场景,开启第一功能;所述第一功能是提升数据传输性能的功能;
其中,所述预设场景包括如下一个或多个场景的结合:
所述第一电子设备开启了预设应用程序,且待发送的数据帧为所述预设应用程序的数据帧;所述第一电子设备开启了所述预设应用程序的预设功能,且待发送的数据帧为所述预设功能的数据帧。
在一种可能的设计中,在检测所述预设场景之前,所述方法还包括:接收用户输入的第二指令,所述第二指令用于设置所述预设应用。
在一种可能的设计中,第一条件包括如下任一项或多项:第一网络的信道繁忙度小于第一阈值、第一电子设备的丢包率小于第二阈值、第一电子设备的重传率小于第三阈值、第一集群内的设备数目小于第五阈值、第一电子设备的业务优先级高于第四阈值、第一电子设备的接收信号强度指示RSSI高于第六阈值。
其中,第一条件是可以表明发现窗口有闲置时域资源的条件。也就是说,本申请实施例的技术方案中,可以在确定发现窗口有闲置时域资源的情况下,允许电子设备使用发现窗口发送数据帧。如此,既能避免发现窗口拥挤导致的数据帧丢包等技术问题,又能充分利用发现窗口的时域资源,使得数据传输性能有所提升。
在一种可能的设计中,第一电子设备在发现窗口内发送的数据帧满足如下任一项或多项条件:数据量小于第七阈值、发送速率小于第八阈值、发送次数小于第九阈值。
该方式中,可以通过调整各阈值的值,动态调整设备在发现窗口发送的数据量、发送速率、发送次数,使得数据量、发送速率、发送次数与当前的网络状况相匹配,获得更高的数据传输性能。
第二方面,提供一种数据传输方法,应用于第二电子设备或能够实现第二电子设备功能的组件(比如芯片系统),第二电子设备加入到第一集群中,第二电子设备是主设备;第一集群所在的网络为第一网络,方法包括:确定第一指示信息,并向第一电子设备发送第一指示信息,第一指示信息用于指示允许第一电子设备在发现窗口内发送数据帧。
在一种可能的设计中,确定第一指示信息,包括:在满足允许第一电子设备在发现窗口内发送数据帧的第一条件的情况下,确定第一指示信息。
在一种可能的设计中,第一条件包括如下任一项或多项:第一网络的信道繁忙度小于第一阈值、第一电子设备的丢包率小于第二阈值、第一电子设备的重传率小于第三阈值、第一集群内的设备数目小于第五阈值、第一电子设备的业务优先级高于第四阈值、第一电子设备的接收信号强度指示RSSI高于第六阈值。
第三方面,提供一种第一电子设备,第一电子设备加入到第一集群中,第一集群所在的网络为第一网络,设备包括:
处理器,用于确定发现窗口内存在待发送的数据帧;
收发器,用于在发现窗口内发送数据帧。
在一种可能的设计中,处理器,还用于确定是否满足允许第一电子设备在发现窗口内发送数据帧的第一条件;
收发器,用于在发现窗口内发送数据帧,包括:若满足第一条件,则在发现窗口内发送数据帧。
在一种可能的设计中,收发器,还用于从第二电子设备接收第一指示信息,第一指示信息用于指示允许在发现窗口内发送数据帧;第二电子设备是主设备;
收发器,用于在发现窗口内发送数据帧,包括:根据第一指示信息,在发现窗口内发送数据帧。
在一种可能的设计中,所述处理器,用于确定发现窗口内存在待发送的数据帧,包括:检测到在所述发现窗口对应的时间段内,已存在待发送的数据帧,或者,检测到在所述发现窗口对应的时间段内,有新到达的待发送的数据帧。
在一种可能的设计中,所述处理器,还用于接收用户输入的第一指令,所述第一指令用于指示开启第一功能,所述第一功能是提升数据传输性能的功能。
在一种可能的设计中,所述处理器,还用于检测到处于预设场景,开启第一功能;所述第一功能是提升数据传输性能的功能;
其中,所述预设场景包括如下一个或多个场景的结合:
所述第一电子设备开启了预设应用程序,且待发送的数据帧为所述预设应用程序的数据帧;所述第一电子设备开启了所述预设应用程序的预设功能,且待发送的数据帧为所述预设功能的数据帧。
在一种可能的设计中,所述处理器,还用于接收用户输入的第二指令,所述第二指令用于设置所述预设应用。
在一种可能的设计中,第一条件包括如下任一项或多项:第一网络的信道繁忙度小于第一阈值、第一电子设备的丢包率小于第二阈值、第一电子设备的重传率小于第三阈值、第一集群内的设备数目小于第五阈值、第一电子设备的业务优先级高于第四阈值、第一电子设备的接收信号强度指示RSSI高于第六阈值。
在一种可能的设计中,第一电子设备在发现窗口内发送的数据帧满足如下任一项或多项条件:数据量小于第七阈值、发送速率小于第八阈值、发送次数小于第九阈值。
第四方面,提供一种第二电子设备,第二电子设备加入到第一集群中,第二电子设备是主设备;第一集群所在的网络为第一网络,设备包括:
处理器,用于确定第一指示信息;
收发器,用于向第一电子设备发送第一指示信息,第一指示信息用于指示允许第一电子设备在发现窗口内发送数据帧。
在一种可能的设计中,处理器,用于确定第一指示信息,包括:在满足允许第一电子设备在发现窗口内发送数据帧的第一条件的情况下,确定第一指示信息。
在一种可能的设计中,第一条件包括如下任一项或多项:第一网络的信道繁忙度小于第一阈值、第一电子设备的丢包率小于第二阈值、第一电子设备的重传率小于第三阈值、第一集群内的设备数目小于第五阈值、第一电子设备的业务优先级高于第四阈值、第一电子设备的接收信号强度指示RSSI高于第六阈值。
第五方面、提供一种电子设备,包括:处理器、存储器以及Wi-Fi模块,存储器、Wi-Fi模块、与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,以使得电子设备执行如上述任意方面中及其中任一种可能的实现方式中的方法。
第六方面、提供一种装置,该装置包含在电子设备中,该装置具有实现上述方面及可能的实现方式中任一方法中电子设备行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括至少一个与上述功能相对应的模块或单元。例如,通信模块或单元、控制模块或单元等。
第七方面、提供一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如上述方面及其中任一种可能的实现方式中的方法。
第八方面、提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如上述方面中及其中任一种可能的实现方式中的方法。
第九方面、提供一种芯片系统,包括处理器,当处理器执行指令时,处理器执行如上述方面中及其中任一种可能的实现方式中的方法。
第十方面、提供一种数据传输系统,包括上述任意方面任意可能设计中的第一电子设备(或实现第一电子设备功能的芯片系统)以及第二电子设备(或实现第二电子设备功能的芯片系统)。
附图说明
图1为本申请实施例提供的系统的架构示意图;
图2A为本申请实施例提供的调度周期的示意图;
图2B为本申请实施例提供的数据传输方法的示例图;
图3、图4为本申请实施例提供的电子设备的结构示意图;
图5为本申请实施例提供的数据传输方法的示例图;
图6A、图6B、图7为本申请实施例提供的界面的示意图;
图8为本申请实施例提供的数据传输方法的流程图;
图9为本申请实施例提供的数据帧、管理帧的软件、硬件队列的示意图;
图10为本申请实施例提供的数据传输方法的示例图;
图11为本申请实施例提供的帧格式的示意图;
图12为本申请实施例提供的数据传输方法的流程图;
图13为本申请实施例提供的数据传输方法的示例图;
图14-图16为本申请实施例提供的数据传输方法的流程图;
图17-图19为本申请实施例提供的帧格式的示意图;
图20-图23为本申请实施例提供的数据传输方法的流程图;
图24为本申请实施例提供的帧格式的示意图;
图25、图26为本申请实施例提供的界面的示意图;
图27为本申请实施例提供的电子设备中核心结构的示意图;
图28为本申请实施例提供的一种芯片系统的结构示意图。
具体实施方式
如图1所示,为本申请实施例提供的一种通信系统的结构示意图。该通信系统包括电子设备100-电子设备700。在本申请实施例中,电子设备100-电子设备700可以是支持WLAN感知协议(或称NAN协议)的设备。
支持WLAN感知协议的设备可以开启WLAN感知功能。在开启WLAN感知功能后,电子设备可以发现(discover)与其临近的邻居设备,并可以加入到邻居设备所在集群内。如图1所示,电子设备100-电子设备700可以组成集群。作为一种可能的实现方式,同一集群中的各设备共享一组NAN参数。可选的,NAN参数包括但不限于NAN集群标识(ID)。
需要说明的是,集群中的设备可以作为主(master)设备或从(non-master)设备。作为一种可能的实现方式,在该集群中,各设备之间可以通过选举,确定集群中的主设备。可选的,确定主角等级(master ranking level)值最大的设备为主设备。可以理解,对于同一个设备来说,在某些情况下,其可以是主设备,在某些情况下,其可以是从设备,设备在某个集群的角色并非固定不变。并且,可选的,主设备可以是诸如接入点一类的设备,也可以是站点一类的设备。类似的,从设备可以是诸如接入点一类的设备,也可以是站点一类的设备。
可选的,设备的主角等级值,与电量、设备的类型等一个或多个参数有关。
通常,在确定集群中的主设备后,该主设备可执行主设备对应的一系列操作。集群中的从设备,则执行从设备对应的操作。示例性的,主设备对应的操作包括但不限于:发送beacon(信标)帧,并可以在该beacon帧中携带时间同步功能(time synchronization function,TSF)时钟信息。从设备对应的操作包括但不限于:接收到来自主设备的beacon帧后,提取TSF时钟信息,并且根据TSF时钟信息,完成与主设备之间的时间同步。可选的,从设备可以根据TSF时钟信息以及本地估算的延迟(比如从天线端口接收到最后处理的本地延迟),实现与主设备之间的时间同步。当然,从设备同步时间的方式还可以为其他,这里不做限定。
后续,图1所示集群之外的设备可以发现并加入图1所示集群。作为一种可能的实现方式,电子设备800(未在图1中示出)开启WLAN感知功能后,可搜索beacon帧,若电子设备800搜索到来自图1所示集群中主设备(比如电子设备)的beacon帧,则电子设备800可以根据该beacon帧同步到电子设备,如此一来,电子设备800加入了图1所示集群。
在本申请实施例中,诸如图1所示的集群还可以称为一个域(cluster)。其中,该集群中的设备可以包括已经和其他设备建立数据连接的设备,没有和其他设备建立 数据连接的设备。通常,建立数据连接的设备之间,可以交互数据帧和管理帧。未建立数据连接的设备之间,可以交互管理帧,不可以交互数据帧。
可选的,已建立数据连接的设备之间可组成一个岛(NAN协议中称为data cluster)。示例性的,如图1所示集群中,假设电子设备300-700同步到同一个电子设备,则电子设备300-700组成一个集群。其中,集群中的设备100和设备300之间建立了数据连接,则称设备100和设备300组成一个岛(后续,其他设备也可以加入该岛)。设备400和设备500建立数据连接,设备400和设备600建立数据连接,则设备400、设备500以及设备600可组成一个岛。设备700、设备200没有与其他设备之间建立数据连接,设备700、200并未在岛中。
通常,在时域上,同一集群内的设备根据相同的调度周期以及相同的发现窗口进行调度。其中,如图2A所示,一个调度周期通常包含一个发现窗口(discovery window,DW),不同调度周期的发现窗口之间存在间隔GAP,GAP可用来传输数据,可称为业务时隙或工作时隙。在一些方案中,集群内的设备可以在调度周期的发现窗口内交互管理帧(数据帧之外的帧统称管理帧),在调度周期的发现窗口之外交互数据帧。也就是说,发现窗口通常用来交互数据帧之外的管理帧,管理帧包括但不限于如下任一种或多种帧:beacon帧、周期宣告帧(period notification frame,PNF)。
作为一种可能的实现方式,主设备可以广播窗口参数。窗口参数包括发现窗口长度、调度周期、业务时隙长度中的任意两者。集群内的其他设备与主设备同步之后,按照窗口参数周期地切换到发现窗口交互管理帧。可选的,在调度周期的发现窗口内,集群内的设备可以在相同的信道上交互管理帧。在调度周期的发现窗口外,同一岛内的设备可以在相同信道上交互数据帧,不同岛的设备可以在不同信道上交互数据帧。示例性的,如图2B示出了图1所示集群中各设备的管理帧的时域位置和频域位置。其中,图1所示集群中的各设备均可以在调度周期内的发现窗口,在相同的公共信道36上传输管理帧。图2B还示出了图1所示集群中部分设备的数据帧的时域位置和频域位置。图2B是以图1所示岛1中的设备100和设备300使用信道40交互数据帧,图1所示岛2中的设备400、500、600使用信道149交互数据帧为例进行说明。
在一些方案中,集群内设备之间交互的数据帧和管理帧的时域位置和/或频域位置还可以为其他,并不局限于上述所列方式。比如,对于不同岛的设备,可以使用相同的信道交互数据帧。示例性的,岛1使用channel10交互数据帧,岛2也使用channel10交互数据帧。
上述方案中,数据帧的最快发送时机是本调度周期的非发现窗口内,仍以图2B为例,对于集群内设备来说,数据帧的最快发送时机是第一个调度周期的发现窗口结束时,即t1时刻。这样一来,有可能导致业务延迟,对于时延要较高的业务来说,业务迟延将严重影响WLAN性能,进而降低用户体验。
为了提升终端的WLAN性能,本申请实施例中,集群内的设备除了可以在发现窗口内交互管理帧,还可以根据业务需求,在发现窗口内交互数据帧。如此一来,一方面,能够利用发现窗口中闲置的时域资源来传输数据帧,进而能够提升时域资源的利用率,避免WLAN空闲时域资源的浪费。另一方面,由于不再局限于发现窗口结束后才能传输数据帧,则数据帧的传输时机可以提前至发现窗口内,如此,能够降低业务 的时延。综上,本申请实施例的技术方案,能够综合提高WLAN的传输性能。
示例性的,本申请中的电子设备可以为手机、平板电脑、个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、智能手表、上网本、可穿戴电子设备、增强现实技术(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、车载设备、智能汽车、智能音响、机器人等,本申请对该电子设备的具体形式不做特殊限制。
本申请的说明书以及附图中的术语“第一”和“第二”等是用于区别不同的对象,或者用于区别对同一对象的不同处理。“第一”、“第二”等字样可以对功能和作用基本相同的相同项或相似项进行区分。例如,第一设备和第二设备仅仅是为了区分不同的设备,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
“至少一个”是指一个或者多个,
“多个”是指两个或两个以上。
“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
此外,本申请的描述中所提到的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括其他没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请的说明书以及附图中“的(英文:of)”,相应的“(英文corresponding,relevant)”和“对应的(英文:corresponding)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。
本申请描述的系统架构及业务场景是为了更加清楚的说明本申请的技术方案,并不构成对于本申请提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本申请提供的技术方案对于类似的技术问题,同样适用。
以电子设备是手机为例,图3示出了电子设备的结构示意图。电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192, 摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器(可以检测环境光线亮度),骨传导传感器等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理模块,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理模块可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器,使处理器110与触摸传感器通过I2C总线接口通信,实现电子设备的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳 机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备充电,也可以用于电子设备与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他终端,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结 合使用。
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备上的包括WLAN(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在本申请的一些实施例中,处理器110用于确定发现窗口内存在待发送数据帧,并控制发送模块(比如WLAN模块)在发现窗口内发送该待发送数据帧。
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用 于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备可以支持一种或多种视频编解码器。这样,电子设备可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外, 内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。
电子设备可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备可以设置至少一个麦克风170C。在另一些实施例中,电子设备可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动终端平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼 容外部存储卡。电子设备通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备中,不能和电子设备分离。
在另一些实施例中,本申请中的电子设备为还可以为电子设备提供无线上网功能的设备,例如无线路由器、客户前置设备(Customer Premise Equipment,CPE)等。例如,电子设备为路由器时,如图4所示,电子设备可以包括处理器201、存储器203、通信模块202、天线(未在图4中示出)、电源模块(未在图4中示出)等。其中,通信模块包括Wi-Fi模块、用于连接互联网的上网模块等。其中,Wi-Fi模块可用于与诸如手机等电子设备建立Wi-Fi连接。这样,手机可以使用路由器的上网模块,访问互联网。
其他内容请参考3的电子设备中相关结构的描述,这里不再赘述。
以下实施例中所涉及的技术方案均可以在具有上述硬件架构和软件架构的电子设备中实现。
示例性的,如图5所示,示出了本申请实施例的传输方法的一个应用示例。集群内的设备除了可以在业务时隙(即GAP)交互数据帧,还可以在发现窗口内交互数据帧。与图2B所示传输方法相比,图5所示传输方法中,一方面,能够利用发现窗口中闲置的部分时域资源来传输数据帧,进而能够提升WLAN时域资源的利用率。另一方面,数据帧的传输时机可以由发现窗口结束时刻(比如图2B所示t1)提前至发现窗口内(比如图5所示t2),如此,能够降低WLAN业务的时延。可见,本申请实施例的技术方案,能够综合提高WLAN的传输性能。
在本申请的一些实施例中,可以默认电子设备一直开WLAN传输性能增强的功能。WLAN传输性能增强,可以指在WLAN传输过程中,允许在发现窗口内传输数据帧。
或者,在另一些实施例中,电子设备中可以设置开关,用户可以通过该开关手动开启或关闭本申请实施例提供的提升电子设备WLAN传输性能的功能。例如,如图6A的(1)和图6A的(2)所示,可以在“设置”应用501的设置页面中设置有开关控件501,用于用户开启或关闭本申请实施例提供的WLAN传输增强功能(即提升数据传输性能的第一功能)。又例如,如图6B的(1)所示,响应于用户对设置应用501诸如点击操作,电子设备显示如图6B的(2)所示的设置界面,响应于用户在设置界面对WLAN开关503的诸如点击操作,电子设备显示如图6B的(3)所示的WLAN设置界面,该WLAN设置界面包括开关504,可用于开启或关闭本申请实施例的提升WLAN传输性能的功能。在接收用户的打开开关504的指令(第一指令)之后,可开启WLAN传输增强功能,
又比如,在一些实施例中,可以在不同应用的设置界面开启WLAN传输性能增强功能,比如,在华为视频应用的设置界面设置开启。
示例性的,以通过畅连通话进行视频通话业务为例,在已打开如图6B的(3)所示开关504的情况下,手机进行畅连通话时,在发现窗口内、发现窗口外均可向通话对端发送数据帧,比如在发现窗口内、发现窗口外均向通话对端发送视频图像的数据帧、音频数据帧,以便提高资源利用率。
再示例性的,在已打开如图6B的(3)所示开关504的情况下,手机进行畅连通 话过程中,若满足第一条件,则允许在发现窗口内发送数据帧。第一条件的详细介绍可参见下述实施例。
或者,在另一些实施例中,电子设备在检测到满足预设场景的情况下,开启WLAN传输增强功能,即采用本申请实施例提供的方法,允许在发现窗口内发送数据帧,以便提升电子设备的WLAN传输性能。预设场景可以包括但不限于如下单个条件或多个条件的结合:电子设备开启了预设应用程序;待发送数据帧为该预设应用程序的数据帧;电子设备开启了预设应用程序的预设功能;待发送数据帧是该预设功能的数据帧。
可选的,预设应用程序为低时延业务的应用,例如即时通信类应用程序、游戏应用。预设应用程序可以由电子设备设置,或由用户设置。比如,电子设备默认将某些业务类型的应用程序的WLAN传输增强功能开启。
如此一来,在检测到打开预设应用(比如视频直播软件)后,可以通过在发现窗口内及时发送该预设应用的数据帧,无需等待发现窗口结束再发送数据帧,能够保证业务的低时延,避免由于等待发现窗口结束导致的时域资源的浪费。
可选的,预设应用的预设功能包括但不限于低时延业务的功能。低时延业务的功能包括但不限于语音通话功能、视频通话功能、投屏等功能。
在本申请实施例中,第一电子设备在检测到预设场景后,可以自动开启WLAN传输性能增强功能,或提示用户开启。对于开启WLAN传输增强功能的应用程序来说,可以使用本申请实施例提供的WLAN中传输数据的方法提升该应用程序传输(比如发送和/或接收)数据帧过程中的传输性能。
示例性的,参见图7的(3)所示,用户可以通过诸如点击控件601的操作,触发手机弹出控件603。该控件可用来选择开启目标应用时,如何设置对应的WLAN传输增强功能。其中,若用户选择“开启目标应用时,自动使用WLAN传输增强功能”,则后续在手机检测到目标应用被启动后,可以使用本申请实施例的技术方案,即,若该目标应用有待发送数据帧,则可以允许在发现窗口内发送该数据帧。
可选的,电子设备还可以提供设置目标应用(或称预设应用)的入口。仍以图7的(3)为例,手机可显示控件602,若检测到用户的诸如点击控件602的操作,则手机可跳转到图7的(4)所示界面604。通过界面604,用户可接收用户输入的第二指令,设置目标应用。后续,目标应用的数据帧可在发现窗口内发送,能够降低目标应用的业务延迟。
需要说明的是,电子设备提供给用户的用于设置开启WLAN传输增强功能的应用的上述设置入口,仅是举例,设置入口(包括但不限于通过界面设置)还可以是其他。
在另一些实施例中,还可以是第一电子设备在检测到用于开启Wi-Fi功能的操作(比如打开Wi-Fi开关)后,自动开启或提示用户开启提升WLAN传输性能的功能。
本申请实施例对具体如何开启提升WLAN传输性能的功能,不做限定。
可选的,为了提升集群内不同设备之间的数据传输性能,可通过上述任意方式开启集群中多个设备的WLAN传输增强功能。比如,集群内的主设备、从设备均开启上述WLAN传输增强功能。
实施例一
如下对本申请实施例提供的WLAN中传输数据的方法进行详细介绍,如图8所示, 该方法可以包括如下步骤:
S101、第一电子设备确定发现窗口内存在待发送数据帧。
其中,第一电子设备可以是第一集群中的主设备或从设备,这里不做限制。第一集群所在的网络为第一网络。
作为一种可能的实现方式,第一电子设备可以将上层应用程序产生的数据,存储在诸如队列等存储区域中,并在需要发送时,从队列中取出相应数据并发送。以队列为存储帧的区域为例,可选的,本申请实施例中,数据帧和管理帧可以存储在不同队列。可选的,队列可包括软件队列和硬件队列。示例性的,如图9示出了本申请实施例所使用的队列的示例。其中,第一电子设备可以将上层应用程序产生的数据帧存储到数据帧的硬件队列,在一些示例中,当硬件队列已填满数据帧,则第一电子设备将上层应用程序产生的数据帧存储到数据帧的软件队列。在一些示例中,当数据帧的软件队列也被填满,后续产生的数据帧将可能被丢弃。类似的,第一电子设备也可以将待发送的管理帧存储在管理帧对应的队列中。管理帧对应的队列也可以划分为软件队列和硬件队列,管理帧的软件队列和硬件队列的工作原理可参考数据帧的软件队列和硬件队列。
需要说明的是,发现窗口内存在待发送数据帧,可以指发现窗口对应的时间段内,数据帧队列中已存在待发送数据帧,或者,在发现窗口对应的时间段内,有新到达数据帧队列的待发送数据帧。此种情况下,第一电子设备可以执行步骤S102,即在发现窗口内发送待发送数据帧,以便提示资源利用率以及降低业务时延。
S102、第一电子设备在发现窗口内发送该待发送数据帧。
示例性的,如图10的(2)示出了本申请实施例中队列调度与发现窗口之间的关系。其中,图10中的帧1、帧2、帧3指的是数据帧。可以看出,在发现窗口内,数据帧队列的调度处理并未暂停。可选的,切换到发现窗口时不暂停数据帧的软件队列和硬件队列的调度处理。也就是说,软件队列或硬件队列中有需要发送的数据帧时,可以直接在发现窗口内调度发送该待发送数据帧。而图10的(1)所示方案(现有技术方案)中,在发现窗口内,数据帧队列被暂停调度处理,在发现窗口结束后,才恢复数据帧队列的调度处理,使得不能及时在发现窗口内发送数据帧,导致业务的时延,且浪费了发现窗口内的闲置资源。可见,相比于现有技术,本申请实施例的数据传输方法,通过允许在发现窗口中发送数据帧,不仅能够尽可能降低业务时延,还能够提升资源利用率,进而获得更高的WLAN性能。
此外,与现有技术中在发现窗口暂停队列调度处理,极大概率可能导致队列溢出,数据帧被丢弃相比,本申请实施例中,由于并未暂停数据帧的调度处理,也可以视为数据帧的调度处理没有被中断,因此,能够及时将待发送数据帧从队列中取出并发送,为队列提供更多的存储区域,进而能够降低队列溢出的概率,降低因队列溢出导致的数据帧丢弃。
示例性的,以图1中的设备200为主设备,且第一电子设备为设备200为例,若设备200确定当前的数据帧队列中有待发送的数据帧,且当前处于发现窗口内,则可以在该发现窗口及时发送该数据帧,如此,能够提升资源利用率以及降低业务时延。而现有技术中,若设备200确定当前的数据帧队列中有待发送的数据帧,且当前处于 发现窗口内,则设备200需等待该发现窗口结束后才能发送该数据帧,资源利用率较低,业务时延较大。
再示例性的,以图1中的设备100为从设备,且第一电子设备为设备100为例,若设备100确定当前的数据帧队列中有待发送的数据帧,且当前处于发现窗口(比如图10的(2)所示的发现窗口1内,则可以在该发现窗口发送待发送数据帧。若设备100确定当前的数据帧队列中有待发送的数据帧,且当前处于发现窗口之外(比如图10的(2)所示GAP1),则可以在该GAP1内发送待发送数据帧。也就是说,设备在确定数据帧队列中存在待发送数据帧的情况下,可根据预设策略直接发送待发送数据帧,无需根据当前是否处于发现窗口内判断是否允许发送数据帧。
可选的,可以通过Wi-Fi MAC帧格式中的2bit Type字段区分数据帧和管理帧。可选的,10表示数据帧(Data frame)、00表示Management frame、01表示Control frame、11表示Extension frame(扩展帧)。Management frame、Control frame、Extension frame可统称为管理帧。图11示例性的示出了一种MAC帧格式。其中,加粗方框中的类型字段可用来区分数据帧和管理帧。可以理解,这里仅是用于区分数据帧和管理帧的一种举例方式,在实际实现时,还可以利用其他帧格式的其他任意比特的字段,限于篇幅,本申请实施例不再穷举所有可能情况。
实施例二
本申请实施例还提供一种数据传输方法,图12示出了实施例二的示例性流程。如图12所示,在实施例一的步骤S102之前,可以执行步骤S201、判断是否允许在发现窗口发送数据帧,若允许在发现窗口内发送数据帧,则第一电子设备执行步骤S102,若不允许(禁止)在发现窗口内发送数据帧,则第一电子设备执行步骤S202、在发现窗口结束后发送数据帧。
可选的,第一电子设备判断是否允许在发现窗口内发送数据帧,可以实现为:第一电子设备判断是否满足允许第一电子设备在发现窗口内发送数据帧的第一条件,若满足第一条件,则允许在发现窗口内发送数据帧,若不满足第一条件,则不允许在发现窗口内发送数据帧。或者,第一电子设备判断是否允许在发现窗口内发送数据帧,可以实现为:由其他电子设备(比如集群内的第二电子设备)判断是否允许第一电子设备在发现窗口内发送数据帧,若允许,则该第二电子设备通知第一电子设备允许在发现窗口内发送数据帧(第一指示信息),若不允许,则该第二电子设备通知第一电子设备不允许在发现窗口内发送数据帧。
可选的,第二电子设备判断是否允许第一电子设备在发现窗口内发送数据帧,可以实现为:第二电子设备判断是否满足第一条件,若满足第一条件,则该第二电子设备通知第一电子设备允许在发现窗口内发送数据帧,若不满足第一条件,则该第二电子设备通知第一电子设备不允许在发现窗口内发送数据帧。
可选的,第一条件包括如下任一项或多项条件的组合:发现窗口的信道繁忙度小于第一阈值,集群所在网络的丢包率小于第二阈值,集群所在网络的重传率小于第三阈值,集群内的设备数目小于第五阈值,接收信号强度指示(received signal strength indication,RSSI)高于第六阈值,待发送数据帧的业务优先级高于第四阈值。
可选的,上述各阈值可以是预先设置的,比如出厂设置好的,也可以是后续通信 过程中设置的。本申请实施例不限制阈值的设置方式以及阈值的具体数值。
通常,集群内的设备数目较少时,设备之间在发现窗口内交互的管理帧也较少,这些管理帧可能仅占用发现窗口的一小部分时域资源,此种情况下,发现窗口中很可能存在大量闲置时域资源。本申请实施例中,若第一电子设备确定有待发送的数据帧,且集群内的设备数目小于第五阈值,则可以通过发现窗口的空闲时域资源发送数据帧。比如,基于Wi-Fi的载波侦听机制,在侦听到信道空闲时,在发现窗口内发送数据帧。如此一来,可以提升发现窗口内时域资源的利用率,避免空口资源浪费,并且,通过在发现窗口内及时发送数据帧,能够降低数据帧的时延,进而降低业务时延。
反之,若第一电子设备确定有待发送的数据帧,且集群内的设备数目大于或等于第五阈值(说明空口竞争强),则不允许在发现窗口内发送数据帧,也就是,需要在当前发现窗口结束后发送该待发送数据帧。如此一来,可避免空口竞争导致的管理帧丢失。
在一些场景中,网络的丢包率较小,说明网络状况较好,在发现窗口内,设备之间的竞争程度较小。此种情况下,发现窗口中很可能存在较多闲置的时域资源。考虑到该情况,本申请实施例中,若第一电子设备确定网络的丢包率小于第二阈值,则允许在发现窗口内发送数据帧,以便高效利用闲置的时域资源。反之,若第一电子设备确定网络的丢包率大于或等于第二阈值,则不允许在发现窗口内发送数据帧,以避免过多设备竞争发现窗口的资源。
在一些场景中,待发送数据帧的业务优先级较高的情况下,往往需要优先发送该待发送数据帧,以满足业务指标需求。可选的,优先级高的业务,可以包括但不限于是低时延业务。示例性的,低时延业务包括但不限于如下任一项或多项:游戏、网课、即时通信、直播、抢红包、投屏、物联网业务、工业物联网业务。
本申请实施例中,若第一电子设备确定有待发送数据帧,且待发送数据帧的业务优先级高于(大于)第四阈值,则允许第一电子设备在发现窗口内发送该待发送数据帧,以尽可能满足业务需求。反之,若第一电子设备确定有待发送数据帧,且待发送数据帧的业务优先级小于或等于第四阈值,则不允许第一电子设备在发现窗口内发送该待发送数据帧。
在一些场景中,设备的接收信号强度指示(received signal strength indication,RSSI)表征信号强度较强,说明网络状况较好,这种情况下,在发现窗口内,设备之间的竞争程度往往较小,发现窗口中很可能存在较多闲置的时域资源。考虑到该情况,本申请实施例中,若第一电子设备确定存在待发送数据帧,且检测到RSSI高于第六阈值,则允许在发现窗口内发送该待发送数据帧。反之,若第一电子设备确定存在待发送数据帧,且检测到RSSI小于或等于第六阈值,则不允许在发现窗口内发送该待发送数据帧。
可选的,第一电子设备或集群内其他设备可按周期或其他策略统计上述第一条件中各参数的值,第一电子设备可根据统计值确定是否允许在发现窗口内发送数据帧。
以统计丢包率为例,第一电子设备可检测发现窗口的前一段时间内网络的丢包率,比如发现窗口的前半个窗口内网络的丢包率,若前半个发现窗口内的丢包率小于阈值,则可推测后半个发现窗口内的丢包率也较小,那么,第一电子设备允许在后半个发现 窗口内发送数据帧。反之,若前半个发现窗口内的丢包率大于或等于阈值,则不允许在后半个发现窗口内发送数据帧。
或者,第一电子设备通过判断前N(N为正整数)个调度周期的发现窗口内的丢包率,来确定在当前调度周期的发现窗口内是否发送数据帧。比如,前一个调度周期的发现窗口内的丢包率小于阈值,则可推测后当前发现窗口内的丢包率也较小,那么,第一电子设备允许在当前发现窗口内发送数据帧。反之,若上个发现窗口内的丢包率大于或等于阈值,则不允许在当前发现窗口内发送数据帧。
或者,第一电子设备基于其他方式确定发现窗口网络的丢包率。本申请实施例不限制确定发现窗口内丢包率的具体实现方式。
示例性的,手机确定在发现窗口内存在待发送数据帧(需要在发现窗口内发送的数据帧),并且,手机所在集群网络当前的丢包率较小,那么,手机可以在发现窗口内发送数据帧。
再示例性的,手机确定在发现窗口内存在待发送数据帧(需要在发现窗口内发送的数据帧),并且,手机所在集群网络当前的重传率较小,那么,手机可以在发现窗口内发送数据帧。
再示例性的,手机确定在发现窗口内存在待发送数据帧,并且,该数据帧的业务优先级较高(比如为抢红包业务),那么,手机可以在发现窗口内发送数据帧。
再示例性的,手机确定在发现窗口内存在待发送数据帧,并且,手机所在集群网络当前的RSSI较大,那么,手机可以在发现窗口内发送数据帧。
再示例性的,手机确定在发现窗口内存在待发送数据帧,并且,该数据帧的业务优先级较高(比如为抢红包业务),集群内当前的设备数目较少,那么,手机可以在发现窗口内发送数据帧。
再示例性的,若畅连通话应用开启了本申请实施的WLAN传输增强功能,那么,后续在集群内的设备数较少时,畅连通话的数据可在发现窗口内发送。
再示例性的,若畅连通话应用开启了本申请实施的WLAN传输增强功能,且假设语音通话为高优先级业务,那么,后续用户在通过畅连通话应用进行语音通话时,电子设备可以在发现窗口内发送语音数据。
可以理解,除了上述列举的几种条件之外,第一条件还可以是其他任何可以表明发现窗口有闲置时域资源的条件。本申请实施例并不限制第一条件的具体内容。
示例性的,如图13所示,在发现窗口1期间,数据帧队列中存在待发送的数据帧1、2、3,此时,若满足第一条件(比如集群内的设备数目较少),则第一电子设备可以在发现窗口1内及时调度发送数据帧,比如调度发送数据帧1。在发现窗口2期间,数据帧队列中存在待发送的数据帧3、4、5,此时,若不满足第一条件(比如集群内的设备数目较多),则第一电子设备不可以在发现窗口2内调度发送数据帧,需等待发现窗口2结束后才能调度发送数据帧。
与实施例一中默认允许在发现窗口内发送数据帧相比,实施例二的技术方案中,可以根据第一条件动态调整是否允许在发现窗口发送数据帧,使得能够在适合的条件下允许在发现窗口内发送数据帧。
可选的,上述第一条件(用于判断是否允许在发现窗口内发送数据帧的条件)可 以由第一电子设备自行判断,也可以由集群内的其他设备判断第一条件,并将第一条件的判断结果,比如指示是否允许第一电子设备在发现窗口内发送数据帧的指示消息发给第一电子设备,如此,第一电子设备能够确定是否允许在发现窗口内发送数据帧。如下分别这两种判断第一条件的方式。
可选的,第一电子设备,或集群内的其他设备可以按周期或其他策略判断第一条件。示例性的,可以每个调度周期判断一次是否满足第一条件。如图13所示,两个调度周期内,第一个调度周期内,满足第一条件,那么,第一电子设备可以在发现窗口内发送数据帧。第二个调度周期内,不满足第一条件,那么,第一电子设备需等待发现窗口结束才能发送数据帧。当检测周期较短时,可以及时调整不同发现窗口内的调度策略,能够进一步降低业务时延,及时调整资源利用率。
再示例性的,可以每L(L为正整数)个调度周期判断一次是否满足第一条件。本申请实施例并不限制判断第一条件的具体周期以及方式。当检测周期较长时,可以降低检测第一条件的复杂度。
实施例三
本申请实施例还提供一种数据传输方法,由其他设备判断第一条件,并将第一条件的判断结果,比如指示是否允许第一电子设备在发现窗口内发送数据帧的指示消息发给第一电子设备。如图14所示,该方法包括:
S301、第二电子设备确定是否满足第一条件。若满足第一条件,则执行步骤S302,若不满足第一条件,则执行S303。
其中,第一条件的具体介绍可参见上述实施例。
S302、第二电子设备向第一电子设备发送第一指示信息。
作为一种可能的实现方式,第二电子设备在发现窗口内广播第一指示信息。相应的,第一电子设备在发现窗口内接收第一指示信息。
其中,该第一指示信息用于指示允许第一电子设备在发现窗口内发送数据帧。
S303、第二电子设备向第一电子设备发送第四指示信息。
作为一种可能的实现方式,第二电子设备在发现窗口内广播第四指示信息。相应的,第一电子设备在发现窗口内接收第四指示信息。
其中,该第四指示信息用于指示不允许在发送窗口内发送数据帧。
S101、第一电子设备确定发现窗口内存在待发送的数据帧。
在本申请实施例中,第一电子设备从第二电子设备接收指示信息后,可根据指示信息确定是否允许在发现窗口内发送数据帧,并根据指示信息发送数据帧。在一些情况下,指示信息指示允许在发现窗口内发送数据帧,则第一电子设备执行如下步骤S201a以及S102。在另一些情况下,指示信息指示允许在发现窗口内发送数据帧,则第一电子设备执行如下步骤S201b以及S202。
S201a、第一电子设备根据第一指示信息,确定允许在发现窗口内发送数据帧。
其中,步骤S201a可视为上述步骤S201的一个分支。
S102、第一电子设备在发现窗口内发送数据帧。
S201b、第一电子设备根据第四指示信息,确定不允许在发现窗口内发送数据帧。
其中,步骤S201b可视为上述步骤S201的另一分支。
S202、第一电子设备在发现窗口结束后发送数据帧。
可以理解,在确定不允许在发现窗口内发送数据帧的情况下,第一电子设备需等待发现窗口结束才能发送数据帧。
在另一些实施例中,第一电子设备还可以确定是否允许第二电子设备在发现窗口内发送数据帧。若是,则向第二电子设备发送第二指示信息,用于指示允许第二电子设备在发现窗口内发送数据帧,若否,则向第二电子设备发送第三指示信息,用于指示不允许第二电子设备在发现窗口内发送数据帧。
在另一些实施例中,第一电子设备还可以确定是否满足允许第二电子设备在发现窗口内发送数据帧的第二条件;若满足第二条件,则向第二电子设备发送第二指示信息,第二指示信息用于指示允许在发现窗口内发送数据帧;若不满足第二条件,则向第二电子设备发送第三指示信息,第三指示信息用于指示不允许在发现窗口内发送数据帧。
可选的,第二条件包括如下任一项或多项:第一网络的信道繁忙度小于第一阈值、第二电子设备的丢包率小于第二阈值、第二电子设备的重传率小于第三阈值、第一集群内的设备数目小于第五阈值、第二电子设备的业务优先级高于第四阈值、第二电子设备的RSSI高于第六阈值。
示例性的,图15示出了第一条件为集群内的设备数目小于第五阈值的情况下,本申请实施例的数据传输方法的交互流程。其中,图14的步骤S301可实现为图15中的S301a-S301c。如图15,该方法包括:
S301a、第一电子设备向第二电子设备发送第一帧。
相应的,第二电子设备从第一电子设备接收第一帧。可选的,第一帧携带第一电子设备所在集群的标识。
S301b、第二电子设备根据一个或多个第一帧,确定所在集群内的设备数目。
可以理解,第二电子设备可以从集群内除自身外所有其他设备接收第一帧,并可以根据这些第一帧中的集群标识,确定集群内的设备数目。示例性的,第二电子设备所在集群的标识是10,且接收到来自10个设备的第一帧,这些第一帧指示这10个设备均在标识10的集群中,则第二电子设备可确定集群内的设备数目为11(包括第二电子设备自身)。
需要说明的是,第二电子设备可以是主设备或从设备,第一电子设备也可以是主设备或从设备。
示例性的,若第二电子设备是主设备,第一电子设备是从设备,则第一帧可以但不限于是周期宣告帧,第二帧可以但不限于是信标帧,第三帧可以但不限于是信标帧。第二电子设备可以从集群内除自身外所有其他设备接收周期宣告帧,并可以根据这些周期宣告帧中的集群标识,确定集群内的设备数目。
示例性的,若第二电子设备是从设备,那么,第一电子设备可以是集群内的其他从设备以及主设备,则第一帧可以但不限于是周期宣告帧、信标帧,第二帧可以但不限于是周期宣告帧,第三帧可以但不限于是周期宣告帧。第二电子设备可以从集群内除自身外所有其他从设备接收周期宣告帧,从主设备接收信标帧,并可以根据周期宣告帧以及信标帧中的集群标识,确定集群内的设备数目。
S301c、第二电子设备判断集群内的设备数目是否小于第五阈值。若是,则执行步骤S302a。若否,则执行步骤S303a。
S302a、第二电子设备发送第二帧。
其中,第二帧用于指示允许在发现窗口内发送数据帧。
可以理解,在集群内的设备数目较少时,设备使用的资源通常较少,资源闲置概率较高。为了提高资源利用率,可以允许集群内的设备在发现窗口内发送数据帧。
作为一种可能的实现方式,第二电子设备在发现窗口广播第二帧。相应的,集群内的其他设备(比如图15所示第一电子设备)在发现窗口接收第二帧。
S101、第一电子设备确定发现窗口内存在待发送的数据帧。
S201a、第一电子设备根据第二帧,确定允许在发现窗口内发送数据帧。
可以理解,第一电子设备从第二电子设备接收第二帧后,可以根据第二帧的指示确定允许在发现窗口内发送数据帧,并可以执行如下步骤S102。
S102、第一电子设备在发现窗口内发送数据帧。
S303a、第二电子设备发送第三帧。
其中,第三帧用于指示不允许在发现窗口内发送数据帧。
作为一种可能的实现方式,第二电子设备在发现窗口内广播第三帧。相应的,集群内的其他设备(比如第一电子设备)可以在发现窗口内接收第三帧。
S201b、第一电子设备根据第三帧,确定不允许在发现窗口内发送数据帧。
S202、第一电子设备在发现窗口结束后发送数据帧。
图15仅示出了确定集群内的设备数目的一种可能的实现方式,还可以采用其他方式确定集群内的设备数目,本申请实施例限于篇幅,不再穷举所有实现方式。
如下以第二电子设备为主设备,第一电子设备为从设备为例,对图15对应的方法进行举例说明。如图16所示,该方法包括:
S401、主设备发送信标帧。
需要说明的是,图16中仅示例性示出了集群中的两个从设备,即从设备A、B。集群中还可以包括其他从设备,未在图16中示出。
可选的,主设备在发现窗口广播信标帧。相应的,集群中的从设备在发现窗口接收信标帧。示例性的,图16中,从设备A、B均可接收来自主设备的信标帧。
可选的,信标帧携带主设备选举属性,选举属性包含集群的标识(ID)。该信标帧可用来指示主设备所在集群。可选的,集群ID可以但不限于是集群中主设备的基本服务集的标识(basic service set identifier,BSSID)。
示例性的,图17示例性示出了信标帧的一种可能的帧格式。其中,信标帧包括一个或多个自定义属性(One or More HiD2D Attributes)字段。一个或多个属性包括选举属性。选举属性中携带主设备的BSSID(master BSSID)。
S301a1、从设备B发送周期宣告帧(第一帧的一种示例)。
可选的,从设备B在发现窗口广播周期宣告帧。相应的,主设备在发现窗口内接收来自从设备B的周期宣告帧。集群内的其他从设备在发现窗口接收该从设备B的周期宣告帧。示例性的,从设备A接收来自从设备B的周期宣告帧。
可选的,从设备发送的周期宣告帧携带主设备选举属性,选举属性包含集群的ID。 该周期宣告帧可用来指示该设备所在集群。可选的,集群的ID可以但不限于是集群中主设备的BSSID。
示例性的,图18示例性示出了周期宣告帧的一种可能的帧格式,以及示出了选举属性的一种可能的格式。
需要说明的是,本申请实施例中,提及某个消息或字段用来指示某个含义,并非指该消息或字段是专用于指示该含义的消息或字段。该消息或字段还可以有其他用途。
S301a2、从设备A发送周期宣告帧。
S301b1、主设备根据一个或多个周期宣告帧,确定所在集群内的设备数目。
作为一种可能的实现方式,主设备匹配周期宣告帧中的集群ID,获取本集群
内的设备数。
示例性的,主设备的集群ID(比如BSSID)是11,从设备A的集群ID是11,从设备B的集群ID是11,那么,主设备确定从设备A、B均是本集群内的设备,本集群内的设备数目为2(未包括主设备)或3(包括主设备)。
S301c、主设备判断集群内的设备数目是否小于第五阈值。若是,则执行步骤S302a1,若否,则执行步骤S303a1。
S302a1、主设备发送信标帧(第二帧的一种示例)。
作为一种可能的实现方式,主设备在发现窗口内广播信标帧。相应的,从设备在发现窗口内从主设备接收信标帧。示例性的,图16中,从设备A、B均可接收来自主设备的信标帧。
其中,该信标帧携带指示信息。指示信息用于指示允许在发现窗口内发送数据帧。
示例性的,如图19,信标帧携带一个或多个属性(One or More HiD2D Attributes)字段,其中,一个或多个属性包括无线资源管理(radio resource management,RRM)属性,RRM属性携带RRM控制(control)字段,RRM控制字段用于指示是否允许在发现窗口发送数据帧。可选的,指示信息可以是RRM控制字段的字段值。
示例性的,在一些示例中,如图19所示,RRM控制(control)字段占1字节(8个比特),指示信息可以用RRM控制(control)字段中的1比特来表示。比如,如表1所示,RRM控制(control)字段的第二个比特可用来表示指示信息。在一些示例中,若RRM控制(control)字段的第二个比特是1,表示允许在发现窗口内发送数据帧,若RRM控制字段的第二个比特是0,表示不允许在发现窗口内发送数据帧。或者,若RRM控制字段的第二个比特是0,表示允许在发现窗口内发送数据帧,若RRM控制字段的第二个比特是1,表示不允许在发现窗口内发送数据帧。
表1 信标帧中的RRM控制字段
Figure PCTCN2022121905-appb-000001
可以理解,还可以通过RRM控制字段的第三-第八个比特中的任意比特表示指示 信息,本申请实施例并不限制指示信息的具体实现方式。
S101、从设备B确定发现窗口内存在待发送的数据帧。
本申请实施例中,从设备B接收到来自主设备的信标帧之后,可以解析信标帧,得到指示信息,若指示信息指示允许在发现窗口内发送数据帧,则从设备B可以执行如下步骤S201a以及S102。
S201a、从设备B根据信标帧,确定允许在发现窗口内发送数据帧。
作为一种可能的实现方式,从设备B根据信标帧中的指示信息,确定允许在发现窗口内发送数据帧。
S102、从设备B在发现窗口内发送数据帧。
S303a1、主设备发送信标帧(第三帧的一种示例)。
其中,该信标帧携带指示信息。指示信息用于指示不允许在发现窗口内发送数据帧。
作为一种可能的实现方式,主设备在发现窗口内广播信标帧。相应的,各从设备在发现窗口内接收信标帧。
可以理解,从设备B接收到来自主设备的信标帧之后,可以解析信标帧,得到指示信息,若指示信息指示不允许在发现窗口内发送数据帧,则从设备B可以执行如下步骤S201b以及S202。
S201b、从设备B根据信标帧,确定不允许在发现窗口内发送数据帧。
S202、从设备B在发现窗口结束后发送数据帧。
实施例四
本申请实施例还提供一种数据传输方法,由第一电子设备根据一定策略,自行判断是否满足第一条件。如下以第一条件是集群内的设备数目小于第五阈值为例,对该数据传输方法进行介绍。如图20所示,该方法包括:
S501、第二电子设备向第一电子设备发送第四帧。
相应的,第一电子设备从第二电子设备接收第四帧。
可选的,第四帧携带集群的标识。
S101、第一电子设备确定发现窗口内存在待发送的数据帧。
S502、第一电子设备根据一个或多个第四帧,确定所在集群内的设备数目。
第一电子设备可以是主设备或从设备,第二电子设备可以是主设备或从设备。
在一些示例中,若第一电子设备是从设备,则第四帧可以是集群内其他从设备的周期宣告帧,以及集群内主设备的信标帧。第一电子设备根据来自集群内其他全部从设备的周期宣告帧以及集群内主设备的信标帧,确定所在集群内的设备数目。
在另一些示例中,若第一电子设备是主设备,则第四帧可以是集群内从设备的周期宣告帧,第一电子设备根据这些周期宣告帧中携带的集群标识,确定集群内的设备数目。
S503、第一电子设备判断集群内的设备数目是否小于第五阈值。若是,则执行步骤S201c以及步骤S102,若否,则执行步骤S201d以及步骤S202。
S201c、第一电子设备确定允许在发现窗口内发送数据帧。
S102、第一电子设备在发现窗口内发送数据帧。
S201d、第一电子设备确定不允许在发现窗口内发送数据帧。
S202、第一电子设备在发现窗口结束后发送数据帧。
如下以第一电子设备为从设备为例,对图20对应的实施例进行说明。如图21,该方法包括:
S501a、主设备发送信标帧。
可选的,主设备携带集群的标识。
作为一种可能的实现方式,主设备在发现窗口内广播信标帧。相应的,集群内的从设备在发现窗口内接收信标帧。
需要说明的是,图21和下述图22中以集群中包括从设备A、B为例进行说明,集群中还可以包括其他从设备,未在图中明示出。
示例性的,图21中,从设备A、B均可接收来自主设备的信标帧。
S501b、从设备A发送周期宣告帧。
可选的,该周期宣告帧携带集群的标识。
作为一种可能的实现方式,从设备在发现窗口内广播周期宣告帧。相应的,集群内的主设备在发现窗口内接收该周期宣告帧。集群内的其他从设备在发现窗口内接收该周期宣告帧。
示例性的,图21中,从设备A广播周期宣告帧(携带集群标识),集群内的从设备B以及主设备均能接收该广播帧。类似的,从设备B也广播周期宣告帧(携带集群标识),从设备A以及主设备可接收来自从设备B的周期宣告帧。
S101、从设备B确定发现窗口内存在待发送的数据帧。
S502a、从设备B根据接收的信标帧以及周期宣告帧,确定所在集群内的设备数目。
示例性的,从设备B所在集群的标识为10,且其接收到集群标识10的主设备的信标帧,且接收到集群标识10的9个从设备的周期宣告帧,则从设备B确定所在集群内的设备数目为11。
S503、从设备B判断集群内的设备数目是否小于第五阈值。若是,则执行步骤S201c以及步骤S102,若否,则执行步骤S201d以及步骤S202。
S201c、从设备B确定允许在发现窗口内发送数据帧。
S102、从设备B在发现窗口内发送数据帧。
S201d、从设备B确定不允许在发现窗口内发送数据帧。
S202、从设备B在发现窗口结束后发送数据帧。
如下以第一电子设备为主设备为例,对图20对应的实施例进行说明。如图22,该方法包括:
S601、主设备发送信标帧。
可选的,主设备携带集群的标识。
作为一种可能的实现方式,主设备在发现窗口内广播信标帧。相应的,集群内的从设备在发现窗口内接收信标帧。
示例性的,图22中,从设备A、B均可接收来自主设备的信标帧。
S501c、从设备A发送周期宣告帧。
可选的,该周期宣告帧携带集群的标识。
作为一种可能的实现方式,从设备在发现窗口内广播周期宣告帧。相应的,集群内的主设备在发现窗口内接收该周期宣告帧。集群内的其他从设备在发现窗口内接收该周期宣告帧。
示例性的,图22中,从设备A广播周期宣告帧(携带集群标识),集群内的从设备B以及主设备均能接收该广播帧。
S501d、从设备B发送周期宣告帧。
可选的,周期宣告帧携带集群标识。
示例性的,从设备B广播周期宣告帧。从设备A以及主设备可接收来自从设备B的周期宣告帧。
S101、主设备确定发现窗口内存在待发送的数据帧。
S502b、主设备根据接收的周期宣告帧,确定所在集群内的设备数目。
示例性的,主设备所在集群的标识为10,且接收到集群标识10的10个从设备的周期宣告帧,则主设备确定所在集群内的设备数目为11。
S503、主设备判断集群内的设备数目是否小于第五阈值。若是,则执行步骤S201c以及步骤S102,若否,则执行步骤S201d以及步骤S202。
S201c、主设备确定允许在发现窗口内发送数据帧。
S102、主设备在发现窗口内发送数据帧。
S201d、主设备确定不允许在发现窗口内发送数据帧。
S202、主设备在发现窗口结束后发送数据帧。
上述主要以判断集群内的设备数目为例对判断第一条件的方式进行介绍,其他第一条件的判断方式的具体实现可参见现有技术。比如,以第二电子设备为主设备,第一电子设备为从设备为例,从设备可以在自己的周期宣告帧(PNF)中携带自己的业务优先级和/或业务类型和/或RSSI,主设备根据业务优先级和/或业务类型和/或RSSI判断是否满足第一条件,如果满足第一条件,则指示从设备可以在发现窗口内发送数据帧。再比如,第一电子设备可以检测网络的丢包率、重传率,并根据丢包率、重传率判断是否满足第一条件。再比如,第一电子设备可以深度报文检测(deep packet inspection,DPI)、访问控制列表(access control list,ACL)、端口等方式识别数据帧所属业务类型,进而判断业务的优先级。
实施例五
本申请实施例还提供一种数据传输方法,可以允许集群内的部分设备在发现窗口内发送数据帧。如图23所示,该方法包括:
S701、第二电子设备确定允许在发现窗口内发送数据帧的设备。
可选的,第二电子设备是主设备。在另一些实施例中,第二电子设备也可以是从设备。本申请实施例不限制第二电子设备的角色。
可以理解,第二电子设备可以决策允许哪些设备在发现窗口发送数据帧。可选的,第二电子设备可以默认允许集群内的全部设备在发现窗口内发送数据帧。
或者,可选的,第二电子设备确定是否满足允许第一电子设备在发现窗口内发送数据帧的第二条件,若满足,则允许第一电子设备在发现窗口发送数据帧。可选的, 第二条件包括但不限于如下任一项或多项:集群所在第一网络的信道的繁忙度小于第一阈值、第一电子设备的丢包率小于第二阈值、第一电子设备的重传率小于第三阈值、第一集群内的设备数目小于第五阈值、第一电子设备的RSSI高于第六阈值、第一电子设备的业务优先级高于第四阈值。
可选的,集群所在第一网络的信道,可以指发现窗口内的公共信道,该公共信道可用来各设备之间传输管理帧。第一网络的信道繁忙度,可以指该公共信道的繁忙度。
S702、第二电子设备向第一电子设备发送第五帧。
相应的,第一电子设备从第二电子设备接收第五帧。
可选的,第五帧用于指示允许在发现窗口内发送数据帧的设备。
示例性的,以第二电子设备是主设备,第五帧是信标帧为例,如图24,信标帧携带一个或多个属性(One or More HiD2D Attributes)。一个或多个属性包括RRM属性。RRM属性的指示域包括设备数目(Device Cnt)字段,设备数目字段可用于指示是否允许在发现窗口发送数据帧的设备数。媒体访问控制地址(Mac Addr)字段可用于指示允许在发现窗口发送数据帧的设备的Mac地址。
或者,在另一些实施例中,图24所示的RRM控制字段中,用1比特指示允许在发现窗口内发送数据帧,设备数目(Device Cnt)字段缺省或删除,在RRM控制字段后列明允许在发现窗口内发送数据帧的设备的Mac地址。
S101、第一电子设备确定发现窗口内存在待发送的数据帧。
S201e、第一电子设备根据第五帧,确定允许在发现窗口内发送数据帧。
可以理解,若第一电子设备确定允许在发现窗口内发送数据帧,则执行S102。
S102、第一电子设备在发现窗口内发送数据帧。
示例性的,第一电子设备接收到图24所示的信标帧后,解析该信标帧,读取Mac地址字段,若Mac地址字段指示了自身的Mac地址,说明自身被允许在发现窗口发送数据帧。那么,第一电子设备可以在发现窗口内及时发送数据帧,以便提升资源利用率。
S201e、第一电子设备根据第五帧,确定不允许在发现窗口内发送数据帧。
示例性的,第一电子设备接收到图24所示的信标帧后,解析该信标帧,读取Mac地址字段,若Mac地址字段所指示的Mac地址不包括自身的Mac地址,说明自身不被允许在发现窗口发送数据帧,第一电子设备需要执行S202。
S202、第一电子设备在发现窗口结束后发送数据帧。
在另一些实施中,第一电子设备在发现窗口内发送的数据帧满足如下任一项或多项条件:数据量小于第七阈值、发送速率小于第八阈值、发送次数小于第九阈值。如此一来,能避免第一电子设备在发现窗口发送过多数据导致的发现窗口拥塞的问题,维持网络性能的稳定性。
可选的,第七阈值、第八阈值、第九阈值可以是预先设置的,比如设备出厂是预设的,也可以是设备之间动态交互的。可选的,第七阈值、第八阈值、第九阈值可以根据当前网络的状况确定,比如,集群内的设备数目较多时,第七阈值相应较小,集群内的设备数目较多时,第七阈值相应较大。该方式中,可以通过调整各阈值的值, 动态调整设备在发现窗口发送的数据量、发送速率、发送次数,使得数据量、发送速率、发送次数与当前的网络状况相匹配,获得更高的数据传输性能。
可选的,本申请实施例可以自动开启WLAN传输增强功能,在开启WLAN传输增强功能后,电子设备可以在发现窗口内发送数据帧。该种实现方式,能够实现在用户无感知的情况下提升WLAN传输性能。
可选的,在另一些实施例中,电子设备在开启WLAN传输增强功能后,呈现提示界面,以便提示已开启WLAN传输增强功能。示例性的,如图25的(1)所示,手机正在搜索投屏设备,手机确定投屏为高优先级业务,并自动开启WLAN传输增强功能。手机还可以显示如图25的(2)所示界面,用于提示用户已开启WLAN传输增强功能。
在另一些实施例中,电子设备在开启WLAN传输增强功能之前,呈现提示界面,以便询问用户是否开启WLAN传输增强功能。示例性的,如图26的(1)所示,手机正在搜索投屏设备,手机确定投屏为高优先级业务,并显示如图26的(2)所示界面。该界面包括控件601,用于提示用户是否开启WLAN传输增强功能。在用户指示开启WLAN传输增强功能的情况下,手机可以在发现窗口内发送数据帧。
本申请实施例中的字段、帧均是示例性的举例,在实际实现技术方案时,还可以将用到的信息封装在其他帧的其他字段中。
本申请实施例中的界面均是示例性举例,本申请实施例并不限制界面的具体呈现方式以及效果。
上述技术方案可应用在集群内设备之间的通信过程中,也可以应用在不同集群的设备之间的通信过程中,本申请实施例不做限制。
需要说明的是,上述各方法实施例的流程中的一些操作任选地被组合,并且/或者一些操作的顺序任选地被改变。并且,各流程的步骤之间的执行顺序仅是示例性的,并不构成对步骤之间执行顺序的限制,各步骤之间还可以是其他执行顺序。并非旨在表明执行次序是可以执行这些操作的唯一次序。本领域的普通技术人员会想到多种方式来对本文的操作进行重新排序。另外,应当指出的是,本文某个实施例涉及的过程细节同样以类似的方式适用于其他实施例,或者,不同实施例之间可以组合使用。
示例性的,图14中,对于步骤S101和步骤S302之间的执行顺序不做限制。
此外,方法实施例中的某些步骤可等效替换成其他可能的步骤。或者,方法实施例中的某些步骤可以是可选的,在某些使用场景中可以删除。或者,可以在方法实施例中增加其他可能的步骤。
并且,上述各方法实施例之间可以单独实施,或结合起来实施。
本申请实施例中未进行详细文字介绍的附图,可参见其他附图的相关文字描述。比如,图7的(1)、图7的(2)等附图的文字描述,可参见其他相似附图的文字描述。本申请实施例不再对类似文字描述进行赘述。
本申请另一些实施例提供了一种装置,该装置可以是上述电子设备(第一电子设备或第二电子设备)。该装置可以包括:存储器和一个或多个处理器。该存储器和处理器耦合。该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令。当处理器执行计算机指令时,电子设备可执行上述方法实施例中手机执行的各个功能 或者步骤。该电子设备的结构可以参考图4或图3所示的电子设备。
其中,该电子设备的核心结构可以表示为图27所示的结构,该核心结构可包括:处理模块1301、输入模块1302、存储模块1303以及通信模块1304。
处理模块1301,可包括中央处理器(CPU)、应用处理器(Application Processor,AP)或通信处理器(Communication Processor,CP)中的至少一个。处理模块1301可执行与用户电子设备的其他元件中的至少一个的控制和/或通信相关的操作或数据处理。
输入模块1302,用于获取用户输入的指令或数据,并将获取到的指令或数据传输到电子设备的其他模块。例如,输入模块可以获取用户的输入操作并根据获取到的输入操作生成输入信号,将输入信号传输至处理模块1301。若电子设备为手机,在本申请实施例中,输入模块可用于接收用户输入的设置指令,和/或执行其他步骤。
存储模块1303,可包括易失性存储器和/或非易失性存储器。存储模块用于存储用户终端设备的其他模块中的至少一个相关的指令或数据。
通信模块1304,用于支持电子设备与其他电子设备通信。例如,通信模块可经由无线通信或有线通信连接到网络,以与其他个人终端或网络服务器进行通信。无线通信可采用蜂窝通信协议中的至少一个,诸如,长期演进(LTE)、高级长期演进(LTE-A)、码分多址(CDMA)、宽带码分多址(WCDMA)、通用移动通信系统(UMTS)、无线宽带(WiBro)或全球移动通信系统(GSM)。无线通信可包括例如短距通信。短距通信可包括无线保真(Wi-Fi)、蓝牙、近场通信(NFC)、磁条传输(MST)或GNSS中的至少一个。
本申请实施例还提供一种芯片系统,芯片系统可应用在上述第一电子设备或第二电子设备中。如图28所示,该芯片系统包括至少一个处理器1101和至少一个接口电路1102。处理器1101和接口电路1102可通过线路互联。例如,接口电路1102可用于从其它装置(例如第一电子设备100的存储器)接收信号。又例如,接口电路1102可用于向其它装置(例如处理器1101)发送信号。示例性的,接口电路1102可读取存储器中存储的指令,并将该指令发送给处理器1101。当指令被处理器1101执行时,可使得第一电子设备执行上述实施例中的第一电子设备100(比如,手机)执行的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。
本申请实施例还提供一种装置,该装置包含在第一电子设备或第二电子设备中,该装置具有实现上述实施例中任一方法中第一电子设备或第二电子设备行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括至少一个与上述功能相对应的模块或单元。例如,检测模块或单元、以及确定模块或单元等。
本申请实施例还提供一种计算机可读存储介质,包括计算机指令,当计算机指令在第一电子设备或第二电子设备上运行时,使得第一电子设备或第二电子设备执行如上述实施例中任一方法。
本申请实施例还提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如上述实施例中任一方法。
可以理解的是,上述电子设备(第一电子设备、第二电子设备)等为了实现上述 功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明实施例的范围。
本申请实施例可以根据上述方法示例对上述电子设备等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (26)

  1. 一种数据传输方法,其特征在于,应用于第一电子设备,所述第一电子设备加入到第一集群中,所述第一集群所在的网络为第一网络,所述方法包括:
    确定发现窗口内存在待发送的数据帧;
    在发现窗口内发送所述数据帧。
  2. 根据权利要求1所述的方法,其特征在于,在发现窗口内发送所述数据帧之前,所述方法还包括:确定是否满足允许所述第一电子设备在发现窗口内发送数据帧的第一条件;
    在发现窗口内发送数据帧,包括:若满足第一条件,则在发现窗口内发送所述数据帧。
  3. 根据权利要求1所述的方法,其特征在于,在发现窗口内发送所述数据帧之前,所述方法还包括:从第二电子设备接收第一指示信息,所述第一指示信息用于指示允许在发现窗口内发送数据帧;所述第二电子设备是主设备;
    在发现窗口内发送数据帧,包括:根据所述第一指示信息,在发现窗口内发送数据帧。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,确定发现窗口内存在待发送的数据帧,包括:检测到在所述发现窗口对应的时间段内,已存在待发送的数据帧,或者,检测到在所述发现窗口对应的时间段内,有新到达的待发送的数据帧。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,在发现窗口内发送所述数据帧之前,所述方法还包括:接收用户输入的第一指令,所述第一指令用于指示开启第一功能,所述第一功能是提升数据传输性能的功能。
  6. 根据权利要求1-4中任一项所述的方法,其特征在于,在发现窗口内发送所述数据帧之前,所述方法还包括:检测到处于预设场景,开启第一功能;所述第一功能是提升数据传输性能的功能;
    其中,所述预设场景包括如下一个或多个场景的结合:
    所述第一电子设备开启了预设应用程序,且待发送的数据帧为所述预设应用程序的数据帧;所述第一电子设备开启了所述预设应用程序的预设功能,且待发送的数据帧为所述预设功能的数据帧。
  7. 根据权利要求6所述的方法,其特征在于,在检测所述预设场景之前,所述方法还包括:接收用户输入的第二指令,所述第二指令用于设置所述预设应用。
  8. 根据权利要求2所述的方法,其特征在于,所述第一条件包括如下任一项或多项:所述第一网络的信道繁忙度小于第一阈值、所述第一电子设备的丢包率小于第二阈值、所述第一电子设备的重传率小于第三阈值、所述第一集群内的设备数目小于第五阈值、所述第一电子设备的业务优先级高于第四阈值、所述第一电子设备的接收信号强度指示RSSI高于第六阈值。
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,所述第一电子设备在发现窗口内发送的数据帧满足如下任一项或多项条件:数据量小于第七阈值、发送速率小于第八阈值、发送次数小于第九阈值。
  10. 一种数据传输方法,其特征在于,应用于第二电子设备,所述第二电子设 备加入到第一集群中,所述第二电子设备是主设备;所述第一集群所在的网络为第一网络,所述方法包括:
    确定第一指示信息;
    向第一电子设备发送所述第一指示信息,所述第一指示信息用于指示允许第一电子设备在发现窗口内发送数据帧。
  11. 根据权利要求10所述的方法,其特征在于,确定第一指示信息,包括:在满足允许所述第一电子设备在发现窗口内发送数据帧的第一条件的情况下,确定第一指示信息。
  12. 根据权利要求11所述的方法,其特征在于,所述第一条件包括如下任一项或多项:所述第一网络的信道繁忙度小于第一阈值、所述第一电子设备的丢包率小于第二阈值、所述第一电子设备的重传率小于第三阈值、所述第一集群内的设备数目小于第五阈值、所述第一电子设备的业务优先级高于第四阈值、所述第一电子设备的接收信号强度指示RSSI高于第六阈值。
  13. 一种第一电子设备,其特征在于,所述第一电子设备加入到第一集群中,所述第一集群所在的网络为第一网络,所述第一电子设备包括:
    处理器,用于确定发现窗口内存在待发送的数据帧;
    收发器,用于在发现窗口内发送所述数据帧。
  14. 根据权利要求13所述的设备,其特征在于,所述处理器,还用于确定是否满足允许所述第一电子设备在发现窗口内发送数据帧的第一条件;
    所述收发器,用于在发现窗口内发送数据帧,包括:若满足第一条件,则在发现窗口内发送所述数据帧。
  15. 根据权利要求13所述的设备,其特征在于,所述收发器,还用于从第二电子设备接收第一指示信息,所述第一指示信息用于指示允许在发现窗口内发送数据帧;所述第二电子设备是主设备;
    所述收发器,用于在发现窗口内发送数据帧,包括:根据所述第一指示信息,在发现窗口内发送数据帧。
  16. 根据权利要求13-15中任一项所述的设备,其特征在于,所述处理器,用于确定发现窗口内存在待发送的数据帧,包括:检测到在所述发现窗口对应的时间段内,已存在待发送的数据帧,或者,检测到在所述发现窗口对应的时间段内,有新到达的待发送的数据帧。
  17. 根据权利要求13-16中任一项所述的设备,其特征在于,所述处理器,还用于接收用户输入的第一指令,所述第一指令用于指示开启第一功能,所述第一功能是提升数据传输性能的功能。
  18. 根据权利要求13-16中任一项所述的设备,其特征在于,所述处理器,还用于检测到处于预设场景,开启第一功能;所述第一功能是提升数据传输性能的功能;
    其中,所述预设场景包括如下一个或多个场景的结合:
    所述第一电子设备开启了预设应用程序,且待发送的数据帧为所述预设应用程序的数据帧;所述第一电子设备开启了所述预设应用程序的预设功能,且待发送的数据 帧为所述预设功能的数据帧。
  19. 根据权利要求18所述的设备,其特征在于,所述处理器,还用于接收用户输入的第二指令,所述第二指令用于设置所述预设应用。
  20. 根据权利要求14所述的设备,其特征在于,所述第一条件包括如下任一项或多项:所述第一网络的信道繁忙度小于第一阈值、所述第一电子设备的丢包率小于第二阈值、所述第一电子设备的重传率小于第三阈值、所述第一集群内的设备数目小于第五阈值、所述第一电子设备的业务优先级高于第四阈值、所述第一电子设备的接收信号强度指示RSSI高于第六阈值。
  21. 根据权利要求13-20中任一项所述的设备,其特征在于,所述第一电子设备在发现窗口内发送的数据帧满足如下任一项或多项条件:数据量小于第七阈值、发送速率小于第八阈值、发送次数小于第九阈值。
  22. 一种第二电子设备,其特征在于,所述第二电子设备加入到第一集群中,所述第二电子设备是主设备;所述第一集群所在的网络为第一网络,所述第二电子设备包括:
    处理器,用于确定第一指示信息;
    收发器,用于向第一电子设备发送所述第一指示信息,所述第一指示信息用于指示允许第一电子设备在发现窗口内发送数据帧。
  23. 根据权利要求22所述的设备,其特征在于,所述处理器,用于确定第一指示信息,包括:在满足允许所述第一电子设备在发现窗口内发送数据帧的第一条件的情况下,确定第一指示信息。
  24. 根据权利要求23所述的设备,其特征在于,所述第一条件包括如下任一项或多项:所述第一网络的信道繁忙度小于第一阈值、所述第一电子设备的丢包率小于第二阈值、所述第一电子设备的重传率小于第三阈值、所述第一集群内的设备数目小于第五阈值、所述第一电子设备的业务优先级高于第四阈值、所述第一电子设备的接收信号强度指示RSSI高于第六阈值。
  25. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在计算机上运行时,使得所述计算机执行如权利要求1-12中任一项所述的方法。
  26. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-12中任一项所述的方法。
PCT/CN2022/121905 2021-10-12 2022-09-27 一种数据传输方法及装置 WO2023061217A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111187778.4 2021-10-12
CN202111187778.4A CN115988424A (zh) 2021-10-12 2021-10-12 一种数据传输方法及装置

Publications (1)

Publication Number Publication Date
WO2023061217A1 true WO2023061217A1 (zh) 2023-04-20

Family

ID=85968593

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/121905 WO2023061217A1 (zh) 2021-10-12 2022-09-27 一种数据传输方法及装置

Country Status (2)

Country Link
CN (1) CN115988424A (zh)
WO (1) WO2023061217A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017065561A1 (ko) * 2015-10-14 2017-04-20 엘지전자 주식회사 무선 통신 시스템에서 nan 단말이 프레임을 전송하는 방법 및 장치
CN108322931A (zh) * 2018-01-24 2018-07-24 青岛海信电器股份有限公司 一种数据帧传输方法、装置及工作站
CN110192425A (zh) * 2016-11-18 2019-08-30 诺基亚技术有限公司 Lte-u独立系统中的drs实例的机会使用
US20210051462A1 (en) * 2019-08-16 2021-02-18 Samsung-ro Electronics Co, Ltd. Electronic device and method for providing service by electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017065561A1 (ko) * 2015-10-14 2017-04-20 엘지전자 주식회사 무선 통신 시스템에서 nan 단말이 프레임을 전송하는 방법 및 장치
CN110192425A (zh) * 2016-11-18 2019-08-30 诺基亚技术有限公司 Lte-u独立系统中的drs实例的机会使用
CN108322931A (zh) * 2018-01-24 2018-07-24 青岛海信电器股份有限公司 一种数据帧传输方法、装置及工作站
US20210051462A1 (en) * 2019-08-16 2021-02-18 Samsung-ro Electronics Co, Ltd. Electronic device and method for providing service by electronic device

Also Published As

Publication number Publication date
CN115988424A (zh) 2023-04-18

Similar Documents

Publication Publication Date Title
CN110381345B (zh) 一种投屏显示方法及电子设备
WO2020133183A1 (zh) 音频数据的同步方法及设备
WO2021082829A1 (zh) 蓝牙连接方法及相关装置
WO2020132818A1 (zh) 无线短距离音频共享方法及电子设备
WO2021185141A1 (zh) Wi-Fi Aware的建链方法、系统、电子设备和存储介质
WO2021175300A1 (zh) 数据传输方法、装置、电子设备和可读存储介质
EP4024806A1 (en) Data transceiving method, electronic device, and computer-readable storage medium
WO2021043219A1 (zh) 一种蓝牙回连方法及相关装置
US20220330227A1 (en) Communication Method, Communication Apparatus, and System
CN113498108B (zh) 基于业务类型调整数据传输策略的芯片、设备以及方法
WO2022042265A1 (zh) 通信方法、终端设备及存储介质
CN114390337A (zh) 投屏方法、系统及电子设备
WO2022135303A1 (zh) 一种tws耳机连接方法及设备
WO2023143300A1 (zh) 一种切片选择方法、系统及相关装置
WO2021027623A1 (zh) 一种设备能力发现方法及p2p设备
WO2020118532A1 (zh) 一种蓝牙通信方法及电子设备
WO2022174746A1 (zh) 事件通知方法、蓝牙设备以及蓝牙系统
US12041110B2 (en) Bluetooth communication method and related apparatus
WO2022068486A1 (zh) 数据发送方法、电子设备、芯片系统及存储介质
WO2022199491A1 (zh) 一种立体声组网方法、系统及相关装置
WO2022111712A1 (zh) 一种音频与视频同步的方法及设备
WO2023061217A1 (zh) 一种数据传输方法及装置
WO2021114950A1 (zh) 一种多路http通道复用的方法及终端
WO2023165513A1 (zh) 通信方法、电子设备及装置
WO2022095581A1 (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: 22880157

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE