Antenna switching method, terminal and storage medium
By detecting and switching the physical antenna from the main set antenna to the central position in the terminal horizontal screen state, the problem of deterioration of signal transceiver performance in the horizontal screen state is solved, the signal transceiver performance is improved, power consumption is reduced, and user experience is improved.
Patent Information
- Application Number
- CN202410145948.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2044-02-01
AI Technical Summary
In the terminal horizontal screen state, when the user holds the top or bottom, the signal transceiver performance of the main set antenna deteriorates significantly, resulting in a degradation of the signal transceiver performance and affecting the user experience.
Detect whether the terminal meets the preset conditions, including whether the network connection is normal and in a horizontal screen state, and when the main set antenna is located at the top or bottom position, the main set antenna is switched to the second physical antenna in the middle position, and switch to a physical antenna with better performance by acquiring quality data than signal transmission and reception performance.
Improves the signal transmission and reception performance of the terminal in the horizontal screen state, avoids frequent switching, reduces power consumption, and improves user experience.
Smart Images

Figure CN120454894A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an antenna switching method, a terminal, and a storage medium. Background Art
[0002] Typically, multiple physical antennas are included in a terminal design. Among these antennas, the one with relatively good over-the-air (OTA) performance becomes the primary antenna, while the one with relatively poor OTA performance becomes the diversity antenna. The primary antenna is used for both signal transmission and reception, while the diversity antenna is used only for signal reception.
[0003] The main antenna is typically located at the bottom or top of the device. In some scenarios, when using applications installed on the device, users operate the device in landscape mode. This can cause the main antenna's signal transmission and reception performance to deteriorate significantly, thereby weakening the device's signal transmission and reception performance. Summary of the Invention
[0004] The purpose of the embodiments of the present 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 improving the user experience. The specific technical solution is as follows:
[0005] In a first aspect, to achieve the above-mentioned objectives, an embodiment of the present application provides an antenna switching method, the method comprising:
[0006] Detecting whether the terminal meets a preset detection condition; wherein the detection condition includes: the main antenna of the terminal is a first physical antenna located at a specified position of the terminal; the specified position is a top position of the terminal, or a bottom position of the terminal;
[0007] When it is detected that the terminal meets the detection condition, switching the main antenna of the terminal from the first physical antenna to the second physical antenna located in the middle of the terminal;
[0008] Obtaining first quality data and second quality data; wherein the first quality data indicates signal transceiver performance of the terminal when the primary antenna of the terminal is the first physical antenna; and the second quality data indicates signal transceiver performance of the terminal when the primary antenna of the terminal is the second physical antenna; the quality data includes: jamming information of applications running on the terminal, and / or strength parameters of signals received by the terminal;
[0009] When the signal transceiver performance indicated by the first quality data is higher than the signal transceiver performance indicated 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 by this embodiment is that, since the signal transceiver performance of the terminal may be poor when the main antenna of the terminal is the first physical antenna located at the top or bottom of the terminal, 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. Furthermore, based on the first quality data and the second quality data, the signal transceiver performance of the terminal when the main antenna of the terminal is the first physical antenna and when the main antenna of the terminal is the second physical antenna are compared. If the signal transceiver performance represented by the first quality data is higher than the signal transceiver performance represented by the second quality data, indicating that the signal transceiver performance of the terminal when the main antenna is the first physical antenna is higher than the signal transceiver performance of the terminal when the main antenna is the second physical antenna, the main antenna of the terminal is switched from the second physical antenna to the first physical antenna. That is, the physical antenna that provides better signal transceiver performance of the terminal can be used as the main antenna, which can improve the signal transceiver performance of the terminal.
[0011] In one embodiment of the present application, the detection condition further includes: the terminal is in a horizontal screen state and the network connection of the terminal is in a normal state;
[0012] The detecting whether the terminal meets a preset detection condition includes:
[0013] Detecting whether the network connection of the terminal is normal;
[0014] When the network connection of the terminal is in a normal state, detecting whether the terminal is in a horizontal screen state;
[0015] When the terminal is in a horizontal state, detecting whether a primary antenna of the terminal is a first physical antenna located at a designated position of the terminal;
[0016] When the main antenna of the terminal is a first physical antenna located at a designated position of the terminal, it is determined that the terminal meets the detection condition.
[0017] As can be seen from the above, in the embodiment of the present 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 normal state, the terminal is in landscape state, and the main antenna is located at the specified position of the terminal. This can avoid the main antenna from frequently switching between the first physical antenna and the second physical antenna, thereby improving the stability of the terminal and reducing the power consumption of the terminal.
[0018] In one embodiment of the present application, before detecting whether the main antenna of the terminal is the first physical antenna located at a designated position of the terminal, the method further includes:
[0019] Obtaining a current operating frequency band of the terminal as a target frequency band;
[0020] Determining a primary antenna of the target frequency band from multiple antennas in the terminal;
[0021] The detecting whether the main antenna of the terminal is a first physical antenna located at a designated position of the terminal includes:
[0022] It is detected whether the main antenna of the target frequency band in the terminal is a first physical antenna located at a designated position of the terminal.
[0023] As can be seen from the above, in this embodiment of the present application, the primary antenna set for the terminal's currently operating target frequency band is tested to determine whether the terminal's signal transceiver performance in the target frequency band is affected. Subsequently, the physical antenna that provides the terminal with better signal transceiver performance in the target frequency band is used as the primary antenna set, which can improve the terminal's signal transceiver performance in the target frequency band and thus enhance the user experience.
[0024] In one embodiment of the present application, the quality data includes: freeze information of an application running in the terminal, and a strength parameter of a signal received by the terminal;
[0025] The signal transceiver performance indicated by the first quality data is higher than the signal transceiver performance indicated by the second quality data, including:
[0026] The signal transceiver performance indicated by the first jam information in the first quality data is higher than the signal transceiver performance indicated by the second jam information in the second quality data, and the signal transceiver performance indicated by the first strength parameter in the first quality data is higher than the signal transceiver performance indicated by the second strength parameter in the second quality data;
[0027] or,
[0028] The signal reception and transmission performance represented by the first jamming information in the first quality data is higher than the signal reception and transmission performance represented by the second jamming information in the second quality data, and the signal reception and transmission performance represented by the first strength parameter in the first quality data is lower than the signal reception and transmission performance represented by the second strength parameter in the second quality data.
[0029] As can be seen from the above, in the embodiment of the present application, when the signal transceiver performance indicated by the first jamming information in the first quality data is higher than the signal transceiver performance indicated by the second jamming information in the second quality data, the signal transceiver performance indicated by the first quality data is determined to be higher than the signal transceiver performance indicated by the second quality data. That is, when the jamming information in the quality data and the signal transceiver performance indicated by the strength parameter are inconsistent, the priority of the jamming information is set to be higher than the priority of the strength parameter. The jamming condition of the application indicated by the jamming information directly affects the user experience. The primary antenna of the terminal is determined based on the jamming information to improve the user experience.
[0030] In one embodiment of the present application, the intensity 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 the embodiments of the present application, the signal strength parameters received by the terminal are obtained. Among the strength parameters, RSRP, RSSI, RSRQ, and bit error rate can all represent the signal transceiver performance of the terminal. Subsequently, based on the information about the application jamming running on the terminal, the physical antenna that provides the terminal with better signal transceiver performance can be determined as the primary antenna, thereby improving the signal transceiver performance of the terminal.
[0033] In one embodiment of the present application, the signal transceiver performance indicated by the first strength parameter in the first quality data is higher than the signal transceiver performance indicated 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 the present application, the jam information includes at least one of the following: a resolution of an image displayed by an application running in the terminal, and a delay of the application running in the terminal.
[0039] As can be seen from the above, in the embodiments of the present application, information about application jamming running on the terminal is obtained. The resolution of the image displayed by the application and the delay of the application running in the jamming information can indicate the signal transceiver performance of the terminal. Subsequently, based on the jamming information of the application running on the terminal, a physical antenna that provides better signal transceiver performance of the terminal can be determined as the primary antenna, thereby improving the signal transceiver performance of the terminal.
[0040] In one embodiment of the present application, the signal transceiver performance indicated by the first jam information in the first quality data is higher than the signal transceiver performance indicated by the second jam information in the second quality data, including at least one of the following:
[0041] The resolution of the image displayed by the application running in the terminal in the first freeze information is greater than the resolution of the image displayed by the application running in the terminal in the second freeze information;
[0042] The delay of the application running in the terminal in the first freeze information is smaller than the delay of the application running in the terminal in the second freeze information.
[0043] In one embodiment of the present application, the method is applied to a CPU in the terminal;
[0044] The obtaining of the first quality data and the second quality data includes:
[0045] The CPU obtains recorded first jamming information of an application running in the terminal, and obtains a first strength parameter of a signal received by the terminal from a modem processor in the terminal, to obtain first quality data; wherein the first jamming information is jamming information of the application running in the terminal when the primary antenna of the terminal is the first physical antenna; and the first strength parameter is a strength parameter of the signal received by the terminal when the primary antenna of the terminal is the first physical antenna.
[0046] The CPU obtains the recorded second jamming information of the application running in the terminal, and obtains a second strength parameter of the signal received by the terminal from the modem processor to obtain second quality data; wherein the second jamming information is: the jamming 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 the present application, when detecting that the terminal meets the detection condition, 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, the method further includes:
[0048] Check whether the preset detection cycle has been reached;
[0049] The method 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 detecting that the terminal meets the detection condition includes:
[0050] When it is detected that the terminal meets the detection condition 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 the embodiment of the present application, when the detection cycle 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 from frequently switching between the first physical antenna and the second physical antenna, thereby improving the stability of the terminal.
[0052] In one embodiment of the present application, after obtaining the first quality data and the second quality data, the method further includes:
[0053] When the signal transceiver performance indicated by the first quality data is not higher than the signal transceiver performance indicated by the second quality data, the main antenna of the terminal is maintained as the second physical antenna.
[0054] As can be seen from the above, in the embodiments of the present application, the signal transceiver performance represented by the first quality data is no higher than the signal transceiver performance 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 transceiver performance of the terminal is better when the second physical antenna is used as the primary antenna, or if the difference in signal transceiver performance between the second physical antenna and the first physical antenna as the primary antenna is not significant, then maintaining the second physical antenna as the primary antenna of the terminal improves the signal transceiver performance of the terminal, eliminates the need for antenna switching, and reduces the power consumption of the terminal.
[0055] In one embodiment of the present application, the method is applied to a CPU in the terminal;
[0056] The switching of 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 instruction to a control device in the terminal;
[0058] After receiving the antenna switching instruction, the control device disconnects the link of the first physical antenna for sending signals, and connects the link of the second physical antenna located in the middle of the terminal for sending signals.
[0059] As can be seen from the above, in the embodiment of the present application, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna through a control device to obtain the signal transceiver performance of the terminal when the second physical antenna is used as the main antenna. Subsequently, the signal transceiver performance of the terminal when the first physical antenna is used as the main antenna is compared with the signal transceiver performance of the terminal when the second physical antenna located in the middle of the terminal is used as the main antenna to determine the physical antenna that has better signal transceiver performance of the terminal as the main antenna, which can improve the signal transceiver performance of the terminal.
[0060] In a second aspect, an embodiment of the present application further provides 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, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the terminal to execute any one of the above antenna switching methods.
[0063] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, comprising a computer program, which, when executed on a terminal, enables the terminal to execute any of the above-described antenna switching methods.
[0064] In a fourth aspect, an embodiment of the present application further provides a computer program product, which includes executable instructions. When the executable instructions are executed on a terminal, the terminal executes any of the above-mentioned antenna switching methods.
[0065] In the fifth aspect, an embodiment of the present application also provides a chip system, which is applied to a terminal. The chip system includes one or more processors, and the processor is used to call computer instructions to enable the terminal to input data into the chip system, and execute any of the above-mentioned antenna switching methods to process the data and output the processing results.
[0066] The beneficial effects of the solutions provided by the embodiments in the second, third, fourth and fifth aspects can be referred to the beneficial effects of the solutions provided by the embodiments in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0068] Figure 1 A structural diagram of a terminal provided in an embodiment of the present application;
[0069] Figure 2 A software structure diagram of a terminal provided in an embodiment of the present application;
[0070] Figure 3a A schematic diagram of a first embodiment of the present application showing a user holding a terminal with both hands;
[0071] Figure 3b A schematic diagram of a second embodiment of the present application showing a user holding a terminal with both hands;
[0072] Figure 4 A flowchart of a first antenna switching method provided in an embodiment of the present application;
[0073] Figure 5 A flowchart of a second antenna switching method provided in an embodiment of the present application;
[0074] Figure 6 A flowchart of a third antenna switching method provided in an embodiment of the present application;
[0075] Figure 7 A flowchart of a fourth antenna switching method provided in an embodiment of the present application;
[0076] Figure 8 A structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0078] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first instruction and the second instruction are intended to distinguish different user instructions and do not limit their order. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0079] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0080] The antenna switching method provided in the embodiments of the present application is applied to a terminal. The terminal may be a mobile phone, tablet computer, laptop computer, personal digital assistant (PDA), smart watch, netbook, wearable electronic device, augmented reality (AR) device, virtual reality (VR) device, vehicle-mounted device, smart car, robot, smart glasses, smart TV, or other terminal equipped with an antenna. In this way, the terminal can improve the signal transmission and reception performance of the terminal by determining which physical antenna is its main antenna.
[0081] For example, Figure 1 The structure of the terminal 100 is shown. The terminal 100 may include a processor 110, a display screen 120, a camera 130, an 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 a cell and a battery protection device, a sensor module 180, a mobile communication module 190, a wireless communication module 200, an antenna 1, and an antenna 2. The sensor module 180 may include a pressure sensor 180A, a fingerprint sensor 180B, a touch sensor 180C, an ambient light sensor 180D, and the like.
[0082] Antenna 1 is an antenna used by the mobile communication module 190 for signal transmission and reception. Antenna 2 is an antenna used by the wireless communication module 200 for signal transmission and reception. Antenna 1 and antenna 2 are only examples and do not limit the number of antennas included in the terminal.
[0083] The best performing antenna is the terminal's main antenna, which is used for both signal transmission and reception and is typically located at the top or bottom of the terminal. The poorer performing antenna is the terminal's diversity antenna, which is used only for signal reception and is typically located in the middle of the terminal.
[0084] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the terminal 100. In other embodiments of the present application, the terminal 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0085] The processor 110 may include one or more processing units. For example, the processor 110 may include 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). The different processing units may be independent components or integrated into one or more processors. In some embodiments, the terminal 100 may also include one or more processors 110. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. In other embodiments, the processor 110 may also include a memory for storing instructions and data. For example, the memory in the processor 110 may be a cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated access, 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. The 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), a General-Purpose Input / Output (GPIO) interface, a SIM card interface, and / or a USB interface. The USB interface 160 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 160 may be used to connect a charger to charge the terminal 100, or to transfer data between the terminal 100 and peripheral devices. The USB interface 160 may also be used to connect headphones to play audio through the headphones.
[0087] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is for illustrative purposes only and does not constitute a structural limitation on the terminal 100. In other embodiments of the present application, the terminal 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0088] The wireless communication function of the terminal 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 190, the wireless communication module 200, the modem processor, and the baseband processor.
[0089] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0090] Terminal 100 implements display functions through a GPU, display screen 120, and an application processor. The GPU is a microprocessor for image processing that connects display screen 120 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-LED, a micro-o-LED, or a quantum dot light-emitting diode (QLED). In some embodiments, the terminal 100 may include one or more display screens 120.
[0092] In some embodiments of the present application, when the display panel adopts materials such as OLED, AMOLED, FLED, etc., the above Figure 1 The display screen 120 can be bent. Here, the display screen 120 can be bent to any angle at any position and can be maintained at that angle. For example, the display screen 120 can be folded in half from the middle to the left or right. It can also be folded in half from the middle to the top or bottom.
[0093] The display screen 120 of the terminal 100 may be a flexible screen. Currently, flexible screens have attracted much attention due to their unique characteristics and huge potential. Compared with traditional screens, flexible screens are more flexible and bendable, which can provide users with a new way of interaction based on the bendable characteristics, and can meet more user demands for the terminal. For terminals equipped with a foldable display, the foldable display on the terminal can be switched between a small screen in a folded form and a large screen in an unfolded form at any time. Therefore, users are using the split-screen function on terminals equipped with a foldable display more and more frequently.
[0094] The terminal 100 can implement a shooting function through an ISP, a camera 130, a video codec, a GPU, a display screen 120, and an application processor, wherein the camera 130 includes a front camera and a rear camera.
[0095] The ISP processes data fed back by the camera 130. For example, when shooting, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can perform algorithmic optimization on image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within the camera 130.
[0096] The camera 130 is used to take photos or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard red, green, blue (RGB), YUV, or other format. In some embodiments, the terminal 100 may include 1 or N cameras 130, where N is a positive integer greater than 1.
[0097] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the terminal 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0098] Video codecs are used to compress or decompress digital video. Terminal 100 may support one or more video codecs. This allows terminal 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0099] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in the terminal 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0100] The internal memory 140 can be used to store one or more computer programs, each of which includes instructions. The processor 110 can execute the above instructions stored in the internal memory 140, thereby causing the terminal 100 to perform the antenna switching method provided in some embodiments of the present 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 an operating system; the program storage area may also store one or more applications (such as a gallery, contacts, etc.). The data storage area may store data created during the use of the terminal 100 (such as photos, contacts, etc.). In addition, the internal memory 140 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more disk storage components, a flash memory component, a universal flash storage (UFS), etc. In some embodiments, the processor 110 can execute the instructions stored in the internal memory 140 and / or instructions stored in a memory provided in the processor 110, thereby causing the terminal 100 to execute the antenna switching method provided in the embodiments of the present application, as well as other applications and data processing.
[0101] The internal memory 140 can be used to store the relevant programs of the antenna switching method provided in the embodiment of the present application, and the processor 110 can be used to call the relevant programs of the antenna switching method stored in the internal memory 140 when displaying information to execute the antenna switching method of the embodiment of the present 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, and the like.
[0103] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 120. There are many types of pressure sensors 180A, including resistive, inductive, and capacitive pressure sensors. A capacitive pressure sensor may comprise at least two parallel plates made of conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes, and terminal 100 determines the intensity of the pressure 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 location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed; when a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.
[0104] The fingerprint sensor 180B is used to collect fingerprints. The terminal 100 can use the collected fingerprint characteristics to implement functions such as unlocking, accessing application locks, taking photos, and answering calls.
[0105] Touch sensor 180C, also known as a touch-sensitive device, can be provided on display screen 120. Touch sensor 180C and display screen 120 form a touch screen, also known as a touchscreen. Touch sensor 180C is used to detect touch operations applied thereto or in the vicinity thereof. Touch sensor 180C can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 120. In other embodiments, touch sensor 180C can also be provided on the surface of terminal 100, in a different location from display screen 120.
[0106] Ambient light sensor 180D is used to sense ambient light brightness. Terminal 100 can adaptively adjust the brightness of display screen 120 based on the perceived ambient light brightness. Ambient light sensor 180D can also be used to automatically adjust white balance during photography. Ambient light sensor 180D can also transmit information about the device's environment to the GPU.
[0107] The ambient light sensor 180D is also used to obtain the brightness, light ratio, color temperature, etc. of the acquisition environment in which the camera 130 captures images.
[0108] Figure 2The present invention is a software structure block diagram of a terminal applicable to an embodiment of the present application. The terminal software system can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The layered architecture divides the terminal software system into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software system can be divided into three layers, namely, the application layer (applications), the application framework layer (application framework) and the driver layer (hardware abstract layer, HAL).
[0109] The application layer can include a series of application packages, and the application layer runs applications by calling the application programming interface (API) provided by the application framework layer. Figure 2 As shown, the application package may include multiple applications, such as camera, gallery, browser, music, etc. It can be understood that the port of each of the above applications can be used to receive data.
[0110] The application framework layer provides API and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, and a Dynamic Host Configuration Protocol (DHCP) module.
[0111] The driver layer is the layer between hardware and software, responsible for driving the hardware and making it work. The driver layer can contain multiple drivers for driving the hardware. For example, there are drivers for cameras, displays, audio, and sensors.
[0112] In addition, the terminal also includes a hardware layer, which can include a camera, speaker, CPU, NPU, and modem processor, etc. The hardware layer is connected to the driver layer. The modem processor is used to modulate digital signals to obtain analog signals and transmit them through the physical antenna, and demodulate the analog signals received by the physical antenna to obtain digital signals.
[0113] In the embodiment of the present application, the main antenna is usually located at the bottom or top of the terminal. In some scenarios, when the user uses the application installed in the terminal, the terminal will be operated when the terminal is in landscape mode. The user will hold the top and bottom of the terminal, which will cause the signal receiving and transmitting performance of the main antenna to deteriorate significantly, thereby weakening the signal receiving and transmitting performance of the terminal. For example, the terminal is a mobile phone, and the user holds the mobile phone with one hand or with both hands to operate it. For example, see Figure 3a , the phone is in landscape mode, and the user holds the phone with both hands to play the game. Or, see Figure 3b When the phone is in landscape mode and the user is holding the phone with both hands to watch a video, the main antenna located at the top or bottom of the phone is held by the user, causing a significant deterioration in the terminal's signal reception and transmission performance. This in turn limits the network's allocation of uplink resources, resulting in a degraded user experience during service operations.
[0114] In order to solve the above problems, an embodiment of the present application provides an antenna switching method. According to the method provided in the embodiment of the present application, the terminal can use the physical antenna that makes the terminal's signal reception and transmission performance better as the main antenna, which can improve the terminal's signal reception and transmission performance.
[0115] Next, the antenna switching method provided in the embodiment of the present application is described in detail through specific embodiments.
[0116] In one embodiment of the present application, see Figure 4 , Figure 4 This is a flowchart of an antenna switching method provided in an embodiment of the present application. The method is applied to a terminal and includes the following steps:
[0117] S401: Detect whether the terminal meets the preset detection conditions.
[0118] The detection conditions include: the main antenna of the terminal is the first physical antenna located at a designated position of the terminal; and the designated position is the top position of the terminal or the bottom position of the terminal.
[0119] S402: When it is detected that the terminal meets the detection condition, 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: Acquire first quality data and second quality data.
[0121] Among them, the first quality data represents: the signal receiving and transmitting performance of the terminal when the main antenna of the terminal is the first physical antenna; the second quality data represents: the signal receiving and transmitting performance of the terminal when the main antenna of the terminal is the second physical antenna; the quality data includes: the jamming 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 transceiver performance indicated by the first quality data is higher than the signal transceiver performance indicated by the second quality data, switch the main antenna of the terminal from the second physical antenna to the first physical antenna.
[0123] As can be seen from the above, the solution provided by this embodiment is that, since the signal transceiver performance of the terminal may be poor when the main antenna of the terminal is the first physical antenna located at the top or bottom of the terminal, 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. Furthermore, based on the first quality data and the second quality data, the signal transceiver performance of the terminal when the main antenna of the terminal is the first physical antenna and when the main antenna of the terminal is the second physical antenna are compared. If the signal transceiver performance represented by the first quality data is higher than the signal transceiver performance represented by the second quality data, indicating that the signal transceiver performance of the terminal when the main antenna is the first physical antenna is higher than the signal transceiver performance of the terminal when the main antenna is the second physical antenna, the main antenna of the terminal is switched from the second physical antenna to the first physical antenna. That is, the physical antenna that provides better signal transceiver performance of the terminal can be used as the main antenna, which can improve the signal transceiver performance of the terminal.
[0124] With respect to step S401 , the preset detection condition is used to detect whether the signal receiving and transmitting performance of the terminal may be affected.
[0125] In one implementation, the detection condition includes: the main antenna of the terminal is a first physical antenna located at a designated position of the terminal; and the designated position is a top position of the terminal or a bottom position of the terminal.
[0126] The antenna switching method provided in the embodiments of the present application is applied to a processor in a terminal. For example, an application processor (AP) or a central processing unit (CPU). The processing method applied to an AP is similar to that applied to a CPU, and the following description will use the CPU as an example. The CPU obtains the physical antenna location of the terminal's current primary antenna from the terminal's modem processor.
[0127] When the main antenna of the terminal is the first physical antenna located at a designated position of the terminal, the main antenna may be held during user operation, and the signal transmission and reception of the main antenna may be affected, that is, the signal transmission and reception performance of the terminal may be affected, and the terminal is determined to meet the detection conditions.
[0128] In another implementation, the detection condition further includes: the terminal is in a horizontal screen state and the network connection of the terminal is in a normal state.
[0129] Accordingly, in Figure 4 Based on Figure 5 , step S401 may include the following steps:
[0130] S4011: Check whether the network connection of the terminal is normal.
[0131] S4012: When the network connection of the terminal is normal, detect whether the terminal is in a horizontal screen state.
[0132] S4013: When the terminal is in a horizontal state, detecting whether the main antenna of the terminal is a first physical antenna located at a designated position of the terminal.
[0133] S4014: When the main antenna of the terminal is a first physical antenna located at a designated position of the terminal, determine that the terminal meets a detection condition.
[0134] Detect whether the network connection of the terminal is in a normal state. The network connection of the terminal is in an abnormal state. For example, the network status of the terminal is Out Of Service (OOS), which means that the terminal is not connected to the network. Then the terminal cannot transmit and receive signals, and there is no need to pay attention to whether the signal transmission and reception performance of the terminal will be affected. Accordingly, the terminal does not perform antenna switching. Alternatively, the main antenna is switched to a physical antenna with a default configuration. For example, in the default configuration of the terminal, the main 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 main antenna is the first physical antenna located at the bottom of the terminal, antenna switching is not performed; if the current main antenna is the second physical antenna located in the middle of the terminal, the main antenna is switched from the second physical antenna to the first physical antenna.
[0135] If the network connection of the terminal is in a normal state, the terminal can transmit and receive signals, but the signal transmission and reception performance of the terminal may be affected. Accordingly, the terminal continues to detect whether it is in a horizontal screen state.
[0136] The terminal may be provided with a gravity sensor to obtain the rotation angle of the terminal. If the terminal portrait mode defaults to 0 degrees, then when the terminal rotation angle is 90 degrees or 270 degrees, the terminal is determined to be in landscape mode.
[0137] When the terminal is not in landscape mode, for example, in portrait mode, the user is less likely to operate the terminal with both hands, and 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.
[0138] When the terminal is in landscape mode, the user may hold the terminal with both hands to operate it. The terminal then detects whether the terminal's primary antenna is the first physical antenna located at a designated location on the terminal. If the primary antenna is not the first physical antenna located at the designated location on the terminal, even if the user holds the terminal with both hands to operate it, the user will not be holding the primary antenna, and the terminal will not perform antenna switching. Alternatively, the primary antenna will be switched to the default physical antenna.
[0139] When the main antenna of the terminal is the first physical antenna located at a designated position of the terminal, the main antenna may be held during user operation, and the signal transmission and reception of the main antenna may be affected, that is, the signal transmission and reception performance of the terminal may be affected, and the terminal is determined to meet the detection conditions.
[0140] As can be seen from the above, in the embodiment of the present 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 normal state, the terminal is in landscape state, and the main antenna is located at the specified position of the terminal. This can avoid the main antenna from frequently switching between the first physical antenna and the second physical antenna, thereby improving the stability of the terminal and reducing the power consumption of the terminal.
[0141] In some embodiments, before step S4013, the method may further include the following steps: obtaining a current operating frequency band of the terminal as a target frequency band, and determining a primary set of antennas for the target frequency band from multiple antennas in the terminal.
[0142] Correspondingly, step S4013 includes the following steps: detecting whether the main set antenna of the target frequency band in the terminal is the first physical antenna located at a designated position of the terminal.
[0143] The terminal operates in different frequency bands during different signal transmission and reception phases. For example, the frequency band in which the terminal receives signaling signals (such as reference signals) differs from the frequency band in which the terminal receives service signals. When the terminal operates in different frequency bands, it uses the physical antennas in those bands for signal transmission and reception.
[0144] Obtain the terminal's current target frequency band and, from among the terminal's multiple antennas, determine the primary antenna set for the target frequency band. This primary antenna set is also the antenna currently used by the terminal for signal transmission and reception. Check whether the primary antenna set for the target frequency band is the first physical antenna located at the terminal's specified location to determine whether 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 the embodiments of the present application, the primary antenna set for the target frequency band currently operated by the terminal is tested to determine whether the terminal's signal transceiver performance in the target frequency band is affected. Subsequently, the physical antenna that provides the terminal with better signal transceiver performance in the target frequency band is used as the primary antenna set, which can improve the terminal's signal transceiver performance in the target frequency band and enhance the user experience.
[0146] With respect to step S402, after determining that the terminal meets the detection conditions, the terminal's signal transceiver performance will be affected. Therefore, it is necessary to compare the terminal's signal transceiver performance when the first physical antenna serves as the primary antenna with the terminal's signal transceiver performance when the second physical antenna located in the middle of the terminal serves as the primary antenna to determine which of the first and second physical antennas serves as the primary antenna. Therefore, the terminal's primary antenna is switched from the first physical antenna to the second physical antenna, causing the terminal to operate for a period of time with the second physical antenna serving as the primary antenna, to determine the terminal's signal transceiver performance when the second physical antenna serves as the primary antenna.
[0147] In some embodiments, before step S402, the method may further include the following steps: detecting whether a preset detection period is reached.
[0148] Accordingly, step S402 includes the following steps: when it is detected that the terminal meets the detection condition and the detection period is reached, switching the main antenna of the terminal from the first physical antenna to the second physical antenna located in the middle of the terminal.
[0149] The detection period can be set by technicians according to actual needs. For example, the detection period can be 10 seconds, which is not specifically limited in the embodiments of this application.
[0150] When it is detected that the terminal meets the detection conditions, the terminal may have completed antenna switching in the previous detection cycle. If the detection cycle has not been reached, if the terminal's main antenna is switched from the first physical antenna to the second physical antenna, the main antenna will frequently switch between the first and second physical antennas, reducing the stability of the terminal. When the detection cycle is reached, the terminal's main antenna is switched from the first physical antenna to the second physical antenna to avoid frequent switching between the first and second physical antennas, thereby improving the stability of the terminal.
[0151] In some embodiments, the antenna switching method provided in the embodiments of the present application is applied to the CPU in the terminal. Figure 6 , the terminal switches antennas in the following manner:
[0152] S601: The CPU sends an antenna switching instruction to a control device in the terminal.
[0153] S602: After receiving the antenna switching instruction, the control device disconnects the link of the first physical antenna used for sending signals, and connects the link of the second physical antenna located in the middle of the terminal used for sending signals.
[0154] The CPU sends an antenna switching instruction to the control device in the terminal, switching the primary antenna from the first physical antenna to the second physical antenna. In accordance with the received antenna switching instruction, the control device disables the first physical antenna's ability to transmit signals, effectively disconnecting the link used by the first physical antenna for signal transmission, leaving the first physical antenna only able to receive signals, thereby switching the first physical antenna to a diversity antenna. Furthermore, the control device enables the second physical antenna's ability to transmit signals, effectively reconnecting the link used by the second physical antenna for signal transmission, enabling the second physical antenna to both transmit and receive signals, thereby switching the second physical antenna to the primary antenna.
[0155] As can be seen from the above, in the embodiment of the present application, the main antenna of the terminal is switched from the first physical antenna to the second physical antenna through a control device to obtain the signal transceiver performance of the terminal when the second physical antenna is used as the main antenna. Subsequently, the signal transceiver performance of the terminal when the first physical antenna is used as the main antenna is compared with the signal transceiver performance of the terminal when the second physical antenna located in the middle of the terminal is used as the main antenna to determine the physical antenna that has better signal transceiver performance of the terminal as the main antenna, which can improve the signal transceiver performance of the terminal.
[0156] With respect to step S403, after the main antenna set is switched from the first physical antenna to the second physical antenna, the terminal operates for a period of time with the main antenna set as the first physical antenna. First quality data of the terminal operating with the main antenna set as the first physical antenna is obtained. The first quality data can indicate the signal transceiver performance of the terminal when the main antenna set is the first physical antenna. Similarly, the terminal operates for a period of time with the main antenna set as the second physical antenna. Second quality data of the terminal operating with the main antenna set as the second physical antenna is obtained. The second quality data can indicate the signal transceiver performance of the terminal when the main antenna set is the second physical antenna.
[0157] The quality data includes: freeze information of applications running in the terminal, and / or strength parameters of signals received by the terminal.
[0158] In some embodiments, the jamming information includes at least one of the following: a resolution of an image displayed by an application running in the terminal, and a delay of the application running in the terminal.
[0159] When an application is running on a terminal, the application's user interface image is displayed on the screen. When the displayed image has a high resolution, the terminal's signal transmission and reception performance is better. When the displayed image has a low resolution, the terminal's signal transmission and reception performance is poor.
[0160] Application latency refers to the time from detection to user action and response to user action. When application latency is low, the terminal's signal transmission and reception performance is good. When application latency is high, the terminal's signal transmission and reception performance is poor.
[0161] As can be seen from the above, in the embodiments of the present application, information about application jamming running on the terminal is obtained. The resolution of the image displayed by the application and the delay of the application running in the jamming information can indicate the signal transceiver performance of the terminal. Subsequently, based on the jamming information of the application running on the terminal, a physical antenna that provides better signal transceiver performance of the terminal can be determined as the primary antenna, thereby improving the signal transceiver performance of the terminal.
[0162] In some embodiments, the strength parameter includes 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 may be a synchronization signal block (SSB).
[0164] RSRP is the average power of the signal received on the resource element (RE) used for receiving the reference signal within an Orthogonal Frequency Division Multiplexing (OFDM) symbol in the time domain. A larger 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 an OFDM symbol in the time domain. A larger RSSI value indicates better signal transmission and reception performance of the terminal.
[0166] RSRQ = N × (RSRP / RSSI), where N is the number of RBs contained in the RSSI measurement bandwidth in the frequency domain. A larger RSRQ value indicates better signal transceiver performance of the terminal.
[0167] The bit error rate can be referred to 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 bit error rate indicates better signal transmission and reception performance of the terminal.
[0168] As can be seen from the above, in the embodiments of the present application, the signal strength parameters received by the terminal are obtained. Among the strength parameters, RSRP, RSSI, RSRQ, and bit error rate can all represent the signal transceiver performance of the terminal. Subsequently, based on the information about the application jamming running on the terminal, the physical antenna that provides the terminal with better signal transceiver performance can be determined as the primary antenna, thereby improving the signal transceiver performance of the terminal.
[0169] In some embodiments, the antenna switching method in the embodiments of the present application is applied to the CPU in the terminal. Accordingly, step S403 may include the following steps: the CPU obtains the recorded first jamming information of the application running in the terminal, and obtains the first strength parameter of the signal received by the terminal from the modem processor in the terminal to obtain first quality data. The first jamming information is: jamming information of the application running in the terminal when the terminal's primary 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 primary antenna is the first physical antenna.
[0170] The CPU obtains recorded second jamming information of an application running on the terminal, and obtains a second strength parameter of a signal received by the terminal from the modem processor, thereby obtaining second quality data. The second jamming information is jamming information of an application running on the terminal when the primary antenna of the terminal is the second physical antenna, and the second strength parameter is a strength parameter of a signal received by the terminal when the primary antenna of the terminal is the second physical antenna.
[0171] Applications are run through the CPU, which can directly obtain the recorded first freeze information of applications running on the terminal. Signals sent and received by the terminal are processed by the modem processor, which records relevant information about the signals sent and received by the terminal. Therefore, the CPU obtains the first strength parameter of the terminal's primary antenna from the modem processor when the terminal's primary antenna is the first physical antenna. By obtaining the first freeze information and the first strength parameter, the CPU obtains the first quality data.
[0172] Similarly, the CPU obtains the recorded second jamming information and obtains the second strength parameter of the terminal's main antenna as the first physical antenna from the modem processor to obtain second quality data.
[0173] For 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 transceiver performance of the terminal when the main set antenna is the first physical antenna, and compares the signal transceiver performance of the terminal when the main set antenna is the second physical antenna, and determines which one of the first physical antenna and the second physical antenna to use as the main set antenna based on the comparison result.
[0174] In one implementation, the quality data includes: freeze information of applications running in the terminal.
[0175] Correspondingly, when the signal transceiver performance represented by the first jamming information in the first quality data is higher than the signal transceiver performance represented by the second jamming information in the second quality data, it indicates that the signal transceiver performance represented by the first quality data is higher than the signal transceiver performance represented by the second quality data.
[0176] The signal transceiver performance indicated by the first jam information in the first quality data is higher than the signal transceiver performance indicated by the second jam information in the second quality data, including at least one of the following:
[0177] The resolution of the image displayed by the application running in the terminal in the first freeze information is greater than the resolution of the image displayed by the application running in the terminal in the second freeze information.
[0178] The delay of the application running in the terminal in the first freeze information is smaller than the delay of the application running in the terminal in the second freeze information.
[0179] On the contrary, when the signal transceiver performance represented by the first jamming information in the first quality data is lower than the signal transceiver performance represented by the second jamming information in the second quality data, it indicates that the signal transceiver performance represented by the first quality data is lower than the signal transceiver performance represented by the second quality data.
[0180] The signal transceiver performance indicated by the first jam information in the first quality data is lower than the signal transceiver performance indicated by the second jam information in the second quality data, including:
[0181] The resolution of the image displayed by the application running in the terminal in the first freeze information is smaller than the resolution of the image displayed by the application running in the terminal in the second freeze information.
[0182] The delay of the application running in the terminal in the first freeze information is greater than the delay of the application running in the terminal in the second freeze information.
[0183] In another implementation, the quality data includes: a strength parameter of a signal received by the terminal.
[0184] Correspondingly, when 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, it indicates that the signal transceiver performance represented by the first quality data is higher than the signal transceiver performance represented by the second quality data.
[0185] The signal transceiver performance indicated by the first strength parameter in the first quality data is higher than the signal transceiver performance indicated 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 lower than the bit error rate of the service signal received by the terminal in the second strength parameter.
[0190] Conversely, when the signal transceiver performance represented by the first strength parameter in the first quality data is lower than the signal transceiver performance represented by the second strength parameter in the second quality data, it indicates that the signal transceiver performance represented by the first quality data is lower than the signal transceiver performance represented by the second quality data.
[0191] The signal transceiver performance indicated by the first strength parameter in the first quality data is lower than the signal transceiver performance indicated 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 smaller 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 smaller 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 smaller 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: jamming information of applications running on the terminal, and a strength parameter of a signal received by the terminal. When the jamming information in the quality data and the signal transceiver performance indicated by the strength parameter are inconsistent, because the jamming of the application indicated by the jamming information directly affects the user experience, the priority of the jamming information is set higher than the priority of the strength parameter. That is, when the signal transceiver performance indicated by first jamming information in the first quality data is higher than the signal transceiver performance indicated by second jamming information in the second quality data, the signal transceiver performance indicated by the first quality data is directly determined to be higher than the signal transceiver performance indicated by the second quality data.
[0197] Accordingly, the signal transceiver performance indicated by the first quality data is higher than the signal transceiver performance indicated by the second quality data, including:
[0198] The signal reception and transmission performance represented by the first jamming information in the first quality data is higher than the signal reception and transmission performance represented by the second jamming information in the second quality data, and the signal reception and transmission performance represented by the first strength parameter in the first quality data is higher than the signal reception and transmission performance represented by the second strength parameter in the second quality data.
[0199] or,
[0200] The signal reception and transmission performance represented by the first jamming information in the first quality data is higher than the signal reception and transmission performance represented by the second jamming information in the second quality data, and the signal reception and transmission performance represented by the first strength parameter in the first quality data is lower than the signal reception and transmission performance represented by the second strength parameter in the second quality data.
[0201] Furthermore, when the signal transceiver performance represented by the first quality data is higher than the signal transceiver performance 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, that is, the signal transceiver performance of the terminal using the first physical antenna as the main antenna is better, and 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 the embodiment of the present application, when the signal transceiver performance indicated by the first jamming information in the first quality data is higher than the signal transceiver performance indicated by the second jamming information in the second quality data, the signal transceiver performance indicated by the first quality data is determined to be higher than the signal transceiver performance indicated by the second quality data. That is, when the jamming information in the quality data and the signal transceiver performance indicated by the strength parameter are inconsistent, the priority of the jamming information is set to be higher than the priority of the strength parameter. The jamming condition of the application indicated by the jamming information directly affects the user experience. The primary antenna of the terminal is determined based on the jamming information to improve the user experience.
[0203] In some embodiments, after step S403, the method may further include the following steps: 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, keeping the main antenna of the terminal as the second physical antenna.
[0204] The signal transceiver performance indicated by the first quality data is no higher than the signal transceiver performance indicated by the second quality data, including:
[0205] The signal reception and transmission performance represented by the first jamming information in the first quality data is no higher than the signal reception and transmission performance represented by the second jamming information in the second quality data, and the signal reception and transmission performance represented by the first strength parameter in the first quality data is higher than the signal reception and transmission performance represented by the second strength parameter in the second quality data.
[0206] or,
[0207] The signal reception and transmission performance represented by the first jamming information in the first quality data is not higher than the signal reception and transmission performance represented by the second jamming information in the second quality data, and the signal reception and transmission performance represented by the first strength parameter in the first quality data is lower than the signal reception and transmission performance represented by the second strength parameter in the second quality data.
[0208] If the signal transceiver performance indicated by the first quality data is no higher than the signal transceiver performance indicated by the second quality data, this 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 the signal transceiver performance of the terminal is better when the second physical antenna is used as the primary antenna, or if the difference in signal transceiver performance between the second physical antenna and the first physical antenna is not significant, then maintaining the second physical antenna as the primary antenna improves the signal transceiver performance of the terminal, eliminates the need for antenna switching, and reduces power consumption of the terminal.
[0209] See also Figure 7 , Figure 7 A flowchart of an antenna switching method provided in an embodiment of the present application is provided. The method is applied to an AP in a terminal, and the AP performs antenna switching in the following manner.
[0210] Detecting Out-of-System (OOS) status means detecting whether the terminal's network connection is abnormal. If the terminal's network connection is OOS, all antenna timings are stopped and returned to their initial state. This means that when the terminal's network connection is abnormal, antenna switching detection is not performed and the terminal's primary antenna is switched to the default physical antenna.
[0211] When the terminal's network connection is not out of service (OOS), that is, when the terminal's network connection is in a normal state, detect whether the terminal is in landscape mode. If the terminal is not in landscape mode, stop all antenna timings and return to the initial state, that is, do not perform antenna switching detection, and switch the terminal's main antenna to the default physical antenna.
[0212] When the terminal is in landscape mode, the target frequency band in which the terminal is currently operating 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. When 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 the initial state, that is, antenna switching detection is not performed, and the main antenna of the terminal is switched to the physical antenna with the default configuration.
[0213] When the primary antenna for the target frequency band is the first physical antenna located at the top or bottom of the terminal, T1 is started. T1 represents the detection period in the aforementioned embodiment, for example, 10 seconds. This is to check whether the detection period has expired. If T1 times out, that is, if the detection period has expired, a switching instruction is sent to the front-end control device. Specifically, the AP in the terminal sends the switching instruction to the front-end control device, 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, if T1 times out, that is, when the detection period is reached, the AP queries the RSRP / RSSI, bit error, and jamming status of the physical antenna serving as the primary antenna. Specifically, the AP obtains first quality data from the modem when the primary antenna is the first physical antenna. The first quality data includes at least one of RSRP / RSSI, bit error, and jamming status. The physical antenna is a single-ended antenna (PRX).
[0215] After the switch is successful, a delay of T2 is applied to query the RSRP / RSSI, BLER, and jamming status of the central antenna. This means that after the primary antenna is switched from the first physical antenna to the second physical antenna, the terminal operates with the primary antenna as the second physical antenna for T2. The AP then obtains second quality data from the modem when the primary antenna is the second physical antenna. T2 is set by technicians based on requirements, for example, 1 second. This second quality data includes at least one of RSRP / RSSI, BLER, and jamming status.
[0216] Then, the RSRP / RSSI, BLER, and jamming conditions in the first and second quality data are compared, and a decision is made based on the comparison results whether to revert back. Specifically, the signal transceiver performance represented by the first quality data is compared with the signal transceiver performance represented by the second quality data. If the comparison result shows that the signal transceiver performance represented by the first quality data is higher than the signal transceiver performance represented by the second quality data, revert back is required, and a switching instruction is sent to the front-end control device. Specifically, the AP in the terminal sends the switching instruction to the front-end control device, which then switches the primary antenna from the second physical antenna to the first physical antenna.
[0217] If the comparison result shows that the signal transceiver performance indicated by the first quality data is not higher than the signal transceiver performance indicated by the second quality data, the terminal maintains the primary antenna as the second physical antenna, that is, no reswitching is performed. The terminal then detects whether the antenna switching is successful. After the switching is successful, the terminal continues to detect whether the out-of-range (OOS) condition is present, and performs subsequent processing based on the detection result.
[0218] As can be seen from the above, the solution provided by this embodiment is that, since the signal transceiver performance of the terminal may be poor when the main antenna of the terminal is the first physical antenna located at the top or bottom of the terminal, 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. Furthermore, based on the first quality data and the second quality data, the signal transceiver performance of the terminal when the main antenna of the terminal is the first physical antenna is compared with the signal transceiver performance when the main antenna of the terminal is the second physical antenna. If the signal transceiver performance represented by the first quality data is higher than the signal transceiver performance represented by the second quality data, indicating that the signal transceiver performance of the terminal when the main antenna is the first physical antenna is higher than the signal transceiver performance when the main antenna is the second physical antenna, the main antenna of the terminal is switched from the second physical antenna to the first physical antenna. That is, the physical antenna that provides better signal transceiver performance of the terminal can be used as the main antenna, which can improve the signal transceiver performance of the terminal and enhance the user experience.
[0219] In a specific implementation, the present application also provides a terminal, which includes one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the terminal to execute some or all of the steps in the above method embodiments.
[0220] The present application also provides a computer-readable storage medium including a computer program. When the computer program is executed on a terminal, the terminal executes some or all of the steps in the above method embodiment. The above storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0221] In a specific implementation, an embodiment of the present application further provides a computer program product, which includes executable instructions. When the executable instructions are executed on a terminal, the terminal executes some or all of the steps in the above method embodiment.
[0222] like Figure 8 As shown, the present application also provides a chip system, which is applied to a terminal. The chip system includes one or more processors 801. The processor 801 is used to call computer instructions so that the terminal inputs the data to be processed into the chip system. The chip system processes the data based on the antenna switching method provided in an embodiment of the present application and outputs the processing results.
[0223] In one possible implementation, the chip system further 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. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes 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 perform the functions described herein 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, a 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] Program code can be implemented with a high-level programming language or an object-oriented programming language to communicate with the processing system. Where necessary, program code can also be implemented in assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of 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 can be implemented in hardware, firmware, software or any combination thereof. The disclosed embodiments can also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which can be read and executed by one or more processors. For example, instructions can be distributed over a network or by other computer-readable media. Therefore, machine-readable media can include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to, floppy disks, optical disks, optical disks, compact disc read-only memories (Compact Disc Read Only Memory, CD-ROMs), magneto-optical disks, read-only memories, random access memories, erasable programmable read-only memories (Erasable Programmable Read Only Memory, EPROM), electrically erasable programmable read-only memories (Electrically Erasable Programmable Read Only Memory, EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable memories for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) using the Internet in electrical, optical, acoustic or other forms of propagation signals. Accordingly, machine-readable media includes any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).
[0228] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the accompanying drawings. In addition, the inclusion of a structural or method feature in a particular figure does not imply that such a feature is required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.
[0229] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems raised by this application. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units / modules that are not closely related to solving the technical problems raised by this application. This does not mean that other units / modules do not exist in the above-mentioned device embodiments.
[0230] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "including a" does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0231] Although the present application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims
1. An antenna switching method, characterized in that: The method is applied to a terminal, and includes: Detecting whether the terminal meets a preset detection condition; wherein the detection condition includes: the main antenna of the terminal is a first physical antenna located at a specified position of the terminal; the specified position is a top position of the terminal, or a bottom position of the terminal; When it is detected that the terminal meets the detection condition, switching the main antenna of the terminal from the first physical antenna to the second physical antenna located in the middle of the terminal; Obtaining first quality data and second quality data; wherein the first quality data indicates signal transceiver performance of the terminal when the primary antenna of the terminal is the first physical antenna; and the second quality data indicates signal transceiver performance of the terminal when the primary antenna of the terminal is the second physical antenna; the quality data includes: jamming information of applications running on the terminal, and / or strength parameters of signals received by the terminal; When the signal transceiver performance indicated by the first quality data is higher than the signal transceiver performance indicated by the second quality data, the main antenna of the terminal is switched from the second physical antenna to the first physical antenna.
2. The method according to claim 1, characterized in that The detection conditions also include: the terminal is in a horizontal screen state and the network connection of the terminal is in a normal state; The detecting whether the terminal meets a preset detection condition includes: Detecting whether the network connection of the terminal is normal; When the network connection of the terminal is in a normal state, detecting whether the terminal is in a horizontal screen state; When the terminal is in a horizontal state, detecting whether a primary antenna of the terminal is a first physical antenna located at a designated position of the terminal; When the main antenna of the terminal is a first physical antenna located at a designated position of the terminal, it is determined that the terminal meets the detection condition.
3. The method according to claim 2, characterized in that Before detecting whether the main antenna of the terminal is a first physical antenna located at a designated position of the terminal, the method further includes: Obtaining a current operating frequency band of the terminal as a target frequency band; Determining a primary antenna of the target frequency band from multiple antennas in the terminal; The detecting whether the main antenna of the terminal is a first physical antenna located at a designated position of the terminal includes: It is detected whether the main antenna of the target frequency band in the terminal is a first physical antenna located at a designated position of the terminal.
4. The method according to claim 1, wherein The quality data includes: freeze information of applications running in the terminal, and strength parameters of signals received by the terminal; The signal transceiver performance indicated by the first quality data is higher than the signal transceiver performance indicated by the second quality data, including: The signal transceiver performance indicated by the first jam information in the first quality data is higher than the signal transceiver performance indicated by the second jam information in the second quality data, and the signal transceiver performance indicated by the first strength parameter in the first quality data is higher than the signal transceiver performance indicated by the second strength parameter in the second quality data; or, The signal reception and transmission performance represented by the first jamming information in the first quality data is higher than the signal reception and transmission performance represented by the second jamming information in the second quality data, and the signal reception and transmission performance represented by the first strength parameter in the first quality data is lower than the signal reception and transmission performance represented by the second strength parameter in the second quality data.
5. The method according to claim 4, characterized in that The intensity 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.
6. The method according to claim 5, characterized in that The signal transceiver performance indicated by the first strength parameter in the first quality data is higher than the signal transceiver performance indicated 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.
7. The method according to claim 4, characterized in that The jamming information includes at least one of the following: a resolution of an image displayed by an application running in the terminal, and a delay of an application running in the terminal.
8. The method according to claim 7, characterized in that The signal transceiver performance indicated by the first jam information in the first quality data is higher than the signal transceiver performance indicated by the second jam information in the second quality data, including at least one of the following: The resolution of the image displayed by the application running in the terminal in the first freeze information is greater than the resolution of the image displayed by the application running in the terminal in the second freeze information; The delay of the application running in the terminal in the first freeze information is smaller than the delay of the application running in the terminal in the second freeze information.
9. The method according to claim 1, characterized in that The method is applied to the CPU in the terminal; The obtaining of the first quality data and the second quality data includes: The CPU obtains recorded first jamming information of an application running in the terminal, and obtains a first strength parameter of a signal received by the terminal from a modem processor in the terminal, to obtain first quality data; wherein the first jamming information is jamming information of the application running in the terminal when the primary antenna of the terminal is the first physical antenna; and the first strength parameter is a strength parameter of the signal received by the terminal when the primary antenna of the terminal is the first physical antenna. The CPU obtains the recorded second jamming information of the application running in the terminal, and obtains a second strength parameter of the signal received by the terminal from the modem processor to obtain second quality data; wherein the second jamming information is: the jamming 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.
10. 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 detecting that the terminal meets the detection condition, the method further includes: Check whether the preset detection cycle has been reached; The method 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 detecting that the terminal meets the detection condition includes: When it is detected that the terminal meets the detection condition 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.
11. The method according to claim 1, wherein After obtaining the first quality data and the second quality data, the method further includes: When the signal transceiver performance indicated by the first quality data is not higher than the signal transceiver performance indicated by the second quality data, the main antenna of the terminal is maintained as the second physical antenna.
12. The method according to claim 1, characterized in that The method is applied to the CPU in the terminal; The switching of 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 instruction to a control device in the terminal; After receiving the antenna switching instruction, the control device disconnects the link of the first physical antenna for sending signals, and connects the link of the second physical antenna located in the middle of the terminal for sending signals.
13. A terminal, characterized in that: include: one or more processors and memory; The memory is coupled to the one or more processors, and is configured to store computer program codes, where the computer program codes include computer instructions. The one or more processors invoke the computer instructions to enable the terminal to execute the method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that The method comprises a computer program, which, when executed on a terminal, causes the terminal to execute the method according to any one of claims 1 to 12.
15. A computer program product, characterized in that The computer program product comprises executable instructions, and when the executable instructions are executed on a terminal, the terminal is caused to execute the method according to any one of claims 1 to 12.
16. A chip system, characterized in that: The chip system is applied to a terminal, and the chip system includes one or more processors, which are used to call computer instructions to enable the terminal to input data into the chip system, and execute the method described in any one of claims 1-12 to process the data and output the processing results.
Citation Information
Patent Citations
Antenna switching method and terminal
CN105281819A
Antenna switching trigger control method, communication terminal and computer-readable storage medium
CN107612581A
Antenna switching method, mobile terminal and computer readable storage medium
CN108429575A
Antenna switching method and mobile terminal
CN109217882A
Beam switching method, mobile terminal and computer readable storage medium
US20200178134A1