Communication method and electronic device
By transmitting frames at reduced powers and assessing frame failures, the method accurately determines WiFi link quality, addressing asymmetry issues and enhancing user experience.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-12-13
- Publication Date
- 2026-06-18
AI Technical Summary
Existing WiFi link quality assessment based on received signal strength indicator (RSSI) can result in a good measured link quality but poor user experience due to asymmetry between the access point and the station.
The method involves transmitting frames at reduced transmission powers and monitoring frame failures to determine a transmit margin to disconnection, adjusting transmission powers based on retry counts, and displaying connection quality indicators.
This approach provides a more accurate assessment of link quality, reducing frame failures and improving user experience by adjusting transmission powers to avoid high RSSI with low user experience.
Smart Images

Figure CN2024139289_18062026_PF_FP_ABST
Abstract
Description
COMMUNICATION METHOD AND ELECTRONIC DEVICETECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of communications, and more specifically, to a communication method and an electronic device.BACKGROUND
[0002] Wireless fidelity (WiFi) link quality is usually determined based on signals received from an access point (AP) such as a received strength indicator (RSSI) .
[0003] However, since WiFi link is always bidirectional, using signals received from the AP to indicate link quality may result in a good measured link quality but bad quality of experience (QoE) .SUMMARY
[0004] This present disclosure provides a communication method and an electronic device, which can estimate the link quality more accurately.
[0005] According to a first aspect, an embodiment of this application provides a communication method, including: transmitting an i-th frame to an access point (AP) at a j-th transmission power, where the j-th transmission power is obtained by reducing an initial transmission power by j-1 times, i and j are integers, i>0, j>0, and i≥j; determining a transmission result of the i-th frame; if the transmission of the i-th frame is failed, obtaining a j-th consecutive retry number, where the j-th consecutive retry number is the number of consecutive frame failure times at the j-th transmission power; if the j-th consecutive retry number is equal to or higher than a first threshold, determining a transmit margin to disconnection based on the j-th transmission power.
[0006] According to the above-mentioned technical solution, the electronic device can determine the transmit margin to disconnection based on frames transmitted to the AP when there are several consecutive frames failed at a same transmission power. As the electronic device (astation) usually has a lower transmission power compared with the AP, this method may avoid a high RSSI but low user experience resulting from asymmetry of the link between the AP and the station (the electronic device) .
[0007] In one optional implementation, if the j-th consecutive retry number is lower than the first threshold, the method further includes: transmitting an (i+1) -th frame to the AP at the j-th transmission power.
[0008] According to the above-mentioned technical solution, by using the first threshold, we consider frame failure from collision, and the derived transmit margin to disconnection is therefore more reliable.
[0009] In one optional implementation, if the i-th frame is successful, the method further includes: determining a (j+1) -th transmission power based on the j-th transmission power; transmitting an (i+1) -th frame to the AP at the (j+1) -th transmission power.
[0010] According to the above-mentioned technical solution, the transmit margin to disconnection indicates a minimum transmission power that may be detected by the AP. If a frame at a specific transmission power is successfully transmitted, the specific transmission power is possibly higher than the real minimum transmission power, and transmission power can be reduced to approach it.
[0011] In one optional implementation, an amount of reduction is the same for the (j-1) times.
[0012] In one optional implementation, if the transmission of the i-th frame is failed and the j-th consecutive retry number is equal to or higher than the first threshold, the method further includes: determining a collision rate between the electronic device and the AP based on transmission results of frames corresponding to transmission power bigger than the j-th transmission power.
[0013] According to the above-mentioned technical solution, after determining the transmission power associated with the transmit margin to disconnection, frames transmitted with a higher transmission power may be failed due to collision. The collision rate can thus be determined.
[0014] In one optional implementation, the first to the (i-1) -th frames are transmitted at a rate lower than a second threshold.
[0015] According to the above-mentioned technical solution, transmitting the frames with a low Tx Data Rate / frame rate can reduce influence from noise or other interference for the transmission. A more reliable transmit margin to disconnection can therefore be derived.
[0016] In one optional implementation, an amount of reduction between the j-th transmission power and a (j-1) -th transmission power is in negative correlation with the j, j>1.
[0017] According to the above-mentioned technical solution, the power reduction is not constant. In this scenario, a balance between accuracy and convergence time can be obtained.
[0018] In one optional implementation, the method further includes: displaying a first interface on a screen of the electronic device, where the first interface indicates a connection quality between the electronic device and the AP, and the connection quality is associated with the transmit margin to disconnection.
[0019] According to the above-mentioned technical solution, an icon indicating link quality can be displayed on the screen of the electronic device to inform a user of current link quality, which could increase user experience with link quality determined based on the transmit margin to disconnection.
[0020] In one optional implementation, the connection quality is further associated with a received signal strength indicator (RSSI) between the electronic device and the AP.
[0021] According to a second aspect, an embodiment of this application provides a communication apparatus, the communication apparatus includes: a transceiver unit, configured to transmit an i-th frame to an access point (AP) at a j-th transmission power, where the j-th transmission power is obtained by reducing an initial transmission power by j-1 times, i and j are integers, i>0, j>0, and i≥j; a processing unit, configured to: determine a transmission result of the i-th frame; if the transmission of the i-th frame is failed, obtain a j-th consecutive retry number, where the j-th consecutive retry number is the number of consecutive frame failure times at the j-th transmission power; if the j-th consecutive retry number is equal to or higher than a first threshold, determine a transmit margin to disconnection based on the j-th transmission power.
[0022] In one optional implementation, if the j-th consecutive retry number is lower than the first threshold, the processing unit is further configured to transmit an (i+1) -th frame to the AP at the j-th transmission power.
[0023] In one optional implementation, if the transmission of the i-th frame is successful, the processing unit is further configured to determine a (j+1) -th transmission power based on the j-th transmission power; transmitting an (i+1) -th frame to the AP at the (j+1) -th transmission power.
[0024] In one optional implementation, an amount of reduction is the same for the (j-1) times.
[0025] In one optional implementation, if the transmission of the i-th frame is failed and the j-th consecutive retry number is equal to or higher than the first threshold, the processing unit is further configured to determine a collision rate between the electronic device and the AP based on transmission results of frames corresponding to transmission power bigger than the j-th transmission power.
[0026] In one optional implementation, the first to the (i-1) -th frames are transmitted at a rate lower than a second threshold.
[0027] In one optional implementation, an amount of reduction between the j-th transmission power and a (j-1) -th transmission power is in negative correlation with the j, j>1.
[0028] In one optional implementation, the communication apparatus further includes a display unit configured to display a first interface on a screen of the electronic device, where the first interface indicates a connection quality between the electronic device and the AP, and the connection quality is associated with the transmit margin to disconnection.
[0029] In one optional implementation, the connection quality is further associated with a received signal strength indicator (RSSI) between the electronic device and the AP.
[0030] According to a third aspect, an embodiment of this application provides an electronic device, the electronic device is configured to perform the method according to the first aspect or any optional implementation of the first aspect.
[0031] According to a fourth aspect, an embodiment of this application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the instructions run on a device, the device is enabled to perform the method according to the first aspect or any optional implementation of the first aspect.
[0032] According to a fifth aspect, an embodiment of this application provides a computer program product, when the computer program product runs on a device, the device is enabled to perform the method according to the first aspect or any optional implementation of the first aspect.
[0033] According to a sixth aspect, an embodiment of this application provides a chip system, including a memory and a processor, where the memory is configured to store a computer program, and the processor is configured to invoke the computer program from the memory and run the computer program, so that a device on which the chip system is disposed performs the method according to the first aspect or any optional implementation of the first aspect.DESCRIPTION OF DRAWINGS
[0034] FIG. 1 is a schematic diagram of a hardware structure of an electronic device 100 according to an embodiment of this application;
[0035] FIG. 2 is a block diagram of a software structure of the electronic device 100 according to an embodiment of this application;
[0036] FIG. 3 is a schematic diagram of a scenario according to an embodiment of this application;
[0037] FIG. 4 is a schematic diagram of a scenario according to an embodiment of this application;
[0038] FIG. 5 is a schematic diagram of a communication method according to an embodiment of this application;
[0039] FIG. 6 is a schematic diagram of a communication method according to an embodiment of this application;
[0040] FIG. 7 is a schematic diagram of a communication method according to an embodiment of this application;
[0041] FIG. 8 is a schematic diagram of icons indicating link quality levels according to an embodiment of this application; and
[0042] FIG. 9 is a schematic bock diagram of an electronic device according to an embodiment of this application.DESCRIPTION OF EMBODIMENTS
[0043] The following describes the technical solutions in this application with reference to the accompanying drawings.
[0044] Terms used in the following embodiments of this application are merely intended to describe specific embodiments, but are not intended to limit this application. Terms “one” , “a” , “the” , “the foregoing” , “this” , and “the one” of singular forms used in this specification and the appended claims of this application are also intended to include plural forms like “one or more” , unless otherwise specified in the context clearly.
[0045] Reference to “an embodiment” , “some embodiments” , or the like described in this specification indicates that one or more embodiments of this application include a specific feature, structure, or characteristic described with reference to the embodiments. Therefore, in this specification, statements, such as “in an embodiment” , “in some embodiments” , “in some other embodiments” , and “in other embodiments” , that appear at different places do not necessarily mean referring to a same embodiment, instead, but mean “one or more but not all of the embodiments” , unless otherwise specified. The terms “include” , “comprise” , “have” , and their variants all mean “include but are not limited to” , unless otherwise specified.
[0046] In order to describe the image translation method provided by the embodiment of the present application more clearly, an electronic device for executing the image translation method is first introduced below.
[0047] In some embodiments, the electronic device may be a portable electronic device that further includes other functions such as a personal digital assistant function and / or a music player function, for example, a mobile phone, a tablet computer, or a wearable electronic device having a wireless communication function (for example, a smartwatch) . An example embodiment of the portable electronic device includes but is not limited to a portable electronic device using or another operating system. The portable electronic device may alternatively be another portable electronic device, for example, a laptop computer (Laptop) . It should be further understood that, in some other embodiments, the electronic device may alternatively be a desktop computer, but not a portable electronic device.
[0048] FIG. 1 illustrates a schematic diagram of a hardware structure of an electronic device 100 according to an embodiment of this application.
[0049] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) port 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identity module, SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, an optical proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
[0050] It may be understood that the structure shown in this embodiment of this application does not constitute a specific limitation on the electronic device 100. In some other embodiments of this application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine some components, or split some components, or have different component arrangements. The components shown in the figure may be implemented by hardware, software, or a combination of software and hardware.
[0051] The processor 110 may include one or more processing units. 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) , a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP) , a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU) . Different processing units may be independent components, or may be integrated into one or more processors.
[0052] The controller may be a nerve center and a command center of the electronic device 100. The controller may generate an operation control signal based on an instruction operation code and a time sequence signal, to complete control of instruction reading and instruction execution.
[0053] A memory may be further disposed in the processor 110, and is configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that has been used or cyclically used by the processor 110. If the processor 110 needs to use the instructions or the data again, the processor may directly invoke the instructions or the data from the memory. This avoids repeated access, reduces waiting time of the processor 110, and improves system efficiency.
[0054] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (inter-integrated circuit, I2C) interface, an inter-integrated circuit sound (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver / transmitter (universal asynchronous receiver / transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI) , a general-purpose input / output (general-purpose input / output, GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, a universal serial bus (universal serial bus, USB) port, and / or the like.
[0055] The I2C interface is a two-way synchronization serial bus, and includes one serial data line (serial data line, SDA) and one serial clock line (serial clock line, SCL) . In some embodiments, the processor 110 may include a plurality of groups of I2C buses. The processor 110 may be separately coupled to the touch sensor 180K, a charger, a flash, the camera 193, and the like through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, to implement a touch function of the electronic device 100.
[0056] The I2S interface may be used for audio communication. In some embodiments, the processor 110 may include a plurality of groups of I2S buses. The processor 110 may be coupled to the audio module 170 through the I2S bus, to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through a Bluetooth headset.
[0057] The PCM interface may also be used for audio communication, and sample, quantize, and code an analog signal. In some embodiments, the audio module 170 may be coupled to the wireless communication module 160 through a PCM bus interface. In some embodiments, the audio module 170 may also transmit an audio signal to the wireless communication module 160 through the PCM interface, to implement a function of answering a call through a Bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
[0058] The UART interface is a universal serial data bus, and is used for asynchronous communication. The bus may be a two-way communication bus, and converts to-be-transmitted data between serial communication and parallel communication. In some embodiments, the UART interface is usually configured to connect the processor 110 to the wireless communication module 160. For example, the processor 110 communicates with a Bluetooth module in the wireless communication module 160 through the UART interface, to implement a Bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the UART interface, to implement a function of playing music through a Bluetooth headset.
[0059] The MIPI may be configured to connect the processor 110 to a peripheral component such as the display 194 or the camera 193. The MIPI includes a camera serial interface (camera serial interface, CSI) , a display serial interface (display serial interface, DSI) , and the like. In some embodiments, the processor 110 communicates with the camera 193 through the CSI, to implement a photographing function of the electronic device 100. The processor 110 communicates with the display 194 through the DSI, to implement a display function of the electronic device 100.
[0060] The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or a data signal. In some embodiments, the GPIO interface may be configured to connect the processor 110 to the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, or the like. The GPIO interface may alternatively be configured as an I2C interface, an I2S interface, a UART interface, an MIPI, or the like.
[0061] The USB port 130 is a port that conforms to a USB standard specification, and may be specifically a mini USB port, a micro USB port, a USB Type-C port, or the like. The USB port 130 may be configured to connect to a charger to charge the electronic device 100, or may be configured to transmit data between the electronic device 100 and a peripheral device, or may be configured to connect to a headset for playing audio through the headset. The port may be further configured to connect to another electronic device such as an AR device.
[0062] It may be understood that an interface connection relationship between the modules illustrated in this embodiment of this application is merely an example for description, and constitutes no limitation on the structure of the electronic device 100. In some other embodiments of this application, the electronic device 100 may alternatively use an interface connection manner different from that in the foregoing embodiment, or use a combination of a plurality of interface connection manners.
[0063] 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. In some embodiments of wired charging, the charging management module 140 may receive a charging input of a wired charger through the USB port 130. In some embodiments of wireless charging, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 supplies power to the electronic device through the power management module 141 while charging the battery 142.
[0064] The power management module 141 is configured to connect to the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives an input of the battery 142 and / or the charging management module 140, to supply power to the processor 110, the internal memory 121, an external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may be further configured to monitor parameters such as a battery capacity, a battery cycle count, and a battery health status (electric leakage or impedance) . In some other embodiments, the power management module 141 may alternatively be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 may alternatively be disposed in a same device.
[0065] A wireless communication function of the electronic device 100 may be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
[0066] The antenna 1 and the antenna 2 are configured to: transmit and receive an electromagnetic wave signal. Each antenna in the electronic device 100 may be configured to cover one or more communication frequency bands. Different antennas may be further multiplexed, to improve antenna utilization. For example, the antenna 1 may be multiplexed as a diversity antenna in a wireless local area network. In some other embodiments, the antenna may be used in combination with a tuning switch.
[0067] The mobile communication module 150 may provide a wireless communication solution that is applied to the electronic device 100 and that includes 2G / 3G / 4G / 5G or the like. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (low noise amplifier, LNA) , and the like. The mobile communication module 150 may receive an electromagnetic wave through the antenna 1, perform processing such as filtering or amplification on the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may further amplify a signal modulated by the modem processor, and convert the signal into an electromagnetic wave for radiation through the antenna 1. In some embodiments, at least some functional modules in the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some functional modules in the mobile communication module 150 may be disposed in a same device as at least some modules of the processor 110.
[0068] The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a to-be-sent low-frequency baseband signal into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. Then, the demodulator transmits the low-frequency baseband signal obtained through demodulation to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then transmitted to the application processor. The application processor outputs a sound signal through an audio device (which is not limited to the speaker 170A, the receiver 170B, or the like) , or displays an image or a video through the display 194. In some embodiments, the modem processor may be an independent component. In some other embodiments, the modem processor may be independent of the processor 110, and is disposed in a same device as the mobile communication module 150 or another functional module.
[0069] The wireless communication module 160 may provide a wireless communication solution that is applied to the electronic device 100 and that includes a wireless local area network (wireless local area network, WLAN) (for example, a wireless fidelity (wireless fidelity, Wi-Fi) network) , Bluetooth (Bluetooth, BT) , a global navigation satellite system (global navigation satellite system, GNSS) , frequency modulation (frequency modulation, FM) , a near field communication (near field communication, NFC) technology, an infrared (infrared, IR) technology, or the like. The wireless communication module 160 may be one or more components integrating at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave through the antenna 2, performs frequency modulation and filtering processing on an electromagnetic wave signal, and sends a processed signal to the processor 110. The wireless communication module 160 may further receive a to-be-sent signal from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into an electromagnetic wave for radiation through the antenna 2.
[0070] In some embodiments, the antenna 1 and the mobile communication module 150 in the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 in the electronic device 100 are coupled, so that the electronic device 100 can communicate with a network and another device by using a wireless communication technology. The wireless communication technology may include a global system for mobile communications (global system for mobile communications, GSM) , a general packet radio service (general packet radio service, GPRS) , code division multiple access (code division multiple access, CDMA) , wideband code division multiple access (wideband code division multiple access, WCDMA) , time-division code division multiple access (time-division code division multiple access, TD-CDMA) , long term evolution (long term evolution, LTE) , BT, a GNSS, a WLAN, NFC, FM, an IR technology, and / or the like. The GNSS may include a global positioning system (global positioning system, GPS) , a global navigation satellite system (global navigation satellite system, GLONASS) , a BeiDou navigation satellite system (BeiDou navigation satellite system, BDS) , a quasi-zenith satellite system (quasi-zenith satellite system, QZSS) , and / or a satellite based augmentation system (satellite based augmentation system, SBAS) .
[0071] The electronic device 100 may implement a display function through the GPU, the display 194, the application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is configured to: perform mathematical and geometric computation, and render an image. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0072] The display 194 is configured to display an image, a video, and the like. The display 194 includes a display panel. The display panel may be a liquid crystal display (liquid crystal display, LCD) , an organic light-emitting diode (organic light-emitting diode, OLED) , an active-matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED) , a flexible light-emitting diode (flexible light-emitting diode, FLED) , a mini-LED, a micro-LED, a micro-OLED, a quantum dot light emitting diode (quantum dot light emitting diode, QLED) , or the like. In some embodiments, the electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0073] The electronic device 100 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
[0074] The ISP is configured to process data fed back by the camera 193. For example, during photographing, a shutter is pressed, and light is transmitted to a photosensitive element of the camera through a lens. An optical signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, to convert the electrical signal into a visible image. The ISP may further perform algorithm optimization on noise, brightness, and complexion of the image. The ISP may further optimize parameters such as exposure and a color temperature of a photographing scenario. In some embodiments, the ISP may be disposed in the camera 193.
[0075] The camera 193 is configured to capture a static image or a video. An optical image of an object is generated through the lens, and is projected onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (complementary metal-oxide-semiconductor, CMOS) phototransistor. The photosensitive element converts an optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert the electrical signal into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format such as RGB or YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0076] The digital signal processor is configured to process a digital signal, and may process another digital signal in addition to the digital image signal. For example, when the electronic device 100 selects a frequency, the digital signal processor is configured to perform Fourier transform on frequency energy.
[0077] The video codec is configured to: compress or decompress a digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record videos in a plurality of coding formats, for example, moving picture experts group (moving picture experts group, MPEG) -1, MPEG-2, MPEG-3, and MPEG-4.
[0078] The NPU is a neural-network (neural-network, NN) computing processor, quickly processes input information by referring to a structure of a biological neural network, for example, by referring to a mode of transmission between human brain neurons, and may further continuously perform self-learning. Applications such as intelligent cognition of the electronic device 100 may be implemented through the NPU, for example, image recognition, facial recognition, speech recognition, and text understanding.
[0079] The external memory interface 120 may be used to connect to an external storage card, for example, a micro SD card, to extend a storage capability of the electronic device 100. The external storage card communicates with the processor 110 through the external memory interface 120, to implement a data storage function. For example, files such as music and videos are stored in the external storage card.
[0080] The internal memory 121 may be configured to store computer-executable program code. The executable program code includes instructions. The processor 110 runs the instructions stored in the internal memory 121, to perform various function applications of the electronic device 100 and data processing. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required by at least one function (for example, a voice playing function or an image playing function) , and the like. The data storage area may store data (such as audio data and an address book) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, or may include a nonvolatile memory, for example, at least one magnetic disk storage device, a flash memory, or a universal flash storage (universal flash storage, UFS) .
[0081] The electronic device 100 may implement an audio function, for example, music playing and recording, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headset jack 170D, the application processor, and the like.
[0082] The audio module 170 is configured to convert digital audio information into an analog audio signal for output, and is also configured to convert analog audio input into a digital audio signal. The audio module 170 may be further configured to: code and decode an audio signal. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules in the audio module 170 are disposed in the processor 110.
[0083] The speaker 170A, also referred to as a “horn” , is configured to convert an audio electrical signal into a sound signal. The electronic device 100 may be used to listen to music or answer a call in a hands-free mode over the speaker 170A.
[0084] The receiver 170B, also referred to as an “earpiece” , is configured to convert an electrical audio signal into a sound signal. When a call is answered or speech information is received through the electronic device 100, the receiver 170B may be put close to a human ear to listen to a voice.
[0085] The microphone 170C, also referred to as a “mike” or a “mic” , is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, a user may make a sound near the microphone 170C through the mouth of the user, to input a sound signal to the microphone 170C. At least one microphone 170C may be disposed in the electronic device 100. In some other embodiments, two microphones 170C may be disposed in the electronic device 100, to collect a sound signal and implement a noise reduction function. In some other embodiments, three, four, or more microphones 170C may alternatively be disposed in the electronic device 100, to collect a sound signal, implement noise reduction, and identify a sound source, so as to implement a directional recording function and the like.
[0086] The headset jack 170D is configured to connect to a wired headset. The headset jack 170D may be a USB port 130, or may be a 3.5 mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface or cellular telecommunications industry association of the USA (cellular telecommunications industry association of the USA, CTIA) standard interface.
[0087] The pressure sensor 180A is configured to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display 194. There are a plurality of types of pressure sensors 180A, such as a resistive pressure sensor, an inductive pressure sensor, and a capacitive pressure sensor. The capacitive pressure sensor may include at least two parallel plates made of conductive materials. When a force is applied to the pressure sensor 180A, capacitance between electrodes changes. The electronic device 100 determines pressure intensity based on the change in the capacitance. When a touch operation is performed on the display 194, the electronic device 100 detects intensity of the touch operation through the pressure sensor 180A. The electronic device 100 may also calculate a touch location based on a detection signal of the pressure sensor 180A. In some embodiments, touch operations that are performed at a same touch location but have different touch operation intensity may correspond to different operation instructions. For example, when a touch operation whose touch operation intensity is less than a first pressure threshold is performed on a Messages application icon, an instruction for viewing an SMS message is performed. When a touch operation whose touch operation intensity is greater than or equal to the first pressure threshold is performed on the Messages application icon, an instruction for creating a new SMS message is performed.
[0088] The gyro sensor 180B may be configured to determine a moving posture of the electronic device 100. In some embodiments, an angular velocity of the electronic device 100 around three axes (namely, axes x, y, and z) may be determined through the gyro sensor 180B. The gyro sensor 180B may be configured to implement image stabilization during photographing. For example, when the shutter is pressed, the gyro sensor 180B detects an angle at which the electronic device 100 jitters, calculates, based on the angle, a distance for which a lens module needs to compensate, and allows the lens to cancel the jitter of the electronic device 100 through reverse motion, to implement image stabilization. The gyro sensor 180B may also be used in a navigation scenario and a somatic game scenario.
[0089] The barometric pressure sensor 180C is configured to measure barometric pressure. In some embodiments, the electronic device 100 calculates an altitude through the barometric pressure measured by the barometric pressure sensor 180C, to assist in positioning and navigation.
[0090] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 may detect opening and closing of a flip cover by using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a clamshell phone, the electronic device 100 may detect opening and closing of a flip cover based on the magnetic sensor 180D. Further, a feature such as automatic unlocking of the flip cover is set based on a detected opening or closing state of the flip cover.
[0091] The acceleration sensor 180E may detect accelerations of the electronic device 100 in various directions (usually on three axes) . When the electronic device 100 is still, a magnitude and a direction of gravity may be detected. The acceleration sensor 180E may be further configured to identify a posture of the electronic device, and is used in an application such as switching between a landscape mode and a portrait mode or a pedometer.
[0092] The distance sensor 180F is configured to measure a distance. The electronic device 100 may measure the distance in an infrared manner or a laser manner. In some embodiments, in a photographing scenario, the electronic device 100 may measure a distance through the distance sensor 180F to implement quick focusing.
[0093] The optical proximity sensor 180G may include, for example, a light-emitting diode (LED) and an optical detector, for example, a photodiode. The light-emitting diode may be an infrared light-emitting diode. The electronic device 100 emits infrared light by using the light-emitting diode. The electronic device 100 detects infrared reflected light from a nearby object through the photodiode. When sufficient reflected light is detected, the electronic device 100 may determine that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100. The electronic device 100 may detect, by using the optical proximity sensor 180G, that the user holds the electronic device 100 close to an ear for a call, to automatically turn off a screen for power saving. The optical proximity sensor 180G may also be used in a smart cover mode or a pocket mode to automatically perform screen unlocking or locking.
[0094] The ambient light sensor 180L is configured to sense ambient light brightness. The electronic device 100 may adaptively adjust brightness of the display 194 based on the sensed ambient light brightness. The ambient light sensor 180L may also be configured to automatically adjust white balance during photographing. The ambient light sensor 180L may also cooperate with the optical proximity sensor 180G to detect whether the electronic device 100 is in a pocket, to avoid an accidental touch.
[0095] The fingerprint sensor 180H is configured to collect a fingerprint. The electronic device 100 may use a feature of the collected fingerprint to implement fingerprint-based unlocking, application lock access, fingerprint-based photographing, fingerprint-based call answering, and the like.
[0096] The temperature sensor 180J is configured to detect a temperature. In some embodiments, the electronic device 100 executes a temperature processing policy through the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 lowers performance of a processor near the temperature sensor 180J, to reduce power consumption for thermal protection. In some other embodiments, when the temperature is less than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to a low temperature. In some other embodiments, when the temperature is less than still another threshold, the electronic device 100 boosts an output voltage of the battery 142 to avoid abnormal shutdown caused by a low temperature.
[0097] The touch sensor 180K is also referred to as a "touch panel" . The touch sensor 180K may be disposed on the display 194, and the touch sensor 180K and the display 194 constitute a touchscreen. The touch sensor 180K is configured to detect a touch operation performed on or near the touch sensor. The touch sensor may transfer the detected touch operation to the application processor to determine a type of the touch event. A visual output related to the touch operation may be provided through the display 194. In some other embodiments, the touch sensor 180K may also be disposed on a surface of the electronic device 100 at a location different from that of the display 194.
[0098] The bone conduction sensor 180M may obtain a vibration signal. In some embodiments, the bone conduction sensor 180M may obtain a vibration signal of a vibration bone of a human vocal-cord part. The bone conduction sensor 180M may also be in contact with a body pulse to receive a blood pressure beating signal. In some embodiments, the bone conduction sensor 180M may also be disposed in the headset, to obtain a bone conduction headset. The audio module 170 may obtain a speech signal through parsing based on the vibration signal that is of the vibration bone of the vocal-cord part and that is obtained by the bone conduction sensor 180M, to implement a speech function. The application processor may parse heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, to implement a heart rate detection function.
[0099] The button 190 includes a power button, a volume button, and the like. The button 190 may be a mechanical button, or may be a touch button. The electronic device 100 may receive a key input, and generate a key signal input related to a user setting and function control of the electronic device 100.
[0100] The motor 191 may generate a vibration prompt. The motor 191 may be configured to provide an incoming call vibration prompt and a touch vibration feedback. For example, touch operations performed on different applications (for example, photographing and audio playback) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations performed on different areas of the display 194. Different application scenarios (for example, a time reminder, information receiving, an alarm clock, and a game) may also correspond to different vibration feedback effects. A touch vibration feedback effect may be further customized.
[0101] The indicator 192 may be an indicator light, and may be configured to indicate a charging status and a power change, or may be configured to indicate a message, a missed call, a notification, and the like.
[0102] The SIM card interface 195 is configured to connect to a SIM card. The SIM card may be inserted into the SIM card interface 195 or removed from the SIM card interface 195, to implement contact with or separation from the electronic device 100. The electronic device 100 may support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 may support a nano-SIM card, a micro-SIM card, a SIM card, and the like. A plurality of cards may be simultaneously inserted into a same SIM card interface 195. The plurality of cards may be of a same type or different types. The SIM card interface 195 is compatible with different types of SIM cards. The SIM card interface 195 is also compatible with an external storage card. The electronic device 100 interacts with a network through the SIM card, to implement functions such as conversation and data communication. In some embodiments, the electronic device 100 uses an embedded SIM (embedded SIM, eSIM) card. The eSIM card may be embedded into the electronic device 100, and cannot be separated from the electronic device 100.
[0103] It should be understood that a calling card in embodiments of this application includes but is not limited to a SIM card, an eSIM card, a universal subscriber identity module (universal subscriber identity module, USIM) , a universal integrated circuit card (universal integrated circuit card, UICC) , and the like.
[0104] A software system of the electronic device 100 may use a layered architecture, an event-driven architecture, a microkernel architecture, a micro service architecture, or a cloud architecture. In an embodiment of this application, an Android system with a layered architecture is used as an example to describe a software structure of the electronic device 100.
[0105] FIG. 2 is a block diagram of a software structure of the electronic device 100 according to an embodiment of this application. In a layered architecture, software is divided into several layers, and each layer has a clear role and task. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers: an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom. The application layer may include a series of application packages.
[0106] As shown in FIG. 2, the application packages may include applications such as Camera, Gallery, Calendar, Phone, Map, Navigation, WLAN, Bluetooth, Music, Videos, and Messages.
[0107] The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for an application at the application layer. The application framework layer includes some predefined functions.
[0108] As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0109] The window manager is configured to manage a window program. The window manager may obtain a size of the display, determine whether there is a status bar, perform screen locking, take a screenshot, and the like.
[0110] The content provider is configured to: store and obtain data, and enable the data to be accessed by an application. The data may include a video, an image, an audio, calls that are made and answered, a browsing history and bookmarks, an address book, and the like.
[0111] The view system includes visual controls such as a control for displaying a text and a control for displaying an image. The view system may be configured to construct an application. A display interface may include one or more views. For example, a display interface including an SMS message notification icon may include a text display view and an image display view.
[0112] The phone manager is configured to provide a communication function for the electronic device 100, for example, management of a call status (including answering, declining, or the like) .
[0113] The resource manager provides various resources such as a localized character string, an icon, an image, a layout file, and a video file for an application.
[0114] The notification manager enables an application to display notification information in a status bar, and may be configured to convey a notification message. The notification manager may automatically disappear after a short pause without requiring user interaction. For example, the notification manager is configured to: notify download completion, give a message notification, and the like. The notification manager may alternatively be a notification that appears in a top status bar of the system in a form of a graph or a scroll bar text, for example, a notification of an application that is run on the background, or may be a notification that appears on the screen in a form of a dialog window. For example, text information is displayed in the status bar, an announcement is given, the electronic device vibrates, or the indicator light blinks.
[0115] The Android runtime includes a kernel library and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0116] The kernel library includes two parts: a function that needs to be invoked in Java language and a kernel library of Android.
[0117] The application layer and the application framework layer run on the virtual machine. The virtual machine executes Java files of the application layer and the application framework layer as binary files. The virtual machine is configured to implement functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0118] The system library may include a plurality of functional modules, for example, a surface manager (surface manager) , a media library (media library) , a three-dimensional graphics processing library (for example, OpenGL ES) , and a 2D graphics engine (for example, SGL) .
[0119] The surface manager is configured to: manage a display subsystem and provide fusion of 2D and 3D layers for a plurality of applications.
[0120] The media library supports playback and recording in a plurality of commonly used audio and video formats, and static image files. The media library may support a plurality of audio and video coding formats, for example, MPEG-4, H. 264, MP3, AAC, AMR, JPG, and PNG.
[0121] The three-dimensional graphics processing library is configured to implement three-dimensional graphics drawing, image rendering, composition, layer processing, and the like.
[0122] The 2D graphics engine is a drawing engine for 2D drawing.
[0123] The kernel layer is a layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
[0124] It should be understood that the technical solutions in embodiments of this application may be applied to systems such as Android, iOS, and Harmony.
[0125] The technical solutions provided by this application can be used in a network with one or more access points (APs) and one or more non-AP station (referred to as a station in the following) .
[0126] The AP can be used by terminal devices (such as an electronic device as shown in FIG. 1 and FIG. 2) to access a wired or wireless network, and may be deployed at home, in a building, and in a park or other areas. The AP can be considered as a bridge that connects the wired network and the wireless network. For example, the AP can connect various wireless network clients together and then connect the wireless network to the Ethernet. Specifically, the AP can be a terminal device (such as a mobile phone) or a network device (such as a router) with a wireless fidelity (WiFi) chip. Alternatively, the AP point may be a device that supports a plurality of wireless local area networks (wireless local area network, WLAN) .
[0127] The AP may include a processor and a transceiver. The processor is configured to control and manage an action of the AP, and the transceiver is configured to receive or send information.
[0128] The station may be a wireless communication chip, a wireless sensor, a wireless communication terminal, or the like, and may also be referred to as a user. For example, the station may be a mobile phone supporting a Wi-Fi communication function, a tablet computer supporting a Wi-Fi communication function, a set-top box supporting a Wi-Fi communication function, a smart television supporting a Wi-Fi communication function, an intelligent wearable device supporting a Wi-Fi communication function, a vehicle-mounted communication device supporting a Wi-Fi communication function, a computer supporting a Wi-Fi communication function, or the like. The station may also support a plurality of wireless local area networks (wireless local area network, WLAN) .
[0129] The station may include a processor and a transceiver. The processor is configured to control and manage an action of the access point, and the transceiver is configured to receive or send information. The station can be an electronic device as shown in FIG. 1 and FIG. 2.
[0130] The AP and the station may be devices used in the internet of vehicles, internet of things nodes, sensors, or the like in the internet of things (internet of things, IoT) , smart cameras, smart remote controls, smart water or electricity meters, or the like in smart home, sensors in smart city, and the like.
[0131] FIG. 3 is a schematic diagram of a scenario according to an embodiment of this application.
[0132] In FIG. 3, three APs (AP1~AP3) and a station (STA1) are shown and AP1~AP3 provide network connections for STA1. Coverage areas of AP1, AP2 and AP3 (310, 320 and 330) overlap.
[0133] FIG. 4 is another schematic diagram of a scenario according to an embodiment of this application. AP4 and AP5 provide network connections for a second station (STA2) . Coverage areas of AP4 and AP5 (410 and 420) overlap.
[0134] Stations may roam between one AP and another AP in the overlapping area for better link quality and user experience. For example, as shown in FIG. 3, when a user carrying the STA1 walks inside the house between the first and the second floor, which is an overlapping area between the AP1 and the AP3, the STA1 may roam between the AP1 and the AP3 based on measured link quality of the connection between the STA1 and the AP1 and the connection between the STA1 and the AP3. For another example, when a user carrying the STA2 walks into an elevator located at an overlapping coverage area of the AP4 and the AP5, the STA2 may roam between the AP4 and the AP5 or the AP4 and cellular network based on the measured link quality of the connection between the STA2 and the AP4, the connection between the STA2 and the AP5 and the connection between the AP4 and cellular network.
[0135] Currently, the link quality between an AP and a station is obtained based on signals received from the AP. For example, the link quality is determined based on beacon received signal strength indicator (RSSI) . However, there are cases where the measured link quality based on the RSSI is high but a user actually has bad quality of experience (QoE) as the communication is always asymmetrical between the station and the AP. Therefore, a method to estimate link quality more accurately is needed.
[0136] FIG. 5 is a schematic diagram of a communication method provided by an embodiment of this application.
[0137] At 510, an electronic device transmits an i-th frame at a j-th transmission power, where the j-th transmission power is obtained by reducing an initial transmission power by j-1 times.
[0138] The electronic device can be the station as aforementioned in FIG. 3 and FIG. 4.
[0139] The i-th frame may be a data physical layer protocol data unit (PPDU) or a null data packet. Before transmitting the i-th frame, the electronic device may have transmitted the first to the (i-1) -th frames. The i-th frame is transmitted at a j-th transmission power, which is obtained by reducing an initial transmission power by j-1 times.
[0140] In this application, when the electronic device transmits the first frame, the transmission power is at an initial transmission power (or a first transmission power) . And during the transmission of the second to the i-th frames, the transmission power is reduced by j-1 times. The reduction in the transmission power for the second to the i-th frames is determined based on transmission results of the second to the (i-1) -th frames. For ease of understanding, we focus on the i-th frame to introduce the transmission power reduction process.
[0141] At 520, the electronic device determines a transmission result of the i-th frame. The transmission result of the i-th frame can be successful or failed.
[0142] If the AP receives the i-th frame successfully, the AP may transmit an acknowledgement (ACK) corresponding to the i-th frame to the electronic device, then the electronic device may determine the transmission of the i-th frame is successful. If the electronic device does not receive an ACK to the i-th frame in a preconfigured period of time (after transmitting the i-th frame) , the electronic device may determine the transmission of the i-th frame is failed.
[0143] At 530, if the transmission of the i-th frame is failed, the electronic device obtains a j-th consecutive retry number. In this application, the j-th consecutive retry number is the number of consecutive frame failure times at the j-th transmission power. In other words, the electronic device has failed in transmitting frames at the j-th transmission power for the j-th consecutive retry number after failing in transmitting the i-th frame.
[0144] The electronic device may keep a consecutive retry counter for every transmission power. For example, if the i-th frame is the first frame that the electronic device has transmitted at the j-th transmission power and it is failed, the j-th consecutive retry number is 1. If it is not the first time for which the electronic device has failed in transmitting a frame at the j-th transmission power, the electronic device can update the original j-th consecutive retry number to obtain the updated j-th consecutive retry number.
[0145] In some embodiments, if the transmission of the i-th frame is successful, the electronic device can determine a (j+1) -th transmission power based on the j-th transmission power and transmit an (i+1) -th frame to the AP at the (j+1) -th transmission power.
[0146] In this application, the (j+1) -th transmission power is obtained by reducing the j-th transmission power. Similarly, before transmitting the i-th frame, every time the electronic device transmits a frame successfully, the previous transmission power can be reduced to obtain the next transmission power. Therefore, before transmitting the i-th frame, the electronic device may have transmitted j-1 frames successfully, therefore, the initial transmission power corresponding to the first frame is reduced by j-1 times to obtain the j-th transmission power. The j may be an integer smaller than or equal to i. And for every transmission power, the electronic device can keep a consecutive retry number to determine whether the corresponding transmission power is too small to be detected by the AP.
[0147] It is understandable that the electronic device may have transmitted frames using transmission powers: the initial transmission power (or the first transmission power) , the second transmission power, the third transmission power, …, and the (j-1) -th transmission power.
[0148] In some embodiments, the reduction between neighboring transmission power can be constant, denoted as P_reducion. In other words, an amount of reduction is the same for the j-1 times of reductions. The P_reduction can be set differently. A smaller P_reducion may be set if we need a more accurate transmit margin to disconnection and a bigger P_reducion may be set if a shorter time is needed for obtaining the transmit margin to disconnection (ashorter convergence time is needed) . In fact, there is a tradeoff between the two aspects to determine a probable P_reducion.
[0149] For example, the reduction between neighboring transmission power can be 1dB, 2dB, …, etc.
[0150] In some other embodiments, the amount of reduction between the j-th transmission power and a (j-1) -th transmission power is in negative correlation with the j, which means power reductions between neighboring transmission power levels change. For example, the reductions between the second transmission power and the initial transmission power, the third transmission power and the second transmission power, the fourth transmission power and the third transmission power, …, and the j-th transmission power and the (j-1) -th transmission power can be denoted as P_reducion_1, P_reducion_2, P_reducion_3, P_reducion_4, …, and P_reducion_j, respectively. The P_reducion_1 ≥ P_reducion_2 ≥ P_reducion_3 ≥P_reducion_4 ≥…≥ P_reducion_j.
[0151] For example, the amount of reduction between the j-th transmission power and the (j-1) -th transmission power is in linear relationship or non-linear relationship with j.
[0152] In this scenario, the amount of reduction for obtaining the next transmission power level is reduced with reduction in transmission power. In fact, the transmission power is reduced so that we can determine a transmit margin to disconnection for the link between the electronic device and the AP. The transmit margin to disconnection indicates a minimum transmission power (denoted as Tx power limit) for frames from the electronic device to be detected by the AP. If the present transmission power is relatively big (compared with the initial transmission power) , it is less likely that the present transmission power is close to the Tx power limit, a greater amount of reduction to obtain transmission power for the following frame may make a shorter convergence time. Also, if the initial transmission power has been reduced by many times, it is possible that the present transmission power is close to the Tx power limit, a smaller amount of reduction in the present transmission power may result in a more accurate result. In this way, there can be a balance between the convergence time and accuracy.
[0153] At 540, if the j-th consecutive retry number is equal to or higher than a first threshold, the electronic device can determine a transmit margin to disconnection based on the j-th transmission power.
[0154] That the j-th consecutive retry number is higher than or equal to a first threshold means that the electronic device has failed in transmitting frames to the AP at the j-th transmission power for several consecutive times.
[0155] If a frame is failed, it is possible that the transmission power is too small to be detected by the receiver. In some embodiments, there may be other reasons for a frame to be failed instead of the problem of the link connectivity. For example, a frame may be failed due to enhanced distributed channel access (EDCA) collisions. However, if several consecutive frames are failed, it is more possible that the frames are failed as a result of low transmission power (physical failure) . Therefore, it is possible to derive a transmit margin to disconnection based on the j-th transmission power if several consecutive frames at the j-th transmission power have failed.
[0156] The first threshold is an integer. The first threshold can be set according to different demands. For example, the transmit margin to disconnection can be obtained in a relatively shorter time if the first threshold is small and the derived transmit margin to disconnection is more reliable if the first threshold is bigger.
[0157] For example, the first threshold can be 2, 3, 4, 5, 6…, etc.
[0158] In some embodiments, if the j-th consecutive retry number is lower than the first threshold, the electronic device can transmit an (i+1) -th frame to the AP at the j-th transmission power. In other words, the electronic device transmits a frame at the same transmission power as that for the j-th frame.
[0159] If the j-th frame is failed, it is likely that the j-th transmission power is close to the Tx power limit, however, to exclude the possibility of other reasons for the failure such as EDCA collisions or other temporary reasons, the electronic device transmits the next frame at the same transmission power for verification.
[0160] At 540, the transmit margin to disconnection can be a difference between the initial transmission power and the j-th transmission power. The initial transmission power can for example be full power (P_full) for the electronic device. In some embodiments, the initial transmission power can also be 0.8*P_full, 0.7*P_full or other values.
[0161] In some embodiments, the i frames can be transmitted at a rate lower than a second threshold, e.g., at a lowest rate for the electronic device to ensure a stable and reliable link quality estimation result. The i frames can be transmitted without using (request to send) RTS protection.
[0162] It is to be noted in previous description, the electronic device may update the j-th consecutive retry number when the i-th frame is failed and then compare the j-th consecutive number with the first threshold. In some embodiments, it is possible that the electronic device may not update the j-th consecutive retry number before comparing the j-th consecutive retry number with the first threshold. In this scenario, the j-th consecutive retry number is actually the number after the (i-1) -th frame rather than after the i-th frame. The electronic device can update the j-th consecutive retry number after determining it is smaller than the first threshold.
[0163] In some embodiments, a collision rate can be determined based on transmission results of frames corresponding to transmission power higher than the j-th transmission power when the i-th frame is failed and the j-th consecutive retry number is equal to or greater than the first threshold.
[0164] As aforementioned, frames are failed at the j-th transmission power mainly as a result of low transmission power, and therefore, the j-th transmission power can be used to derive the transmission margin to disconnection. Frames failed with transmission power higher than the j-th transmission power may result from other reasons such as collisions. It is therefore possible to calculate the collision rate for the link between the electronic device and the AP using transmission results of frames with higher transmission power.
[0165] In one implementation, the collision rate can be estimated by calculating a ratio of frames failed and all the frames with transmission power higher than the j-th transmission power.
[0166] In addition, accuracy level can be determined using the number of frames with a higher transmission power than the j-th transmission power.
[0167] If a higher accuracy level is needed for the collision rate, steps 510 to 540 may be carried out several times until the required accuracy is achieved.
[0168] Following 802.11ac 5GHz 20MHz association, a transmission result of a series of pings (100Byte, 50msec apart) with lowest possible transmission rate is shown in table 1. Table 1
[0169] As shown in Table 1, the initial transmission power (corresponding transmission power reduction is 0) is 16dB. The transmission power reduction is 1dB for neighboring transmission power levels and the first threshold is five.
[0170] At the initial transmission power or a first transmission power (16dB) , the electronic device successfully transmits a first frame (first try at 16dB) .
[0171] After determining the first frame is successful (receiving an ACK corresponding to the first frame) , the electronic device reduces the transmission power by 1dB to obtain a second transmission power (15dB) and transmits a second frame (first try at 15dB) successfully.
[0172] The electronic device further reduces the transmission power by 1dB to obtain a third transmission power (14dB) and transmits a third frame at 14dB (first try) . The electronic device determines the third frame is failed and transmits the fourth frame still at 14dB (second try) .
[0173] Then the electronic device transmits a fifth frame and a sixth frame at a fourth transmission power 13dB and a fifth transmission power 12dB respectively.
[0174] The electronic device then determines a sixth transmission power 12dB and transmits a seventh frame (first try) , an eighth frame (second try) and a ninth frame (third try) at 12dB. The transmission of the seventh frame, the eighth frame are successful and the transmission of the ninth frame is failed.
[0175] The electronic device determines a seventh transmission power at 10dB and transmits five frames which are all failed.
[0176] Therefore, the electronic device can determine a transmit margin to disconnection based on the last transmission power 10dB. The transmit margin to disconnection is 16dB-10dB=6dB for this scenario.
[0177] Further, based on transmission results of frames corresponding to higher transmission power (16dB~11dB) , collision rates can be calculated as 3 / 9=1 / 3 and corresponding accuracy level is 1 / 9 for this example.
[0178] Therefore, based on previous description, the transmit margin to disconnection can be calculated.
[0179] FIG. 6 is a schematic diagram showing a communication method according to an embodiment of this application.
[0180] At 610, the electronic device determines a transmission power reduction=0 and transmits a frame at 620 correspondingly at an initial transmission power (e.g., a full transmission power) .
[0181] Then the electronic device determines transmission result of the frame at 630 and if the frame is acknowledged (ACKed) , the electronic device updates the transmission power reduction and resets the consecutive retry number for the updated transmission power reduction to 0 at 640.
[0182] If the frame is not acknowledged, the electronic device determines if the present consecutive retry number≥threshold at 660.
[0183] If the present consecutive retry number < threshold, the electronic device updates the consecutive retry number at 650.
[0184] If the present consecutive retry number ≥ threshold, the electronic device can determine the transmit margin to disconnection at 670. The transmit margin to disconnection is the present transmission power reduction.
[0185] It is to be noted that the consecutive retry number is updated after comparing it with the threshold. In some embodiments, the consecutive retry number is updated first and then is compared with the threshold, as shown in FIG. 7.
[0186] Apart from determining a roaming method at overlapped areas for coverage areas of different APs, in some embodiments, the transmit margin to disconnection can also be used to determine a probable transmit power, a modulation method antenna gain, a coding rate or other parameters for the link between the electronic device and the AP.
[0187] In some embodiments, to provide better user experience, the transmit margin to disconnection can be displayed on a screen of the electronic device to inform link quality to a user.
[0188] The link quality can be determined at least partly based on the calculated transmit margin to disconnection.
[0189] In some embodiments, as transmission power of the electronic device is usually smaller than that of the AP, it is the electronic device (the station) that dictates the overall link quality. The link quality can be determined based on the transmit margin to disconnection. For example, based on the transmit margin to disconnection, the link quality can be displayed on the screen by icons of an interface.
[0190] FIG. 8 is a schematic diagram showing an exemplary icon for excellent, good, fair and weak link quality.
[0191] In some embodiments, for more reliable link quality indication, the transmit margin to disconnection (TxM) can be combined with RSSI to determine the overall link quality.
[0192] For one example, if RSSI<-50dBm and TxM≥20dB, the link quality can be determined as excellent; if -50≤RSSI<-60dBm and TxM≥20dB, the link quality can be determined as good; if -60≤RSSI<-70dBm or 10≤TxM<20dB, the link quality can be determined as fair; and if RSSI≥-70dBm or TxM<10dB, the link quality can be determined as weak.
[0193] It is to be noted that the link quality thresholds can be configured based on specific environment and conditions. It is also to be noted that the link quality can be shown to user in other ways, such as other icons or shown in texts.
[0194] FIG. 9 is a schematic block diagram according to an embodiment of this application.
[0195] As shown in FIG. 9, the electronic device 900 may include a receiver 901, a processor 902, a memory 903, and a transmitter 904. The memory 903 may be configured to store code, instructions, and the like executed by the processor 902.
[0196] It should be understood that the processor 902 may be an integrated circuit chip and has a signal processing capability. In an implementation process, steps of the foregoing method embodiments may be completed by using a hardware integrated logic circuit in the processor, or by using instructions in a form of software. The processor may be a general purpose processor, a central processing unit (CPU) , a graphics processing unit (GPU) , a neural processing unit (NPU) , a system on chip (SoC) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The processor may implement or perform the methods, the steps, and the logical block diagrams that are disclosed in the embodiments of the present application. The general purpose processor may be a microprocessor, or the processor may be any conventional processor or the like. The steps of the methods disclosed with reference to the embodiments of the present application may be directly performed and completed by the processor, or may be performed and completed by using a combination of hardware in the processor and a software module. The software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory, and the processor reads information in the memory and completes the steps of the foregoing methods performed by the electronic device in combination with hardware in the processor.
[0197] It may be understood that the memory 903 in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory. The nonvolatile memory may be a read-only memory (Read-Only Memory, ROM) , a programmable read-only memory (Programmable ROM, PROM) , an erasable programmable read-only memory (Erasable PROM, EPROM) , an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) , or a flash memory. The volatile memory may be a random access memory (Random Access Memory, RAM) and is used as an external cache. By way of example rather than limitation, many forms of RAMs may be used, and are, for example, a static random access memory (Static RAM, SRAM) , a dynamic random access memory (Dynamic RAM, DRAM) , a synchronous dynamic random access memory (Synchronous DRAM, SDRAM) , a double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM) , an enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM) , a synchronous link dynamic random access memory (Synchronous link DRAM, SLDRAM) , and a direct rambus random access memory (Direct Rambus RAM, DR RAM) .
[0198] It should be noted that the memory in the electronic device and the methods described in this specification includes but is not limited to these memories and a memory of any other appropriate type.
[0199] The present application provides a computer readable storage medium including instructions. When the instructions run on an electronic device, the electronic device is enabled to perform the aforementioned method.
[0200] The present application provides a chip system. The chip system includes a memory and a processor, and the memory is configured to store a computer program, and the processor is configured to invoke the computer program from the memory and run the computer program, so that an electronic device on which the chip system is disposed performs the aforementioned method.
[0201] The present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is enabled to perform the aforementioned method.
[0202] In the embodiments of the present application, “at least one” means one or more, and “aplurality of” means two or more. The term “and / or” describes an association relationship between associated objects and represents that three relationships may exist. For example, A and / or B may represent the following three cases: only A exists, both A and B exist, and only B exists, where A and B may be singular or plural. The character “ / ” generally indicates an “or” relationship between the associated objects. “At least one of the following” and a similar expression thereof refer to any combination of these items, including any combination of one item or a plurality of items. For example, at least one of a, b, and c may indicate: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c may be singular or plural.
[0203] A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, units and algorithm steps can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this application.
[0204] It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, refer to a corresponding process in the foregoing method embodiment. Details are not described herein again.
[0205] In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely an example. For example, the unit / module division is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
[0206] The units described as separate parts may be or may not be physically separate, and parts displayed as units may be or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.
[0207] In addition, functional units in the embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.
[0208] When the functions are implemented in a form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer readable storage medium. Based on such an understanding, the technical solutions in this application essentially, or the part contributing to the prior art, or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or some of the steps of the methods described in the embodiments of this application. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM) , a random access memory (RAM) , a magnetic disk, or an optical disc.
[0209] The foregoing descriptions are merely specific implementations of this application, but are not intended to limit the protection scope of this application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in this application shall fall within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Claims
1.A communication method performed by an electronic device, comprising:transmitting an i-th frame to an access point (AP) at a j-th transmission power, wherein the j-th transmission power is obtained by reducing an initial transmission power by j-1 times, i and j are integers, i>0, j>0, and i≥j;determining a transmission result of the i-th frame;if the transmission of the i-th frame is failed, obtaining a j-th consecutive retry number, wherein the j-th consecutive retry number is the number of consecutive frame failure times at the j-th transmission power; andif the j-th consecutive retry number is equal to or higher than a first threshold, determining a transmit margin to disconnection based on the j-th transmission power.2.The method according to claim 1, wherein if the j-th consecutive retry number is lower than the first threshold, the method further comprises:transmitting an (i+1) -th frame to the AP at the j-th transmission power.3.The method according to claim 1 or 2, wherein if the transmission of the i-th frame is successful, the method further comprises:determining a (j+1) -th transmission power based on the j-th transmission power; andtransmitting an (i+1) -th frame to the AP at the (j+1) -th transmission power.4.The method according to any one of claims 1 to 3, wherein an amount of reduction is the same for the (j-1) times.5.The method according to any one of claims 1 to 4, wherein if the transmission of the i-th frame is failed and the j-th consecutive retry number is equal to or higher than the first threshold, the method further comprises:determining a collision rate between the electronic device and the AP based on transmission results of frames corresponding to transmission power bigger than the j-th transmission power.6.The method according to claim 5, wherein the first to the (i-1) -th frames are transmitted at a rate lower than a second threshold.7.The method according to any one of claims 1 to 3, wherein an amount of reduction between the j-th transmission power and a (j-1) -th transmission power is in negative correlation with the j, j>1.8.The method according to any one of claims 1 to 7, wherein the method further comprises:displaying a first interface on a screen of the electronic device, wherein the first interface indicates a connection quality between the electronic device and the AP, and the connection quality is associated with the transmit margin to disconnection.9.The method according to claim 8, wherein the connection quality is further associated with a received signal strength indicator (RSSI) between the electronic device and the AP.10.A electronic device, wherein the electronic device is configured to perform the method according to any one of claims 1 to 9.11.A computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions run on a device, the device is enabled to perform the method according to any one of claims 1 to 9.12.A computer program product, wherein when the computer program product runs on a device, the device is enabled to perform the method according to any one of claims 1 to 9.13.A chip system, comprising a memory and a processor, wherein the memory is configured to store a computer program, and the processor is configured to invoke the computer program from the memory and run the computer program, so that a device on which the chip system is disposed performs the method according to any one of claims 1 to 9.