An antenna switching method, a terminal and a storage medium
By detecting and switching the second physical antenna to the center position when the terminal is in landscape mode, the problem of degraded signal transmission and reception performance of the main antenna is solved, thereby improving signal transmission and reception performance and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-02-01
- Publication Date
- 2026-07-24
Smart Images

Figure CN120454894B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an antenna switching method, a terminal, and a storage medium. Background Technology
[0002] Typically, multiple physical antennas are incorporated into a terminal design. Among these, the antenna with better over-the-air (OTA) performance is designated as the terminal's main antenna, while the antenna with poorer OTA performance is designated as the terminal's diversity antenna. The main antenna is used for both signal transmission and reception, while the diversity antenna is used solely for signal reception.
[0003] The main antenna is typically located at the bottom or top of the terminal. In some scenarios, when users are using applications installed on the terminal, they may operate the terminal in landscape mode, holding the top or bottom of the terminal. This can significantly degrade the signal transmission and reception performance of the main antenna, thereby weakening the terminal's overall signal transmission and reception capabilities. Summary of the Invention
[0004] The purpose of this application is to provide an antenna switching method, a terminal, and a storage medium to improve the signal transmission and reception performance of the terminal, thereby enhancing the user experience. The specific technical solution is as follows:
[0005] Firstly, in order to achieve the above objectives, embodiments of this application provide an antenna switching method, the method comprising:
[0006] The detection method determines whether the terminal meets preset detection conditions; wherein the detection conditions include: the main antenna of the terminal is a first physical antenna located at a specified position of the terminal; the specified position is the top position of the terminal, or the bottom position of the terminal;
[0007] When the terminal is detected to meet the detection conditions, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna located in the middle of the terminal;
[0008] Acquire first quality data and second quality data; wherein, the first quality data represents the signal transmission and reception performance of the terminal when the main antenna of the terminal is the first physical antenna; the second quality data represents the signal transmission and reception performance of the terminal when the main antenna of the terminal is the second physical antenna; the quality data includes: lag information of the application running in the terminal, and / or, the strength parameters of the signal received by the terminal;
[0009] When the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data, the main antenna of the terminal is switched from the second physical antenna to the first physical antenna.
[0010] As can be seen from the above, the solution provided in this embodiment, when the terminal's main antenna is the first physical antenna located at the top or bottom of the terminal, may result in poor signal transmission and reception performance. Therefore, the terminal's main antenna is switched from the first physical antenna to the second physical antenna located in the middle of the terminal. Furthermore, based on the first quality data and the second quality data, the signal transmission and reception performance of the terminal is compared when the main antenna is the first physical antenna and when the main antenna is the second physical antenna. If the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data, it indicates that the terminal's signal transmission and reception performance is higher when the main antenna is the first physical antenna than when the main antenna is the second physical antenna. Therefore, the terminal's main antenna is switched from the second physical antenna to the first physical antenna. In other words, the physical antenna that provides better signal transmission and reception performance can be used as the main antenna, thereby improving the terminal's signal transmission and reception performance.
[0011] In one embodiment of this application, the detection conditions further include: the terminal is in landscape mode and the network connection of the terminal is normal;
[0012] The detection of whether the terminal meets the preset detection conditions includes:
[0013] Detect whether the network connection of the terminal is in a normal state;
[0014] When the network connection of the terminal is in a normal state, detect whether the terminal is in landscape mode;
[0015] When the terminal is in landscape mode, it is detected whether the main antenna of the terminal is the first physical antenna located at a specified position on the terminal;
[0016] When the main antenna of the terminal is the first physical antenna located at a designated position on the terminal, it is determined that the terminal meets the detection condition.
[0017] As can be seen from the above, in this embodiment of the application, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna only when the network connection of the terminal is in a normal state, the terminal is in landscape mode, and the main antenna is located at a designated position on the terminal. This can avoid the main antenna frequently switching between the first physical antenna and the second physical antenna, improve the stability of the terminal, and reduce the power consumption of the terminal.
[0018] In one embodiment of this application, before detecting whether the main antenna of the terminal is a first physical antenna located at a designated location of the terminal, the method further includes:
[0019] Obtain the current operating frequency band of the terminal as the target frequency band;
[0020] The main antenna for the target frequency band is determined from among the multiple antennas in the terminal;
[0021] The step of detecting whether the main antenna of the terminal is the first physical antenna located at a specified location on the terminal includes:
[0022] Detect whether the main antenna of the target frequency band in the terminal is the first physical antenna located at a specified position in the terminal.
[0023] As can be seen from the above, in this embodiment, the primary antenna of the target frequency band in which the terminal is currently operating is detected to determine whether the terminal's signal transmission and reception performance in the target frequency band is affected. Subsequently, using the physical antenna that enables the terminal to have better signal transmission and reception performance in the target frequency band as the primary antenna can improve the terminal's signal transmission and reception performance in the target frequency band, thereby improving the user experience.
[0024] In one embodiment of this application, the quality data includes: lag information of the application running in the terminal, and the strength parameters of the signal received by the terminal;
[0025] The signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data in the following ways:
[0026] The signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than that represented by the second stuttering information in the second quality data, and the signal transmission and reception performance represented by the first strength parameter in the first quality data is higher than that represented by the second strength parameter in the second quality data.
[0027] or,
[0028] The signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than that represented by the second stuttering information in the second quality data, and the signal transmission and reception performance represented by the first strength parameter in the first quality data is lower than that represented by the second strength parameter in the second quality data.
[0029] As can be seen from the above, in this embodiment, when the signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than that represented by the second stuttering information in the second quality data, it is determined that the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data. That is, when the signal transmission and reception performance represented by the stuttering information and the strength parameter in the quality data are inconsistent, the priority of the stuttering information is set higher than the priority of the strength parameter. The stuttering situation of the application represented by the stuttering information directly affects the user experience. The primary antenna of the terminal is determined according to the stuttering information to improve the user experience.
[0030] In one embodiment of this application, the strength parameter includes at least one of the following:
[0031] The RSRP of the reference signal received by the terminal, the RSSI of each signal received by the terminal, the RSRQ of the reference signal received by the terminal, and the bit error rate of the service signal received by the terminal.
[0032] As can be seen from the above, in this embodiment, the strength parameters of the signal received by the terminal are obtained. The RSRP, RSSI, RSRQ, and bit error rate among these strength parameters all represent the signal transmission and reception performance of the terminal. Subsequently, based on the lag information of the applications running on the terminal, the physical antenna that enables better signal transmission and reception performance of the terminal can be determined as the primary antenna, thereby improving the terminal's signal transmission and reception performance.
[0033] In one embodiment of this application, the signal transceiver performance represented by the first strength parameter in the first quality data is higher than the signal transceiver performance represented by the second strength parameter in the second quality data, including at least one of the following:
[0034] The RSRP of the reference signal received by the terminal in the first strength parameter is greater than the RSRP of the reference signal received by the terminal in the second strength parameter;
[0035] The RSSI of each signal received by the terminal in the first strength parameter is greater than the RSSI of each signal received by the terminal in the second strength parameter;
[0036] The RSRQ of each signal received by the terminal in the first strength parameter is greater than the RSRQ of each signal received by the terminal in the second strength parameter.
[0037] The bit error rate of the service signal received by the terminal in the first strength parameter is less than the bit error rate of the service signal received by the terminal in the second strength parameter.
[0038] In one embodiment of this application, the lag information includes at least one of the following: the resolution of the image displayed by the application running on the terminal, and the latency of the application running on the terminal.
[0039] As can be seen from the above, in this embodiment, the lag information of the applications running on the terminal is obtained. The resolution of the image displayed by the application and the latency of the application running in the lag information can represent the signal transmission and reception performance of the terminal. Subsequently, based on the lag information of the applications running on the terminal, the physical antenna that makes the terminal's signal transmission and reception performance better can be determined as the main antenna, which can improve the terminal's signal transmission and reception performance.
[0040] In one embodiment of this application, the signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than the signal transmission and reception performance represented by the second stuttering information in the second quality data, including at least one of the following:
[0041] The resolution of the image displayed by the application running on the terminal in the first lag information is greater than the resolution of the image displayed by the application running on the terminal in the second lag information;
[0042] The latency of the application running on the terminal in the first lag information is less than the latency of the application running on the terminal in the second lag information.
[0043] In one embodiment of this application, the method is applied to the CPU in the terminal;
[0044] The acquisition of the first quality data and the second quality data includes:
[0045] The CPU acquires first stuttering information of the application running in the terminal from the recorded data, and acquires first strength parameters of the signal received by the terminal from the modem processor in the terminal to obtain first quality data; wherein, the first stuttering information is: stuttering information of the application running in the terminal when the main antenna of the terminal is the first physical antenna; the first strength parameter is: strength parameters of the signal received by the terminal when the main antenna of the terminal is the first physical antenna;
[0046] The CPU acquires the second stuttering information of the application running in the terminal recorded in the record, and acquires the second strength parameter of the signal received by the terminal from the modem processor to obtain the second quality data; wherein, the second stuttering information is the stuttering information of the application running in the terminal when the main antenna of the terminal is the second physical antenna; the second strength parameter is the strength parameter of the signal received by the terminal when the main antenna of the terminal is the second physical antenna.
[0047] In one embodiment of this application, before switching the main antenna of the terminal from the first physical antenna to the second physical antenna located in the middle of the terminal when the detection condition is met, the method further includes:
[0048] Check whether the preset testing cycle has been reached;
[0049] The step of switching the main antenna of the terminal from the first physical antenna to the second physical antenna located in the middle of the terminal when the terminal is detected to meet the detection condition includes:
[0050] When the terminal is detected to meet the detection conditions and the detection period is reached, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna located in the middle of the terminal.
[0051] As can be seen from the above, in this embodiment of the application, when the detection period is reached, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna, which can avoid the main antenna frequently switching between the first physical antenna and the second physical antenna, thereby improving the stability of the terminal.
[0052] In one embodiment of this application, after obtaining the first quality data and the second quality data, the method further includes:
[0053] When the signal transmission and reception performance represented by the first quality data is not higher than that represented by the second quality data, the main antenna of the terminal is kept as the second physical antenna.
[0054] As can be seen from the above, in this embodiment, the signal transmission and reception performance represented by the first quality data is not higher than that represented by the second quality data, indicating that the performance of the second physical antenna is better than that of the first physical antenna, or that the performance of the second physical antenna is comparable to that of the first physical antenna. In other words, if the signal transmission and reception performance of the terminal using the second physical antenna as the primary antenna is better, or if the difference in signal transmission and reception performance between the second and first physical antennas as primary antennas is not significant, then the second physical antenna remains the primary antenna of the terminal. This improves the terminal's signal transmission and reception performance without requiring antenna switching, thus reducing the terminal's power consumption.
[0055] In one embodiment of this application, the method is applied to the CPU in the terminal;
[0056] The step of switching the main antenna of the terminal from the first physical antenna to the second physical antenna located in the middle of the terminal includes:
[0057] The CPU sends an antenna switching command to the controller in the terminal;
[0058] After receiving the antenna switching command, the controller disconnects the link of the first physical antenna used for transmitting signals and connects the link of the second physical antenna located in the middle of the terminal used for transmitting signals.
[0059] As can be seen from the above, in this embodiment, the controller switches the terminal's primary antenna from the first physical antenna to the second physical antenna to obtain the terminal's signal transmission and reception performance when the second physical antenna is used as the primary antenna. Subsequently, by comparing the terminal's signal transmission and reception performance when the first physical antenna is used as the primary antenna with the terminal's signal transmission and reception performance when the second physical antenna, located in the middle of the terminal, is used as the primary antenna, the physical antenna that provides better signal transmission and reception performance can be determined as the primary antenna, thereby improving the terminal's signal transmission and reception performance.
[0060] Secondly, embodiments of this application also provide a terminal, including:
[0061] One or more processors and memory;
[0062] The memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, which the one or more processors call to cause the terminal to execute any of the antenna switching methods described above.
[0063] Thirdly, embodiments of this application also provide a computer-readable storage medium including a computer program that, when run on a terminal, causes the terminal to execute any of the antenna switching methods described above.
[0064] Fourthly, embodiments of this application also provide a computer program product, the computer program product comprising executable instructions, which, when executed on a terminal, cause the terminal to perform any of the antenna switching methods described above.
[0065] Fifthly, embodiments of this application also provide a chip system applied to a terminal. The chip system includes one or more processors, which are used to invoke computer instructions to cause the terminal to input data into the chip system and execute any of the antenna switching methods described above to process the data and output the processing result.
[0066] The beneficial effects of the solutions provided in the embodiments of the second, third, fourth and fifth aspects above can be found in the beneficial effects of the solutions provided in the embodiments of the first aspect above. Attached Figure Description
[0067] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 A structural diagram of a terminal provided in an embodiment of this application;
[0069] Figure 2 A software structure block diagram of a terminal provided in an embodiment of this application;
[0070] Figure 3a A schematic diagram illustrating a first type of user holding the terminal with both hands, provided in an embodiment of this application;
[0071] Figure 3b A schematic diagram illustrating a second type of user holding the terminal with both hands, provided in an embodiment of this application;
[0072] Figure 4 A flowchart of the first antenna switching method provided in the embodiments of this application;
[0073] Figure 5 A flowchart of the second antenna switching method provided in the embodiments of this application;
[0074] Figure 6 A flowchart of the third antenna switching method provided in the embodiments of this application;
[0075] Figure 7 A flowchart illustrating the fourth antenna switching method provided in this application embodiment;
[0076] Figure 8 This is a structural diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0077] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0078] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. For example, "first instruction" and "second instruction" are used to distinguish different user instructions, but do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different.
[0079] It should be noted that, in this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0080] The antenna switching method provided in this application is applied to a terminal. The terminal can be a mobile phone, tablet computer, laptop computer, personal digital assistant (PDA), smartwatch, netbook, wearable electronic device, augmented reality (AR) device, virtual reality (VR) device, in-vehicle device, smart car, robot, smart glasses, smart TV, or any other terminal equipped with an antenna. This allows the terminal to determine which physical antenna is its primary antenna, thereby improving its signal transmission and reception performance.
[0081] For example, Figure 1 A structural diagram of terminal 100 is shown. Terminal 100 may include a processor 110, a display screen 120, a camera 130, internal memory 140, a Subscriber Identification Module (SIM) card interface 150, a Universal Serial Bus (USB) interface 160, a charging management module 170, a battery management module 171, a battery 172 with battery cells and battery protection devices, a sensor module 180, a mobile communication module 190, a wireless communication module 200, antenna 1, and antenna 2, etc. The sensor module 180 may include a pressure sensor 180A, a fingerprint sensor 180B, a touch sensor 180C, an ambient light sensor 180D, etc.
[0082] Antenna 1 is used by the mobile communication module 190 for signal transmission and reception. Antenna 2 is used by the wireless communication module 200 for signal transmission and reception. Antenna 1 and antenna 2 are merely examples and do not limit the number of antennas included in the terminal.
[0083] Among them, the better-performing antenna is the terminal's main antenna, which is used for both signal transmission and reception and is usually located at the top or bottom of the terminal. The worse-performing antenna is the terminal's diversity antenna, which is used only for signal reception and is usually located in the middle of the terminal.
[0084] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal 100. In other embodiments of this application, the terminal 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0085] Processor 110 may include one or more processing units, such as a Central Processing Unit (CPU), an Application Processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, terminal 100 may also include one or more processors 110. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. In other embodiments, processor 110 may also include a memory for storing instructions and data. For example, the memory in processor 110 may be a cache memory. This memory can store instructions or data that processor 110 has just used or is repeatedly used. If processor 110 needs to reuse the instruction or data, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the terminal 100 in processing data or executing instructions.
[0086] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an Inter-Integrated Circuit (I2C) interface, an Inter-Integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI) interface, a General-Purpose Input / Output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. The USB interface 160 is a USB standard-compliant interface, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. The USB interface 160 can be used to connect a charger to charge the terminal 100, and can also be used for data transfer between the terminal 100 and peripheral devices. The USB interface 160 can also be used to connect headphones for audio playback.
[0087] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are for illustrative purposes only and do not constitute a structural limitation on the terminal 100. In other embodiments of this application, the terminal 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.
[0088] The wireless communication function of terminal 100 can be implemented through antenna 1, antenna 2, mobile communication module 190, wireless communication module 200, modem processor and baseband processor.
[0089] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0090] Terminal 100 implements display functions through a GPU, display screen 120, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 120 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0091] The display screen 120 is used to display images, videos, etc. The display screen 120 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 (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal 100 may include one or more display screens 120.
[0092] In some embodiments of this application, when the display panel uses materials such as OLED, AMOLED, and FLED, the above-mentioned Figure 1 The display screen 120 can be bent. Here, "the display screen 120 can be bent" means that the display screen can be bent to any angle at any part and can maintain that angle. For example, the display screen 120 can be folded from the middle left to right. It can also be folded from the middle up and down.
[0093] The display screen 120 of terminal 100 can be a flexible screen. Currently, flexible screens are attracting much attention due to their unique characteristics and enormous potential. Compared to traditional screens, flexible screens are highly flexible and bendable, providing users with new interaction methods based on their bendability and meeting more user needs for terminals. For terminals equipped with foldable displays, the foldable display can switch between a small screen in folded mode and a large screen in unfolded mode at any time. Therefore, users are increasingly using split-screen functionality on terminals equipped with foldable displays.
[0094] Terminal 100 can perform shooting functions through ISP, camera 130, video codec, GPU, display 120 and application processor, wherein camera 130 includes a front camera and a rear camera.
[0095] The ISP is used to process data fed back from the camera 130. For example, during shooting, when the shutter is opened, light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can perform algorithmic optimization of image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 130.
[0096] Camera 130 is used to capture photos or videos. An object is projected onto a photosensitive element through a lens, generating an optical image. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to an ISP (Internet Service Provider) for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP (Digital Signal Processor) for processing. The DSP converts the digital image signal into standard red-green-blue (RGB), YUV, or other image signals. In some embodiments, terminal 100 may include one or N cameras 130, where N is a positive integer greater than 1.
[0097] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when terminal 100 selects a frequency point, the DSP can perform Fourier transforms on the frequency energy.
[0098] Video codecs are used to compress or decompress digital video. Terminal 100 may support one or more video codecs. Thus, terminal 100 can play or record video in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, and MPEG 4.
[0099] NPU stands for Neural Network (NN) computing processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs can enable intelligent cognitive applications in terminals, such as image recognition, facial recognition, speech recognition, and text understanding.
[0100] The internal memory 140 can be used to store one or more computer programs, which include instructions. The processor 110 can execute the instructions stored in the internal memory 140, thereby causing the terminal 100 to perform the antenna switching method provided in some embodiments of this application, as well as various applications and data processing. The internal memory 140 may include a program storage area and a data storage area. The program storage area may store the operating system; it may also store one or more applications (such as a gallery, contacts, etc.). The data storage area may store data created by the terminal 100 during use (such as photos, contacts, etc.). Furthermore, the internal memory 140 may include high-speed random access memory and non-volatile memory, such as one or more disk storage components, flash memory components, Universal Flash Storage (UFS), etc. In some embodiments, the processor 110 can execute instructions stored in the internal memory 140 and / or instructions stored in memory disposed in the processor 110, thereby causing the terminal 100 to perform the antenna switching method provided in the embodiments of this application, as well as other applications and data processing.
[0101] The internal memory 140 can be used to store the relevant program of the antenna switching method provided in the embodiments of this application. The processor 110 can be used to call the relevant program of the antenna switching method stored in the internal memory 140 when displaying information, and execute the antenna switching method of the embodiments of this application.
[0102] The sensor module 180 may include a pressure sensor 180A, a fingerprint sensor 180B, a touch sensor 180C, an ambient light sensor 180D, etc.
[0103] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 120. Pressure sensor 180A can be of many types, such as resistive pressure sensor, inductive pressure sensor, or capacitive pressure sensor. A capacitive pressure sensor can include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes, and terminal 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 120, terminal 100 detects the touch operation based on pressure sensor 180A. Terminal 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed; when a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0104] The fingerprint sensor 180B is used to collect fingerprints. The terminal 100 can use the collected fingerprint characteristics to perform functions such as unlocking, accessing application locks, taking photos, and answering incoming calls.
[0105] Touch sensor 180C, also known as a touch device, can be disposed on display screen 120. The touch sensor 180C and display screen 120 together form a touchscreen, also known as a touch display. Touch sensor 180C is used to detect touch operations applied to or near it. Touch sensor 180C can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 120. In other embodiments, touch sensor 180C may also be disposed on the surface of terminal 100, and in a different location from display screen 120.
[0106] The ambient light sensor 180D is used to sense the ambient light intensity. The terminal 100 can adaptively adjust the brightness of the display screen 120 based on the sensed ambient light intensity. The ambient light sensor 180D can also be used to automatically adjust the white balance during shooting. The ambient light sensor 180D can also transmit environmental information about the device's location to the GPU.
[0107] The ambient light sensor 180D is also used to acquire the brightness, light ratio, color temperature, and other parameters of the environment in which the camera 130 captures images.
[0108] Figure 2This is a software architecture block diagram for a terminal to which this application's embodiments apply. The terminal's software system can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. A layered architecture divides the terminal's software system into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the software system can be divided into three layers: the application layer, the application framework layer, and the hardware abstract layer (HAL).
[0109] The application layer can include a series of application packages. The application layer runs applications by calling the application programming interface (API) provided by the application framework layer. For example... Figure 2 As shown, the application package may include multiple applications, such as camera, gallery, browser, and music programs. Understandably, the port of each of these applications can be used to receive data.
[0110] The application framework layer provides APIs and a programming framework for applications within the application layer. The application framework layer includes predefined functions. For example... Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, resource manager, notification manager, and Dynamic Host Configuration Protocol (DHCP) module, etc.
[0111] The driver layer is the layer between hardware and software, used to drive the hardware and make it work. Multiple drivers can be installed in the driver layer to operate the hardware. Examples include camera drivers, display drivers, audio drivers, and sensor drivers.
[0112] In addition to the above, the terminal also includes a hardware layer, which may include a camera, speaker, CPU, NPU, and modem, etc. The hardware layer is connected to the driver layer. The modem is used to modulate digital signals to obtain analog signals, which are then transmitted through a physical antenna, and to demodulate the analog signals received through the physical antenna to obtain digital signals.
[0113] In this embodiment, the main antenna is typically located at the bottom or top of the terminal. In some scenarios, when users operate applications installed on the terminal, they often operate the device in landscape mode, gripping the top and bottom of the terminal. This can significantly degrade the signal transmission and reception performance of the main antenna, thereby weakening the terminal's overall signal transmission and reception performance. For example, the terminal is a mobile phone, which the user operates by holding it with one hand or both hands. See also... Figure 3a The phone is in landscape mode, and the user is holding the phone with both hands while playing the game. Alternatively, see... Figure 3b When a phone is in landscape mode and the user is holding it with both hands to watch a video, the main antenna located at the top or bottom of the phone is being held, causing a significant deterioration in the terminal's signal reception and transmission performance. This leads to limited uplink resource allocation by the network, resulting in a worsened user experience during service delivery.
[0114] To address the aforementioned issues, this application provides an antenna switching method. By following the method provided in this application, a terminal can use the physical antenna that provides better signal transmission and reception performance as the primary antenna, thereby improving the terminal's signal transmission and reception performance.
[0115] Next, the antenna switching method provided in this application will be described in detail through specific embodiments.
[0116] In one embodiment of this application, see Figure 4 , Figure 4 A flowchart of an antenna switching method provided in this application embodiment, the method being applied to a terminal, the method comprising the following steps:
[0117] S401: Detect whether the terminal meets the preset detection conditions.
[0118] The detection conditions include: the terminal's main antenna is the first physical antenna located at a designated position on the terminal; the designated position is either the top position of the terminal or the bottom position of the terminal.
[0119] S402: When the terminal is detected to meet the detection conditions, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna located in the middle of the terminal.
[0120] S403: Obtain the first quality data and the second quality data.
[0121] The first quality data represents the signal transmission and reception performance of the terminal when the main antenna of the terminal is the first physical antenna; the second quality data represents the signal transmission and reception performance of the terminal when the main antenna of the terminal is the second physical antenna; the quality data includes: the stuttering information of the application running in the terminal, and / or the strength parameters of the signal received by the terminal.
[0122] S404: When the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data, switch the terminal's main antenna from the second physical antenna to the first physical antenna.
[0123] As can be seen from the above, the solution provided in this embodiment, when the terminal's main antenna is the first physical antenna located at the top or bottom of the terminal, may result in poor signal transmission and reception performance. Therefore, the terminal's main antenna is switched from the first physical antenna to the second physical antenna located in the middle of the terminal. Furthermore, based on the first quality data and the second quality data, the signal transmission and reception performance of the terminal is compared when the main antenna is the first physical antenna and when the main antenna is the second physical antenna. If the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data, it indicates that the terminal's signal transmission and reception performance is higher when the main antenna is the first physical antenna than when the main antenna is the second physical antenna. Therefore, the terminal's main antenna is switched from the second physical antenna to the first physical antenna. In other words, the physical antenna that provides better signal transmission and reception performance can be used as the main antenna, thereby improving the terminal's signal transmission and reception performance.
[0124] For step S401, the preset detection conditions are used to detect whether the signal transmission and reception performance of the terminal may be affected.
[0125] In one implementation, the detection conditions include: the terminal's main antenna is a first physical antenna located at a specified position on the terminal; the specified position is either the top position of the terminal or the bottom position of the terminal.
[0126] The antenna switching method provided in this application is applied to a processor in a terminal. For example, an application processor (AP) or a central processing unit (CPU). The processing method when applied to an AP is similar to that when applied to a CPU; the following description will use the CPU as an example. The CPU obtains the location of the physical antenna of the terminal's current main antenna from the modem processor in the terminal.
[0127] When the main antenna of the terminal is the first physical antenna located at a designated position on the terminal, the main antenna may be held by the user during operation, which may affect the signal transmission and reception of the main antenna. In other words, the signal transmission and reception performance of the terminal may be affected. Therefore, it is determined that the terminal meets the detection conditions.
[0128] In another implementation, the detection conditions also include: the terminal is in landscape mode and the terminal's network connection is normal.
[0129] Correspondingly, in Figure 4 Based on this, see Figure 5 Step S401 may include the following steps:
[0130] S4011: Detect whether the network connection of the terminal is in a normal state.
[0131] S4012: When the terminal's network connection is normal, detect whether the terminal is in landscape mode.
[0132] S4013: When the terminal is in landscape mode, detect whether the terminal's main antenna is the first physical antenna located at a specified position on the terminal.
[0133] S4014: When the main antenna of the terminal is the first physical antenna located at a specified position on the terminal, it is determined that the terminal meets the detection conditions.
[0134] The system checks if the terminal's network connection is normal. If the terminal's network connection is abnormal, such as an Out of Service (OOS) status, it means the terminal is not connected to the network and cannot send or receive signals. Therefore, there is no need to worry about whether the terminal's signal transmission and reception performance will be affected. Accordingly, the terminal does not perform antenna switching. Alternatively, it switches the primary antenna to the default configured physical antenna. For example, in the terminal's default configuration, the primary antenna is the first physical antenna located at the bottom of the terminal. When the terminal is not connected to the network, if the current primary antenna is the first physical antenna located at the bottom of the terminal, no antenna switching is performed; if the current primary antenna is the second physical antenna located in the middle of the terminal, the primary antenna is switched from the second physical antenna to the first physical antenna.
[0135] If the terminal's network connection is normal, the terminal can send and receive signals, but its signal transmission and reception performance may be affected. Therefore, it's necessary to continue checking whether the terminal is in landscape mode.
[0136] The terminal can be equipped with a gravity sensor to obtain the terminal's rotation angle. If the terminal's default orientation in portrait mode is 0 degrees, then when the terminal's rotation angle is 90 degrees or 270 degrees, it is determined that the terminal is in landscape mode.
[0137] When the terminal is not in landscape mode, such as when it is in portrait mode, the user is less likely to hold the terminal with both hands, so there is no need to worry about whether the terminal's signal transmission and reception performance will be affected. Accordingly, the terminal does not switch antennas. Alternatively, the primary antenna is switched to the default physical antenna configuration.
[0138] When the terminal is in landscape mode, the user may hold the terminal with both hands to operate it. The system detects whether the terminal's primary antenna is the first physical antenna located at a designated position on the terminal. If the primary antenna is not the first physical antenna located at the designated position, even if the user holds the terminal with both hands, they will not be holding the primary antenna, and the terminal will not switch antennas. Alternatively, the primary antenna can be switched to the default configured physical antenna.
[0139] When the main antenna of the terminal is the first physical antenna located at a designated position on the terminal, the main antenna may be held by the user during operation, which may affect the signal transmission and reception of the main antenna. That is, the signal transmission and reception performance of the terminal may be affected. Therefore, it is determined that the terminal meets the detection conditions.
[0140] As can be seen from the above, in this embodiment of the application, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna only when the network connection of the terminal is in a normal state, the terminal is in landscape mode, and the main antenna is located at a designated position on the terminal. This can avoid the main antenna frequently switching between the first physical antenna and the second physical antenna, improve the stability of the terminal, and reduce the power consumption of the terminal.
[0141] In some embodiments, prior to step S4013, the method may further include the following steps: obtaining the current operating frequency band of the terminal as the target frequency band; and determining the primary antenna of the target frequency band from multiple antennas in the terminal.
[0142] Accordingly, step S4013 includes the following steps: detecting whether the main antenna of the target frequency band in the terminal is the first physical antenna located at a specified position in the terminal.
[0143] The terminal operates in different frequency bands at different stages of signal transmission and reception. For example, the terminal operates in a different frequency band when receiving signaling signals (such as reference signals) than when receiving service signals. When the terminal operates in different frequency bands, it uses the physical antenna of that frequency band for signal transmission and reception.
[0144] The system obtains the target frequency band currently operating on the terminal. From the multiple antennas in the terminal, it identifies the primary antenna for that target frequency band, which is the antenna currently used by the terminal for signal transmission and reception. It then checks whether the primary antenna for the target frequency band is the first physical antenna located at a designated position on the terminal to determine if the terminal's signal transmission and reception performance in the current operating frequency band is affected.
[0145] As can be seen from the above, in this embodiment, the primary antenna of the target frequency band in which the terminal is currently operating is detected to determine whether the terminal's signal transmission and reception performance in the target frequency band is affected. Subsequently, using the physical antenna that provides better signal transmission and reception performance in the target frequency band as the primary antenna can improve the terminal's signal transmission and reception performance in the target frequency band and enhance the user experience.
[0146] Regarding step S402, after determining that the terminal meets the detection conditions, the terminal's signal transmission and reception performance will be affected. Therefore, it is necessary to compare the terminal's signal transmission and reception performance when the first physical antenna is used as the main antenna, and the terminal's signal transmission and reception performance when the second physical antenna, located in the middle of the terminal, is used as the main antenna, to determine which of the first and second physical antennas should be used as the main antenna. Therefore, the terminal's main antenna is switched from the first physical antenna to the second physical antenna, allowing the terminal to operate for a period of time with the second physical antenna as the main antenna to obtain the terminal's signal transmission and reception performance when the second physical antenna is used as the main antenna.
[0147] In some embodiments, before step S402, the method may further include the following step: detecting whether a preset detection period has been reached.
[0148] Accordingly, step S402 includes the following steps: when the terminal is detected to meet the detection conditions and the detection cycle is reached, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna located in the middle of the terminal.
[0149] The detection cycle can be set by technicians according to actual needs. For example, the detection cycle can be 10 seconds, but this embodiment does not impose a specific limitation.
[0150] When a terminal is detected to meet the detection conditions, it may have already completed antenna switching in the previous detection cycle. The system then checks whether the detection cycle has been reached. If the terminal's primary antenna is switched from the first physical antenna to the second physical antenna before the detection cycle has been reached, it will cause frequent switching between the primary and secondary physical antennas, reducing the terminal's stability. Therefore, when the detection cycle has been reached, the terminal's primary antenna is switched from the first physical antenna to the second physical antenna to avoid frequent switching and improve terminal stability.
[0151] In some embodiments, the antenna switching method provided in this application is applied to the CPU in a terminal. Accordingly, see [link to relevant documentation]. Figure 6 The terminal switches antennas in the following manner:
[0152] S601: The CPU sends an antenna switching command to the controller in the terminal.
[0153] S602: After receiving the antenna switching command, the controller disconnects the link of the first physical antenna used for transmitting signals and connects the link of the second physical antenna located in the middle of the terminal used for transmitting signals.
[0154] The CPU sends an antenna switching command to the controller in the terminal, switching the primary antenna from the first physical antenna to the second physical antenna. The controller, upon receiving the command, disables the first physical antenna's signal transmission function (disconnects the link used for signal transmission), allowing it to only receive signals, thus switching it to a diversity antenna. Simultaneously, the controller enables the second physical antenna's signal transmission function (connects the link used for signal transmission), allowing it to both transmit and receive signals, thus switching it to the primary antenna.
[0155] As can be seen from the above, in this embodiment, the controller switches the terminal's primary antenna from the first physical antenna to the second physical antenna to obtain the terminal's signal transmission and reception performance when the second physical antenna is used as the primary antenna. Subsequently, by comparing the terminal's signal transmission and reception performance when the first physical antenna is used as the primary antenna with the terminal's signal transmission and reception performance when the second physical antenna, located in the middle of the terminal, is used as the primary antenna, the physical antenna that provides better signal transmission and reception performance can be determined as the primary antenna, thereby improving the terminal's signal transmission and reception performance.
[0156] Regarding step S403, after switching the primary antenna from the first physical antenna to the second physical antenna, if the terminal operates for a period of time with the primary antenna as the first physical antenna, then first quality data is acquired for the terminal operating with the primary antenna as the first physical antenna. This first quality data represents the terminal's signal transmission and reception performance when the primary antenna is the first physical antenna. Similarly, if the terminal also operates for a period of time with the primary antenna as the second physical antenna, then second quality data is acquired for the terminal operating with the primary antenna as the second physical antenna. This second quality data represents the terminal's signal transmission and reception performance when the primary antenna is the second physical antenna.
[0157] Quality data includes: information on the lag of applications running on the terminal, and / or, the strength parameters of the signals received by the terminal.
[0158] In some embodiments, the stuttering information includes at least one of the following: the resolution of the image displayed by the application running on the terminal, and the latency of the application running on the terminal.
[0159] When an application runs on a terminal, an image of the application's user interface is displayed on the screen. Higher resolution images result in better signal transmission and reception performance for the terminal. Conversely, lower resolution images result in poorer signal transmission and reception performance.
[0160] Application latency refers to the time from detection to user action and then to response to the user action. Lower application latency results in better signal transmission and reception performance for the terminal. Higher application latency results in poorer signal transmission and reception performance for the terminal.
[0161] As can be seen from the above, in this embodiment, the lag information of the applications running on the terminal is obtained. The resolution of the image displayed by the application and the latency of the application running in the lag information can represent the signal transmission and reception performance of the terminal. Subsequently, based on the lag information of the applications running on the terminal, the physical antenna that makes the terminal's signal transmission and reception performance better can be determined as the main antenna, which can improve the terminal's signal transmission and reception performance.
[0162] In some embodiments, the strength parameters include at least one of the following: the reference signal receiving power (RSRP) of the reference signal received by the terminal, the received signal strength indication (RSSI) of each signal received by the terminal, the reference signal receiving quality (RSRQ) of the reference signal received by the terminal, and the bit error rate of the service signal received by the terminal.
[0163] The reference signal can be a synchronization signal block (SSB).
[0164] RSRP refers to the average power of the received signal in a resource element (RE) within an Orthogonal Frequency Division Multiplexing (OFDM) symbol in the time domain, which is used as a reference signal. A higher RSRP value indicates better signal transmission and reception performance of the terminal.
[0165] RSSI refers to the average power of all signals (e.g., pilot signals, traffic signals, interference signals, and noise signals) received on all REs within a single OFDM symbol in the time domain. A higher RSSI value indicates better signal transmission and reception performance of the terminal.
[0166] RSRQ = N × (RSRP / RSSI), where N is the number of red-band blocks (RBs) included in the bandwidth measured by RSSI in the frequency domain. A larger RSRQ value indicates better signal transmission and reception performance of the terminal.
[0167] The bit error rate (BER) can be expressed as the block error rate (BLER). BLER represents the ratio of the number of erroneous data blocks to the total number of received data blocks. A lower BLER value indicates better signal transmission and reception performance of the terminal.
[0168] As can be seen from the above, in this embodiment, the strength parameters of the signal received by the terminal are obtained. The RSRP, RSSI, RSRQ, and bit error rate among these strength parameters all represent the signal transmission and reception performance of the terminal. Subsequently, based on the lag information of the applications running on the terminal, the physical antenna that enables better signal transmission and reception performance of the terminal can be determined as the primary antenna, thereby improving the terminal's signal transmission and reception performance.
[0169] In some embodiments, the antenna switching method in this application is applied to the CPU in the terminal. Accordingly, step S403 may include the following steps: the CPU acquires first stuttering information of the application running in the terminal, and acquires a first strength parameter of the signal received by the terminal from the modem processor in the terminal, thereby obtaining first quality data. Wherein, the first stuttering information is: stuttering information of the application running in the terminal when the terminal's main antenna is the first physical antenna; the first strength parameter is: the strength parameter of the signal received by the terminal when the terminal's main antenna is the first physical antenna.
[0170] The CPU acquires the second stuttering information of the application running in the terminal from the recorded data, and obtains the second strength parameter of the signal received by the terminal from the modem processor to obtain the second quality data. The second stuttering information refers to the stuttering information of the application running in the terminal when the terminal's main antenna is the second physical antenna; the second strength parameter refers to the strength parameter of the signal received by the terminal when the terminal's main antenna is the second physical antenna.
[0171] The application runs via the CPU, which can directly obtain the first stuttering information of the application running on the terminal. The signals transmitted and received by the terminal are processed by a modem processor, which records relevant information about the terminal's transmitted and received signals. Therefore, the CPU obtains the first strength parameter when the terminal's main antenna is the first physical antenna from the modem processor in the terminal. By obtaining the first stuttering information and the first strength parameter, the CPU obtains the first quality data.
[0172] Similarly, the CPU obtains the recorded second stuttering information and the second strength parameter when the terminal's main antenna is the first physical antenna from the modem processor, thus obtaining the second quality data.
[0173] Regarding step S404, after obtaining the first quality data and the second quality data, the terminal compares the first quality data and the second quality data, that is, compares the signal transmission and reception performance of the terminal when the main antenna is the first physical antenna and the signal transmission and reception performance of the terminal when the main antenna is the second physical antenna, and determines which of the first physical antenna and the second physical antenna to be the main antenna based on the comparison result.
[0174] In one implementation, the quality data includes: lag information of applications running on the terminal.
[0175] Correspondingly, when the signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than that represented by the second stuttering information in the second quality data, it indicates that the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data.
[0176] The signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than the signal transmission and reception performance represented by the second stuttering information in the second quality data, including at least one of the following:
[0177] The resolution of the image displayed by the application running on the terminal in the first lag information is greater than the resolution of the image displayed by the application running on the terminal in the second lag information.
[0178] The latency of the application running on the terminal in the first lag information is less than the latency of the application running on the terminal in the second lag information.
[0179] Conversely, if the signal transmission and reception performance represented by the first stuttering information in the first quality data is lower than that represented by the second stuttering information in the second quality data, it indicates that the signal transmission and reception performance represented by the first quality data is lower than that represented by the second quality data.
[0180] The signal transmission and reception performance represented by the first stuttering information in the first quality data is lower than the signal transmission and reception performance represented by the second stuttering information in the second quality data, including:
[0181] The resolution of the image displayed by the application running on the terminal in the first lag information is lower than the resolution of the image displayed by the application running on the terminal in the second lag information.
[0182] The latency of the application running on the terminal in the first lag information is greater than the latency of the application running on the terminal in the second lag information.
[0183] In another implementation, the quality data includes the strength parameters of the signal received by the terminal.
[0184] Correspondingly, when the signal transmission and reception performance represented by the first strength parameter in the first quality data is higher than that represented by the second strength parameter in the second quality data, it indicates that the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data.
[0185] The signal transmission and reception performance represented by the first strength parameter in the first quality data is higher than the signal transmission and reception performance represented by the second strength parameter in the second quality data, including at least one of the following:
[0186] The RSRP of the reference signal received by the terminal in the first strength parameter is greater than the RSRP of the reference signal received by the terminal in the second strength parameter.
[0187] The RSSI of each signal received by the terminal in the first strength parameter is greater than the RSSI of each signal received by the terminal in the second strength parameter.
[0188] The RSRQ of each signal received by the terminal in the first strength parameter is greater than the RSRQ of each signal received by the terminal in the second strength parameter.
[0189] The bit error rate of the service signal received by the terminal in the first strength parameter is less than the bit error rate of the service signal received by the terminal in the second strength parameter.
[0190] Conversely, if the signal transmission and reception performance represented by the first strength parameter in the first quality data is lower than that represented by the second strength parameter in the second quality data, it indicates that the signal transmission and reception performance represented by the first quality data is lower than that represented by the second quality data.
[0191] The signal transmission and reception performance represented by the first strength parameter in the first quality data is lower than that represented by the second strength parameter in the second quality data, including:
[0192] The RSRP of the reference signal received by the terminal in the first strength parameter is less than the RSRP of the reference signal received by the terminal in the second strength parameter.
[0193] The RSSI of each signal received by the terminal in the first strength parameter is less than the RSSI of each signal received by the terminal in the second strength parameter.
[0194] The RSRQ of each signal received by the terminal in the first strength parameter is less than the RSRQ of each signal received by the terminal in the second strength parameter.
[0195] The bit error rate of the service signal received by the terminal in the first strength parameter is greater than the bit error rate of the service signal received by the terminal in the second strength parameter.
[0196] In another implementation, the quality data includes: lag information of the application running on the terminal, and the signal strength parameter of the signal received by the terminal. When the signal transmission and reception performance represented by the lag information and the strength parameter in the quality data are inconsistent, since the lag situation of the application represented by the lag information directly affects the user experience, the priority of the lag information is set higher than the priority of the strength parameter. That is, when the signal transmission and reception performance represented by the first lag information in the first quality data is higher than the signal transmission and reception performance represented by the second lag information in the second quality data, it is directly determined that the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data.
[0197] Accordingly, the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data, including:
[0198] The signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than that represented by the second stuttering information in the second quality data, and the signal transmission and reception performance represented by the first strength parameter in the first quality data is higher than that represented by the second strength parameter in the second quality data.
[0199] or,
[0200] The signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than that represented by the second stuttering information in the second quality data, and the signal transmission and reception performance represented by the first strength parameter in the first quality data is lower than that represented by the second strength parameter in the second quality data.
[0201] Furthermore, when the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data, it indicates that the performance of the first physical antenna is better than that of the second physical antenna. In other words, the signal transmission and reception performance of the terminal using the first physical antenna as the main antenna is better. Therefore, the main antenna of the terminal is switched from the second physical antenna to the first physical antenna.
[0202] As can be seen from the above, in this embodiment, when the signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than that represented by the second stuttering information in the second quality data, it is determined that the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data. That is, when the signal transmission and reception performance represented by the stuttering information and the strength parameter in the quality data are inconsistent, the priority of the stuttering information is set higher than the priority of the strength parameter. The stuttering situation of the application represented by the stuttering information directly affects the user experience. The primary antenna of the terminal is determined according to the stuttering information to improve the user experience.
[0203] In some embodiments, after step S403, the method may further include the following step: when the signal transceiver performance represented by the first quality data is not higher than the signal transceiver performance represented by the second quality data, the main antenna of the terminal is kept as the second physical antenna.
[0204] The signal transmission and reception performance represented by the first quality data that is no higher than that represented by the second quality data includes:
[0205] The signal transmission and reception performance represented by the first stuttering information in the first quality data is not higher than the signal transmission and reception performance represented by the second stuttering information in the second quality data, and the signal transmission and reception performance represented by the first strength parameter in the first quality data is higher than the signal transmission and reception performance represented by the second strength parameter in the second quality data.
[0206] or,
[0207] The signal transmission and reception performance represented by the first stuttering information in the first quality data is not higher than the signal transmission and reception performance represented by the second stuttering information in the second quality data, and the signal transmission and reception performance represented by the first strength parameter in the first quality data is lower than the signal transmission and reception performance represented by the second strength parameter in the second quality data.
[0208] If the signal transmission and reception performance represented by the first quality data is not higher than that represented by the second quality data, it indicates that the performance of the second physical antenna is better than that of the first physical antenna, or that the performance of the second physical antenna is comparable to that of the first physical antenna. In other words, if using the second physical antenna as the primary antenna results in better signal transmission and reception performance, or if the difference in signal transmission and reception performance between the second and first physical antennas as primary antennas is not significant, then keeping the second physical antenna as the primary antenna improves the terminal's signal transmission and reception performance without requiring antenna switching, thus reducing the terminal's power consumption.
[0209] See Figure 7 , Figure 7 This is a flowchart of an antenna switching method provided in an embodiment of the present application. The method is applied to an AP in a terminal, and the AP switches antennas in the following manner.
[0210] The system checks for Out-of-Service (OOS), which means detecting whether the terminal's network connection is in an abnormal state. When the terminal's network connection is OOS, all timing antennas are stopped and returned to their initial state. In other words, when the terminal's network connection is in an abnormal state, antenna switching detection is not performed, and the terminal's primary antenna is switched to the default configured physical antenna.
[0211] When the terminal's network connection is not OOS (i.e., the terminal's network connection is in a normal state), check whether the terminal is in landscape mode. If the terminal is not in landscape mode, stop all timing antennas and return them to their initial state, that is, do not perform antenna switching detection, and switch the terminal's primary antenna to the default configured physical antenna.
[0212] When the terminal is in landscape mode, the target frequency band currently in operation is obtained, and it is detected whether the main antenna of the target frequency band is the first physical antenna located at the top or bottom of the terminal. If the main antenna of the target frequency band is not the first physical antenna located at the top or bottom of the terminal, all timing antennas are stopped and returned to their initial state, that is, antenna switching detection is not performed, and the terminal's main antenna is switched to the default configured physical antenna.
[0213] When the primary antenna for the target frequency band is the first physical antenna located at the top or bottom of the terminal, timer T1 is initiated. T1 is the detection period in the aforementioned embodiment, for example, T1 is 10 seconds. This is to detect whether the detection period has been reached. If T1 times out, that is, when the detection period has been reached, a switching command is sent to the front-end controller. In other words, the AP in the terminal sends a switching command to the front-end controller, which then switches the primary antenna from the first physical antenna to the second physical antenna located in the middle of the terminal.
[0214] Furthermore, in the case of a T1 timeout, that is, when the detection period is reached, the RSRP / RSSI, bit error rate, and stuttering status of the physical antenna acting as the primary antenna are queried. In other words, the AP obtains the first quality data when the primary antenna is the first physical antenna from the modem. The first quality data includes at least one of RSRP / RSSI, bit error rate, and stuttering status. The physical antenna is a single-ended antenna (PRX).
[0215] Then, after a successful switchover, a T2 delay is used to query the RSRP / RSSI, BLER, and stuttering status of the central antenna. In other words, after switching the primary antenna from the first physical antenna to the second physical antenna, the terminal operates for a T2 time while the primary antenna is the second physical antenna. The AP then obtains the second quality data from the modem when the primary antenna is the second physical antenna. T2 is set by technicians according to requirements; for example, T2 is 1 second. The second quality data includes at least one of RSRP / RSSI, BLER, and stuttering status.
[0216] Furthermore, by comparing the RSRP / RSSI, BLER, and stuttering characteristics in the first and second quality data, a decision is made regarding whether to switch back. In other words, the signal transmission and reception performance represented by the first and second quality data is compared. If the comparison shows that the signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data, a switchback is required, and a switching command is sent to the front-end controller. That is, the AP in the terminal sends a switching command to the front-end controller, which then switches the primary antenna from the second physical antenna to the first physical antenna.
[0217] If the signal transmission and reception performance represented by the first quality data is not higher than that represented by the second quality data, the terminal's primary antenna remains the second physical antenna, meaning no switchback is performed. Then, the terminal checks if the antenna switching was successful. If successful, it continues to check for Out-of-Service (OOS) to determine if further processing is needed based on the detection result.
[0218] As can be seen from the above, the solution provided in this embodiment, when the terminal's main antenna is the first physical antenna located at the top or bottom of the terminal, may result in poor signal transmission and reception performance. Therefore, the terminal's main antenna is switched from the first physical antenna to the second physical antenna located in the middle of the terminal. Furthermore, based on the first quality data and the second quality data, the signal transmission and reception performance of the terminal is compared when the main antenna is the first physical antenna and when the main antenna is the second physical antenna. Since the signal transmission and reception performance indicated by the first quality data is higher than that indicated by the second quality data, it indicates that the terminal's signal transmission and reception performance is higher when the main antenna is the first physical antenna than when the main antenna is the second physical antenna. Therefore, the terminal's main antenna is switched from the second physical antenna to the first physical antenna. In other words, the physical antenna that provides better signal transmission and reception performance can be used as the main antenna, thereby improving the terminal's signal transmission and reception performance and enhancing the user experience.
[0219] In a specific implementation, this application also provides a terminal, which includes one or more processors and a memory; the memory is coupled to one or more processors, and the memory is used to store computer program code, which includes computer instructions, and one or more processors call the computer instructions to cause the terminal to perform some or all of the steps in the above method embodiments.
[0220] This application also provides a computer-readable storage medium including a computer program that, when run on a terminal, causes the terminal to perform some or all of the steps described in the method embodiments. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0221] In a specific implementation, this application also provides a computer program product, which includes executable instructions. When the executable instructions are executed on a terminal, the terminal performs some or all of the steps in the above method embodiments.
[0222] like Figure 8 As shown, this application also provides a chip system applied to a terminal. The chip system includes one or more processors 801. The processors 801 are used to call computer instructions to cause the terminal to input data to be processed into the chip system. The chip system processes the data based on the antenna switching method provided in the embodiments of this application and outputs the processing result.
[0223] In one possible implementation, the chip system also includes input and output interfaces for inputting and outputting data.
[0224] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0225] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor.
[0226] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0227] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, compact disc read-only memory (CD-ROMs), magneto-optical disks, read-only memory, random access memory, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other forms of propagated signals. Therefore, machine-readable media includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
[0228] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the accompanying drawings. Furthermore, including structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0229] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.
[0230] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0231] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made thereto without departing from the spirit and scope of this application.
Claims
1. An antenna switching method, characterized in that, The method is applied to a terminal, and the method includes: The detection method determines whether the terminal meets preset detection conditions; wherein the detection conditions include: the main antenna of the terminal is a first physical antenna located at a specified position of the terminal; the specified position is the top position of the terminal, or the bottom position of the terminal; When the terminal is detected to meet the detection conditions, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna located in the middle of the terminal; Acquire first quality data and second quality data; wherein, the first quality data represents the signal transmission and reception performance of the terminal when the main antenna of the terminal is the first physical antenna; the second quality data represents the signal transmission and reception performance of the terminal when the main antenna of the terminal is the second physical antenna; the quality data includes: lag information of the application running in the terminal, and / or, the strength parameters of the signal received by the terminal; When the signal transceiver performance represented by the first quality data is higher than that represented by the second quality data, the main antenna of the terminal is switched from the second physical antenna to the first physical antenna. The detection conditions also include: the terminal is in landscape mode and the terminal's network connection is normal. The detection of whether the terminal meets the preset detection conditions includes: Detect whether the network connection of the terminal is in a normal state; When the network connection of the terminal is in a normal state, detect whether the terminal is in landscape mode; When the terminal is in landscape mode, it is detected whether the main antenna of the terminal is the first physical antenna located at a specified position on the terminal; When the main antenna of the terminal is the first physical antenna located at a designated position on the terminal, it is determined that the terminal meets the detection condition.
2. The method according to claim 1, characterized in that, Before detecting whether the main antenna of the terminal is the first physical antenna located at a designated location on the terminal, the method further includes: Obtain the current operating frequency band of the terminal as the target frequency band; The main antenna for the target frequency band is determined from among the multiple antennas in the terminal; The step of detecting whether the main antenna of the terminal is the first physical antenna located at a specified location on the terminal includes: Detect whether the main antenna of the target frequency band in the terminal is the first physical antenna located at a specified position in the terminal.
3. The method according to claim 1, characterized in that, The quality data includes: lag information of applications running on the terminal, and the strength parameters of signals received by the terminal; The signal transmission and reception performance represented by the first quality data is higher than that represented by the second quality data in the following ways: The signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than that represented by the second stuttering information in the second quality data, and the signal transmission and reception performance represented by the first strength parameter in the first quality data is higher than that represented by the second strength parameter in the second quality data. or, The signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than that represented by the second stuttering information in the second quality data, and the signal transmission and reception performance represented by the first strength parameter in the first quality data is lower than that represented by the second strength parameter in the second quality data.
4. The method according to claim 3, characterized in that, The strength parameter includes at least one of the following: The RSRP of the reference signal received by the terminal, the RSSI of each signal received by the terminal, the RSRQ of the reference signal received by the terminal, and the bit error rate of the service signal received by the terminal.
5. The method according to claim 4, characterized in that, The signal transmission and reception performance represented by the first strength parameter in the first quality data is higher than the signal transmission and reception performance represented by the second strength parameter in the second quality data, including at least one of the following: The RSRP of the reference signal received by the terminal in the first strength parameter is greater than the RSRP of the reference signal received by the terminal in the second strength parameter; The RSSI of each signal received by the terminal in the first strength parameter is greater than the RSSI of each signal received by the terminal in the second strength parameter; The RSRQ of each signal received by the terminal in the first strength parameter is greater than the RSRQ of each signal received by the terminal in the second strength parameter. The bit error rate of the service signal received by the terminal in the first strength parameter is less than the bit error rate of the service signal received by the terminal in the second strength parameter.
6. The method according to claim 3, characterized in that, The lag information includes at least one of the following: the resolution of the image displayed by the application running on the terminal, and the latency of the application running on the terminal.
7. The method according to claim 6, characterized in that, The signal transmission and reception performance represented by the first stuttering information in the first quality data is higher than the signal transmission and reception performance represented by the second stuttering information in the second quality data, including at least one of the following: The resolution of the image displayed by the application running on the terminal in the first lag information is greater than the resolution of the image displayed by the application running on the terminal in the second lag information; The latency of the application running on the terminal in the first lag information is less than the latency of the application running on the terminal in the second lag information.
8. The method according to claim 1, characterized in that, The method is applied to the CPU in the terminal; The acquisition of the first quality data and the second quality data includes: The CPU acquires first stuttering information of the application running in the terminal from the recorded data, and acquires first strength parameters of the signal received by the terminal from the modem processor in the terminal to obtain first quality data; wherein, the first stuttering information is: stuttering information of the application running in the terminal when the main antenna of the terminal is the first physical antenna; the first strength parameter is: strength parameters of the signal received by the terminal when the main antenna of the terminal is the first physical antenna; The CPU acquires the second stuttering information of the application running in the terminal recorded in the record, and acquires the second strength parameter of the signal received by the terminal from the modem processor to obtain the second quality data; wherein, the second stuttering information is the stuttering information of the application running in the terminal when the main antenna of the terminal is the second physical antenna; the second strength parameter is the strength parameter of the signal received by the terminal when the main antenna of the terminal is the second physical antenna.
9. The method according to claim 1, characterized in that, Before switching the main antenna of the terminal from the first physical antenna to the second physical antenna located in the middle of the terminal when the terminal is detected to meet the detection condition, the method further includes: Check whether the preset testing cycle has been reached; The step of switching the main antenna of the terminal from the first physical antenna to the second physical antenna located in the middle of the terminal when the terminal is detected to meet the detection condition includes: When the terminal is detected to meet the detection conditions and the detection period is reached, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna located in the middle of the terminal.
10. The method according to claim 1, characterized in that, After acquiring the first quality data and the second quality data, the method further includes: When the signal transmission and reception performance represented by the first quality data is not higher than that represented by the second quality data, the main antenna of the terminal is kept as the second physical antenna.
11. The method according to claim 1, characterized in that, The method is applied to the CPU in the terminal; The step of switching the main antenna of the terminal from the first physical antenna to the second physical antenna located in the middle of the terminal includes: The CPU sends an antenna switching command to the controller in the terminal; After receiving the antenna switching command, the controller disconnects the link of the first physical antenna used for transmitting signals and connects the link of the second physical antenna located in the middle of the terminal used for transmitting signals.
12. A terminal, characterized in that, include: One or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the terminal to perform the method as described in any one of claims 1-11.
13. A computer-readable storage medium, characterized in that, Includes a computer program that, when run on a terminal, causes the terminal to perform the method according to any one of claims 1-11.
14. A computer program product, characterized in that, The computer program product includes executable instructions that, when executed on a terminal, cause the terminal to perform the method of any one of claims 1-11.
15. A chip system, characterized in that, The chip system is applied to a terminal. The chip system includes one or more processors. The processors are used to call computer instructions to cause the terminal to input data into the chip system and execute the method described in any one of claims 1-11 to process the data and output the processing result.