Antenna switching method and device, electronic equipment and medium
By dividing multiple radiation pattern areas in the electronic device and selecting appropriate antennas for communication, the problem of antenna gain imbalance in the prior art is solved, and the quality of uplink communication services is improved.
Patent Information
- Application Number
- CN202411663163.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-02-11
AI Technical Summary
Existing antenna switching technology is prone to an imbalance in antenna gains between transmit frequency points and receive frequency points, affecting the quality of uplink communication services.
By setting N antennas in the electronic device and dividing their radiation pattern into M radiation pattern areas, at least one antenna in each area satisfies that the difference between the received frequency point power and the transmit frequency point power is less than or equal to the pre- Set a threshold. According to the signal reception power and relative position information, the appropriate target antenna is selected for communication and switch the antenna when necessary to maintain gain balance.
It effectively avoids communication problems caused by large gain differences between the antenna transmit frequency points and receive frequency points, and improves the quality of uplink communication services.
Smart Images

Figure CN119420390A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communications, and specifically relates to an antenna switching method, device, electronic equipment and medium. Background Art
[0002] In the existing mobile communication technology, under the frequency division duplex (FDD) communication system, many working frequency bands have wide bandwidths, and the frequencies of antenna transmission and reception differ greatly. In most frequency bands, the transmission and reception efficiency differ by 1 to 2 db, and the gain in different directions is different, with large differences at certain angles. At present, antenna switching is mainly achieved by comparing the antenna gain of each antenna in the direction of connecting to the base station, that is, the reference signal received power (RSRP), and selecting the antenna with the best RSRP. That is, the existing technology selects an antenna with poor transmission performance based on the receiving performance, which easily leads to an imbalance in the antenna gain between the transmitting frequency point and the receiving frequency point, thereby affecting the quality of the uplink communication service. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an antenna switching method, device, electronic device and medium, which can solve the problem that the existing antenna switching technology is prone to antenna gain imbalance between the transmitting frequency and the receiving frequency, thereby affecting the quality of uplink communication services.
[0004] In a first aspect, an embodiment of the present application provides an antenna switching method, which is performed by an electronic device, wherein the electronic device is provided with N antennas, and the antenna radiation pattern of the electronic device is divided into M radiation pattern areas, each radiation pattern area in the M radiation pattern areas corresponds to a radiation direction quadrant, and there is at least one antenna in each radiation pattern area that satisfies a first condition, wherein the first condition includes that the difference between the receiving frequency point power and the transmitting frequency point power is less than or equal to a first preset threshold, and N and M are both integers greater than 1; the method includes:
[0005] According to the signal receiving powers of the N antennas, selecting a first target antenna whose signal receiving power meets a first preset condition for communication, wherein the first preset condition includes that the signal receiving power is the maximum or the signal receiving power is greater than a predetermined power threshold;
[0006] Determining a target radiation pattern area among the M radiation pattern areas according to the relative position information of the electronic device and the base station;
[0007] In a case where a first difference between a receiving frequency power and a transmitting frequency power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, determining a second target antenna among the N antennas that meets a second preset condition, wherein the second preset condition at least includes: a second difference between a receiving frequency power and a transmitting frequency power of the second target antenna in the target radiation pattern area is less than the first difference;
[0008] Whether to switch from the first target antenna to the second target antenna is controlled according to a signal receiving power relationship between the first target antenna and the second target antenna.
[0009] In a second aspect, an embodiment of the present application provides an antenna switching device, which is provided in an electronic device, wherein the electronic device is provided with N antennas, and the antenna radiation pattern of the electronic device is divided into M radiation pattern areas, each radiation pattern area in the M radiation pattern areas corresponds to a radiation direction quadrant, and there is at least one antenna in each radiation pattern area that satisfies a first condition, wherein the first condition includes that the difference between the receiving frequency point power and the transmitting frequency point power is less than or equal to a first preset threshold value, and N and M are both integers greater than 1; the antenna switching device includes:
[0010] A selection module, configured to select, according to the signal reception powers of the N antennas, a first target antenna whose signal reception power satisfies a first preset condition for communication, wherein the first preset condition includes that the signal reception power is the maximum or the signal reception power is greater than a predetermined power threshold;
[0011] A first determination module, configured to determine a target radiation pattern area among the M radiation pattern areas according to relative position information between the electronic device and the base station;
[0012] A second determination module is used to determine a second target antenna among the N antennas that meets a second preset condition when a first difference between a receiving frequency point power and a transmitting frequency point power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, wherein the second preset condition at least includes: a second difference between a receiving frequency point power and a transmitting frequency point power of the second target antenna in the target radiation pattern area is less than the first difference;
[0013] The first control module is used to control whether to switch from the first target antenna to the second target antenna according to the signal receiving power relationship between the first target antenna and the second target antenna.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0017] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0018] In an embodiment of the present application, an antenna switching method is performed by an electronic device, the electronic device is provided with N antennas, the antenna radiation pattern of the electronic device is divided into M radiation pattern areas, each radiation pattern area in the M radiation pattern areas corresponds to a radiation direction quadrant, and there is at least one antenna in each radiation pattern area that satisfies a first condition, the first condition includes that the difference between the receiving frequency point power and the transmitting frequency point power is less than or equal to a first preset threshold, and N and M are both integers greater than 1; the method includes: according to the signal receiving power of the N antennas, selecting a first target antenna whose signal receiving power meets the first preset condition for communication, the first preset condition includes that the signal receiving power is the maximum or the signal receiving power is greater than a preset power threshold; according to the relative position information of the electronic device and the base station, determine the target radiation pattern area in the M radiation pattern areas; when the first difference between the receiving frequency power and the transmitting frequency power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, determine the second target antenna in the N antennas that meets the second preset condition, wherein the second preset condition at least includes: the second difference between the receiving frequency power and the transmitting frequency power of the second target antenna in the target radiation pattern area is less than the first difference; according to the signal receiving power relationship between the first target antenna and the second target antenna, control whether to switch from the first target antenna to the second target antenna. In this way, by dividing the radiation pattern of the electronic device and determining the target radiation pattern area according to the relative position information of the electronic device and the base station, and then controlling the antenna switching according to the difference between the receiving frequency power and the transmitting frequency power of each antenna in the area, and the signal receiving power, it is possible to ensure that the antenna gain of the transmitting frequency and the receiving frequency is equivalent as much as possible, thereby avoiding the problem that the antenna transmitting frequency and the receiving frequency gain are greatly different in some scenarios and affect the quality of uplink communication services. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a flow chart of an antenna switching method provided in an embodiment of the present application;
[0020] Figure 2 It is a schematic diagram of approximating the far-field radiation pattern of the antenna of the electronic device to a sphere, provided in an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of the relative position direction of a base station and an electronic device provided in an embodiment of the present application;
[0022] Figure 4 is a general flow chart of antenna switching provided by an embodiment of the present application;
[0023] Figure 5is a flow chart of antenna switching in an unbalanced state 1 provided in an embodiment of the present application;
[0024] Figure 6 is a flow chart of antenna switching in unbalanced state 2 provided in an embodiment of the present application;
[0025] Figure 7 is a structural diagram of an antenna switching device provided in an embodiment of the present application;
[0026] Figure 8 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0027] Fig. 9 It is a hardware structure diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0030] In order to make the embodiments of the present application clearer, the following briefly introduces the relevant background technology knowledge involved in the embodiments of the present application and the purpose of the present application:
[0031] In the prior art, antenna switching is achieved by comparing the RSRP of each antenna, that is, the antenna gain of the current antenna in the direction of the connection to the base station, and then switching and selecting the antenna with the best RSRP. Considering that some FDD frequency bands have a wide bandwidth, the frequency difference between transmission and reception is large, and most frequency bands have a difference of 1 to 2db between transmission and reception efficiency. The prior art can make transmission and reception compensation based on omnidirectional efficiency to avoid the problem of limited uplink communication services caused by imbalance. However, the prior art has the following defects:
[0032] The current FDD transmission frequency and receiving frequency are different. For some frequency bands such as B1, not only are the omnidirectional efficiencies of the transmission and reception frequencies quite different, but the gains in different directions are also different, and the difference is quite large at certain angles. This difference is even greater than the omnidirectional efficiency difference. The existing technology can only compensate through omnidirectional efficiency, and cannot identify the antenna gain differences in certain directions, or cannot optimize the antenna to reduce the difference.
[0033] Therefore, in certain scenarios, such as when there is only one base station outdoors, and the relative positions of the base station and the mobile electronic device happen to be in quite different directions, there will be a problem of limited uplink communication services.
[0034] In view of the above technical problems, this application proposes an antenna switching solution, which can ensure that the antenna with the same antenna gain as the receiving frequency point is switched in different directions, thereby avoiding the connection problem or uplink limitation caused by the large difference between the antenna gain of the transmitting frequency point and the antenna gain of the receiving frequency point in some scenarios. The idea of this application solution is as follows:
[0035] 1) By designing multiple antennas, the overlapping directions cover all directions of electronic devices such as mobile phones, achieving all-round "dead spot" coverage of TX and RX frequencies;
[0036] 2) The relative position between the electronic device and the base station is obtained by using the electronic device's connection to the base station information, the electronic device's global positioning system (GPS) function, and the electronic device's own gyroscope sensor;
[0037] 3) Based on the relative position of the electronic device and the base station obtained in 2), an antenna whose antenna gain at the transmitting frequency point is as close as possible to the antenna gain at the receiving frequency point is selected from the multiple antennas in 1).
[0038] The antenna switching method provided in the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0039] See also Figure 1 , Figure 1 A flowchart of an antenna switching method provided in an embodiment of the present application is executed by an electronic device, wherein the electronic device is provided with N antennas, and the antenna radiation pattern of the electronic device is divided into M radiation pattern areas, each radiation pattern area in the M radiation pattern areas corresponds to a radiation direction quadrant, and there is at least one antenna in each radiation pattern area that satisfies a first condition, wherein the first condition includes that the difference between the receiving frequency point power and the transmitting frequency point power is less than or equal to a first preset threshold value, and N and M are both integers greater than 1; Figure 1 As shown, the method comprises the following steps:
[0040] Step 101: Select a first target antenna whose signal reception power meets a first preset condition for communication according to the signal reception power of the N antennas. The first preset condition includes that the signal reception power is maximum or the signal reception power is greater than a predetermined power threshold.
[0041] The embodiments of the present application are applicable to communication scenarios where the antenna transmission frequency band and the receiving frequency band are greatly different, for example, communication scenarios using the frequency division duplex FDD standard. The embodiments of the present application can be mainly implemented for this application scenario. The TDD communication standard is not considered within the scope of this application.
[0042] In the embodiment of the present application, the electronic device may be provided with a plurality of antennas. For example, antennas may be arranged around the metal frame of the electronic device. The antenna radiation pattern of the electronic device may be radiated in 360 degrees with the electronic device itself as the center. Thus, in some embodiments, the antenna radiation pattern of the electronic device may be approximated as a spherical radiation pattern with itself as the center, such as Figure 2 shown.
[0043] In order to subdivide the radiation directions of the antenna of the electronic device, the antenna radiation pattern of the electronic device can be divided into multiple radiation pattern areas. Taking equal division as an example, the radiation pattern areas after division are the same size, but the orientation is different. Specifically, the 360-degree antenna radiation pattern can be divided into quadrants according to the direction, thereby obtaining multiple radiation pattern areas corresponding to different radiation direction quadrants.
[0044] In the embodiment of the present application, in order to ensure that the antenna with the receiving frequency power equivalent to the transmitting frequency power (that is, the difference is very small or 0) can be switched in each radiation direction, it can be ensured that at least one antenna in each radiation pattern area meets the requirement that the receiving frequency power and the transmitting frequency power are equivalent. Specifically, in each radiation pattern area, there is at least one antenna whose difference between the receiving frequency power and the transmitting frequency power is less than or equal to a first preset threshold. For example, the first preset threshold can be 3dB, 2.5dB, etc.
[0045] Optionally, the M radiation pattern areas are divided in the following manner:
[0046] The radiation pattern of the electronic device is converted into a spherical radiation pattern, which is divided into a first hemisphere part and a second hemisphere part with the center of the spherical radiation pattern as the center, and the first hemisphere part and the second hemisphere part are symmetrically divided into M / 2 equal parts, respectively, to obtain the M radiation pattern areas, wherein the spherical radiation pattern has the position of the electronic device as the center.
[0047] In one embodiment, the Figure 2 As shown, the radiation pattern of the electronic device 100 is approximately converted into a spherical radiation pattern with the position of the electronic device 100 as the sphere center, and the spherical radiation pattern can be divided into two hemispherical parts, such as the upper hemisphere part and the lower hemisphere part, or the left hemisphere part and the right hemisphere part, with the sphere center of the spherical radiation pattern as the center. Then, the two hemisphere parts are symmetrically and evenly divided into a number of regions, such as Figure 2 In the figure, the upper hemisphere is divided into 4 regions evenly, and the lower hemisphere is also divided into 4 regions symmetrically with the horizontal plane as the axis. That is, for each region in the upper hemisphere, there is a region in the lower hemisphere that is symmetrical to it, and finally 8 radiation pattern regions are obtained.
[0048] In this way, through this division, it is helpful to subsequently judge the antenna gain difference status of the receiving frequency and the transmitting frequency at each position of the base station relative to the electronic device, and ensure that the antenna with the receiving frequency gain equivalent to the transmitting frequency gain can be switched to in each position.
[0049] It should be noted that the relationship between N and M can be N greater than M, N less than M, or N equal to M. For example, M=8, that is, the radiation pattern of the electronic device is divided into 8 areas, and the number of antennas N deployed in the electronic device can be greater than or equal to 8, such as at least one antenna is deployed corresponding to each radiation pattern area. N can also be less than 8, such as one antenna may cover one or more radiation pattern areas.
[0050] In the embodiment of the present application, the above-mentioned signal receiving power can be an indicator such as RSRP, gain, etc. that characterizes the signal downlink power or antenna receiving performance.
[0051] Specifically, when the electronic device just starts to connect to the base station at the current location, it can first poll each of the N antennas and select an antenna with better or best signal reception power as the first target antenna based on the signal reception power of each antenna to communicate with the base station. Exemplarily, the antenna with the best RSRP, that is, the best reception gain, can be selected initially.
[0052] Step 102: Determine a target radiation pattern area among the M radiation pattern areas according to the relative position information of the electronic device and the base station.
[0053] The relative position information of the electronic device and the base station may refer to the relative position state of the electronic device and the base station, and may be specifically expressed by the position and distance of the base station relative to the electronic device. In practical applications, the position of the base station relative to the electronic device may be determined based on the relative position information, that is, the position of the electronic device at which the base station is located; further, it may be determined in which radiation pattern area of the electronic device the position of the base station relative to the electronic device corresponds, and the radiation pattern area is also the target radiation pattern area.
[0054] For example, Figure 3 As shown, there are base stations at the four positions of the electronic device 100, namely base station 1, base station 2, base station 3 and base station 4. When the electronic device 100 is connected to base station 1, according to the position of base station 1 relative to the electronic device 100, the radiation pattern area 1 is located in the upper hemisphere. Therefore, it can be determined that the radiation pattern area 1 is the target radiation pattern area.
[0055] Optionally, step 102 includes:
[0056] Acquire location information of the base station and positioning information of the electronic device;
[0057] Determining the relative position information according to the position information and the positioning information;
[0058] Determining a relative direction between the electronic device and the base station according to the relative position information;
[0059] According to the relative direction, a target radiation pattern area corresponding to the relative direction among the M radiation pattern areas is determined.
[0060] Specifically, the electronic device can identify the connected base station and obtain the location information of the connected base station, such as receiving the base station location information sent by the base station; the electronic device can also start the terminal positioning function, such as GPS, to obtain its own positioning information, and then calculate the relative position information of the electronic device and the base station. Then, according to the relative position information, the relative direction of the electronic device and the base station can be determined, and then the target radiation pattern area corresponding to the relative direction in the M radiation pattern areas can be determined.
[0061] Optionally, each of the radiation pattern areas is associated with a posture of the electronic device;
[0062] The step 102 includes:
[0063] According to the relative position information and the posture information of the electronic device, a target radiation pattern area associated with the posture information is determined.
[0064] That is, in some embodiments, considering that the posture of the electronic device will also affect the radiation efficiency of the antenna, the posture of the electronic device can also be combined to define a finer-grained radiation pattern area distinction.
[0065] Specifically, the electronic device can read the gyroscope data to obtain attitude information, such as whether it is placed vertically or horizontally. In this way, the target radiation pattern area can be associated with the attitude information and defined as attitude information-target radiation pattern area, for example, attitude 1-upper hemisphere 1, etc. Subsequently, the receiving frequency point power and transmitting frequency point power of the antenna in each radiation pattern area under the current attitude can be recorded in combination with the attitude of the electronic device, and can be called for comparison when determining whether to switch the antenna in the future.
[0066] For example, the electronic device is connected to the base station information, the GPS function of the electronic device, and the gyroscope sensor of the electronic device to obtain the relative position of the current electronic device antenna and the base station. Figure 2 As shown, the far-field radiation pattern of the antenna of the electronic device can be preliminarily considered as a spherical area with the electronic device 100 as the center, which is roughly divided into eight areas: upper hemisphere 1, 2, 3, 4 and lower hemisphere 1, 2, 3, 4. Of course, it can be further subdivided. Here, for the convenience of explanation, only eight areas are used as an example. In addition, the current state of the electronic device can be obtained according to the gyroscope sensor of the electronic device, such as upright, upside down, or tilted. Figure 2 In the state shown, the electronic device 100 is in posture 1 (upright, the phone screen faces south), then the antenna radiation pattern of the electronic device 100 can be subdivided into:
[0067] Posture 1-upper hemisphere 1, Posture 1-upper hemisphere 2, Posture 1-upper hemisphere 3, Posture 1-upper hemisphere 4;
[0068] Posture 1-lower hemisphere 1, Posture 1-lower hemisphere 2, Posture 1-lower hemisphere 3, Posture 1-lower hemisphere 4;
[0069] The relative position of the electronic device and the base station can be obtained based on the geographical location information of the connected base station and the electronic device positioning information. Figure 2 As shown, with the electronic device 100 as the center:
[0070] If the base station connected at this time is base station 1, then the connection radiation azimuth diagram at this time is connection azimuth diagram A;
[0071] If the base station connected at this time is base station 2, then the connection orientation diagram at this time is connection orientation diagram B;
[0072] If the base station connected at this time is base station 3, then the connection orientation diagram at this time is connection orientation diagram C;
[0073] If the base station connected at this time is base station 4, then the connection orientation diagram at this time is connection orientation diagram D;
[0074] In summary, if the mobile phone posture is posture 1 at this time, and the base station connected at this time is base station 1, then the connection orientation map A at this time calls the parameters of posture 1-upper hemisphere 1;
[0075] If the electronic device posture is posture 1 at this time, and the base station connected at this time is base station 2, then the connection orientation map A at this time calls the parameters of posture 1-upper hemisphere 2;
[0076] If the mobile phone posture is posture 1 at this time, and the base station connected at this time is base station 3, then the connection orientation map A at this time calls the parameters of posture 1-upper hemisphere 3;
[0077] If the mobile phone posture is posture 1 at this time, and the base station connected at this time is base station 4, then the connection orientation map A at this time calls the parameters of posture 1-upper hemisphere 4.
[0078] Step 103: When a first difference between a receiving frequency power and a transmitting frequency power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, determine a second target antenna among the N antennas that meets a second preset condition, wherein the second preset condition at least includes: a second difference between a receiving frequency power and a transmitting frequency power of the second target antenna in the target radiation pattern area is less than the first difference.
[0079] Specifically, the receiving frequency point power and transmitting frequency point power of the first target antenna in the target radiation pattern area can be obtained, which can be obtained through measurement, or the receiving frequency point power and transmitting frequency point power of each antenna in each radiation pattern area can be pre-recorded and obtained by querying the records.
[0080] In an embodiment of the present application, the difference between the receiving frequency power and the transmitting frequency power of the antenna in the current radiation pattern area can be compared to determine whether the two are equivalent, and then determine whether it is necessary to switch to other antennas whose receiving frequency power and transmitting frequency power in the current radiation pattern area are relatively equivalent.
[0081] Therefore, in this step, the receiving frequency power and the transmitting frequency power of the first target antenna in the target radiation pattern area can be compared to see whether there is a difference between the two, such as whether they are greater than the first preset threshold. If so, it can be queried whether there are other antennas among the N antennas except the first target antenna whose receiving frequency power and transmitting frequency power in the target radiation pattern area are equivalent, that is, the receiving frequency power and transmitting frequency power of other antennas in the target radiation pattern area can be obtained by measuring or querying records, and it is determined whether the difference between the receiving frequency power and the transmitting frequency power of the antenna in the target radiation pattern area is smaller than the difference between the receiving frequency power and the transmitting frequency power of the first target antenna in the target radiation pattern area, that is, the receiving frequency power and the transmitting frequency power are more equivalent. If so, it can be determined that the antenna is a second target antenna that meets the second preset condition, that is, a candidate switching antenna.
[0082] It should be noted that, when there are multiple antennas that meet the second preset condition, the antenna with the best RSRP can be further selected as the candidate switching antenna, that is, as the second target antenna, based on the RSRP of each antenna that meets the second preset condition.
[0083] In some embodiments, in order to avoid unnecessary antenna switching, the conditions that can be used as candidate switching antennas can be further limited, that is, the second preset condition is limited to include other elements that need to be met. Specifically, the range of the difference between the receiving frequency power and the transmitting frequency power of the candidate antenna to be switched to in the target radiation pattern area can be determined by dividing the difference range into different degrees, and combining the range of the difference between the receiving frequency power and the transmitting frequency power of the current first target antenna in the current target radiation pattern area. The difference range that needs to be satisfied is determined. Usually, the difference range corresponding to the candidate switching antenna needs to be smaller than the difference range corresponding to the antenna before switching. Therefore, optionally, when the first difference is greater than the first preset threshold and less than the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold; when the first difference is greater than or equal to the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold and / or the second difference is less than the second preset threshold.
[0084] Among them, the second preset threshold is greater than the first preset threshold, and the second preset threshold and the first preset threshold can respectively set the difference range between the receiving frequency power and the transmitting frequency power of the antenna in the radiation pattern area into three types, one is less than the first preset threshold, one is between the first preset threshold and the second preset threshold, and the other is greater than the second preset threshold.
[0085] In this way, in one case, when the difference between the receiving frequency power and the transmitting frequency power of the first target antenna in the target radiation pattern area is greater than the first preset threshold and less than the second preset threshold, such as the difference is greater than 3dB but less than 6dB, the difference between the receiving frequency power and the transmitting frequency power of the corresponding candidate switching antenna in the target radiation pattern area must also satisfy the requirement of being less than the first preset threshold, that is, less than 3dB.
[0086] In another case, when the difference between the receiving frequency power and the transmitting frequency power of the first target antenna in the target radiation pattern area is greater than or equal to the second preset threshold, such as the difference is greater than 6dB, the difference between the receiving frequency power and the transmitting frequency power of the corresponding candidate switching antenna in the target radiation pattern area must also satisfy the condition of being less than the second preset threshold, such as less than 6dB, specifically including the condition of being less than the second preset threshold but greater than the first preset threshold, such as greater than 3dB but less than 6dB, and less than the second preset threshold and less than the first preset threshold, such as less than 3dB, or only needs to satisfy the condition of being less than the first preset threshold, such as less than 3dB.
[0087] In this way, it is possible to avoid switching between antennas with similar reception and transmission frequency power differences to the current antenna, which is not very meaningful, that is, to avoid switching antennas without bringing about a significant increase in antenna gain.
[0088] Step 104: Control whether to switch from the first target antenna to the second target antenna according to the signal receiving power relationship between the first target antenna and the second target antenna.
[0089] Specifically, whether it is necessary to switch antennas can be determined based on the magnitude relationship, phase difference, etc. of the signal receiving power between the currently selected antenna (or source antenna), i.e., the first target antenna, and the candidate switching antenna, i.e., the second target antenna, and based on the judgment result, control can be exercised over whether to maintain the currently selected first target antenna or switch to the second target antenna.
[0090] Exemplarily, when the RSRP of the candidate switching antenna is better than the RSRP of the source antenna, you can choose to switch, that is, switch from the source antenna to the candidate switching antenna, so that the candidate switching antenna can be used in subsequent communications with the base station; or, when the RSRP of the candidate switching antenna is worse than the RSRP of the source antenna, but the difference is not very large, you can also choose to switch; or, when the RSRP of the candidate switching antenna is significantly worse than the RSRP of the source antenna, and the difference is very large, you can choose not to switch and keep the current antenna.
[0091] Optionally, step 104 includes at least one of the following:
[0092] Switching from the first target antenna to the second target antenna when the signal receiving power of the second target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area;
[0093] When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving power of the second target antenna and the first target antenna in the target radiation pattern area is less than a third preset threshold, switching from the first target antenna to the second target antenna;
[0094] When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the third preset threshold, keep using the first target antenna for communication.
[0095] That is, in one case, when the signal receiving power of the candidate switching antenna, i.e., the second target antenna, in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area, if the RSRP of the candidate switching antenna is -70dB and the RSRP of the source antenna is -75dB, it indicates that there is a candidate switching antenna with better reception performance in the current state, so you can switch to this antenna to improve the antenna gain.
[0096] In another case, the signal receiving power of the candidate switching antenna, i.e., the second target antenna, in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the signal receiving power of the second target antenna and the first target antenna in the target radiation pattern area is not much different, such as the difference is less than the third preset threshold, if the third preset threshold is assumed to be 3dB, the RSRP of the candidate switching antenna is -72dB, and the RSRP of the source antenna is -70dB, the difference between the two is 2dB, and does not exceed the threshold of 3dB, then it indicates that in the current state there is a candidate switching antenna with similar receiving performance, but the difference between the receiving frequency point power and the transmitting frequency point power in the current radiation pattern area is closer, so that it can be switched to this antenna to balance the antenna transmit and receive gains.
[0097] In another case, the signal receiving power of the candidate switching antenna, i.e., the second target antenna, in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the signal receiving power of the second target antenna and the first target antenna in the target radiation pattern area is significantly different, such as the difference is greater than or equal to the third preset threshold, such as the RSRP of the candidate switching antenna is -80dB, the RSRP of the source antenna is -70dB, the difference between the two is 10dB, which is far greater than the threshold of 3dB, indicating that there is no antenna with better or equivalent receiving performance in the current state, so there is no need to switch the antenna, and the current first target antenna can be used for communication.
[0098] In this way, through the antenna switching control method, it can be ensured that the performance of the antenna is continuously optimal under the current connection state.
[0099] Optionally, the method further comprises:
[0100] When the first difference is less than or equal to the first preset threshold, the first target antenna is kept used for communication.
[0101] That is, when the signal receiving power of the currently used antenna, that is, the first target antenna in the target radiation pattern area, is less than or equal to the first preset threshold, such as not exceeding 3dB, it indicates that the transmitting and receiving frequency powers of the current antenna are equivalent, and there is no need to switch, and only need to keep using the first target antenna for communication.
[0102] Through the above control switching method, the effectiveness and necessity of antenna switching can be guaranteed, and the antenna performance can be improved after switching the antenna, or the antenna's transmission and reception performance can be made relatively equivalent, so as not to affect the quality of uplink communication services.
[0103] Optionally, step 103 includes:
[0104] Query a preset antenna state library to determine whether the first target antenna is in a balanced state in the target radiation pattern area, wherein the antenna state library records the balanced state of each of the N antennas in each radiation pattern area; the balanced state includes a balanced state and an unbalanced state, the balanced state indicates that the third difference between the receiving frequency point power and the transmitting frequency point power of the first antenna in the first radiation pattern area is less than or equal to the first preset threshold; the unbalanced state indicates that the third difference is greater than the first preset threshold, the first antenna is any one of the N antennas, and the first radiation pattern area is any one of the M radiation pattern areas;
[0105] When it is determined that the first target antenna is in an unbalanced state in the target radiation pattern region, the antenna state library is queried to determine a second target antenna that is in a balanced state in the target radiation pattern region.
[0106] It should be noted that the situation where the transmission frequency power of the first antenna in the first radiation pattern area is greater than the reception frequency power in the first radiation pattern area can also be included in the equilibrium state.
[0107] That is, in one implementation, in order to more quickly determine whether the receiving frequency power and the transmitting frequency power of the antenna in the current radiation pattern area are equivalent, or whether the receiving frequency power and the transmitting frequency power are in an unbalanced state, etc., an antenna state library is pre-established, and the receiving frequency power and the transmitting frequency power of each antenna of the electronic device in each radiation pattern area are measured and compared, and the corresponding balance state is defined, and finally converted into recording the balance state of each antenna in each radiation pattern area into the antenna state library. In this way, when necessary, the antenna state library can be quickly queried to obtain the balance state of each antenna in each radiation pattern area, and the antenna in the required state can be determined as a candidate switching antenna, that is, the second target antenna.
[0108] Specifically, multiple balance states can be defined according to different difference ranges between the antenna's receiving frequency power and transmitting frequency power, such as at least a balanced state and an unbalanced state, and the threshold for defining the balanced state and the unbalanced state is X, which is the first preset threshold.
[0109] In specific implementation, the receiving frequency antenna power can be used as a reference, and the balance state can be determined according to the difference between the receiving frequency antenna power and the transmitting frequency antenna power. For example, assuming that the receiving frequency power is 0dbi, the threshold X corresponding to the imbalance state 1 is 3db (i.e., the difference is 3db). If the transmitting frequency power is greater than or equal to 0dbi, or greater than -3db, it is set to a balanced state; if the transmitting frequency power is less than -3dbi, it is set to an unbalanced state.
[0110] Exemplarily, for ANT1, for example, the receiving power is 0dbi, the transmission power in the balanced state is greater than -3dbi, and the transmission power in the unbalanced state is less than -3dbi.
[0111] In this way, based on the defined antenna balanced state and unbalanced state, and according to the difference between the receiving frequency point power and the transmitting frequency point power of each antenna in each radiation pattern area, it is possible to determine whether each antenna is in a balanced state or an unbalanced state in each radiation pattern area, and record these states accordingly in a dedicated library, thereby establishing the antenna state library that includes the balanced state of each antenna in each radiation pattern area.
[0112] After selecting the current working antenna, you can use a table lookup method, that is, query the antenna status library to determine whether the current antenna is in a balanced state in the current radiation pattern area; if not, that is, it is in an unbalanced state, you can continue to look up the table to determine a candidate switching antenna in a balanced state, that is, the second target antenna; otherwise, there is no need to switch the antenna, and the current antenna communication can be maintained.
[0113] In this way, in this implementation, based on the pre-established antenna state library, the balance state of each antenna can be quickly determined by table lookup, thereby achieving rapid antenna switching and improving antenna switching efficiency.
[0114] It should be noted that the antenna status library may be recorded by another device such as a network side device and configured to be stored in the electronic device, or may be established and stored by the electronic device itself. That is to say, in some embodiments, before querying the pre-established antenna status library, the method further includes:
[0115] Measuring the receiving frequency power and the transmitting frequency power of the first antenna in the first radiation pattern area;
[0116] When a third difference between the receiving frequency power and the transmitting frequency power of the first antenna in the first radiation pattern area is less than or equal to the first preset threshold, defining a balanced state of the first antenna in the first radiation pattern area as a balanced state;
[0117] When the third difference is greater than the first preset threshold, defining the balanced state of the first antenna in the first radiation pattern area as an unbalanced state;
[0118] The balance state of the first antenna in the first radiation pattern area is recorded in an antenna state library.
[0119] In this way, the electronic device can define the antenna balance state in the above manner and establish the antenna state library, which is used for subsequent direct table lookup to quickly obtain the balance state of each antenna in the current radiation pattern area, and then quickly and accurately determine whether there is a candidate switching antenna that meets the conditions, which is conducive to improving antenna switching efficiency.
[0120] Optionally, the unbalanced state includes a first unbalanced state and a second unbalanced state, the first unbalanced state indicates that the third difference is greater than the first preset threshold and less than a second preset threshold; the second unbalanced state indicates that the third difference is greater than or equal to the second preset threshold;
[0121] The step of querying the antenna state library to determine a second target antenna in a balanced state in the target radiation pattern area when the first target antenna is determined to be in an unbalanced state in the target radiation pattern area includes:
[0122] When it is determined that the first target antenna is in a first unbalanced state or a second unbalanced state in the target radiation pattern area, querying the antenna state library to determine a second target antenna that is in a balanced state in the target radiation pattern area;
[0123] In a case where the first target antenna is in a second unbalanced state in the target radiation pattern area, after determining a second target antenna in a balanced state in the target radiation pattern area, the method further includes:
[0124] In the case where the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than the third preset threshold, querying the antenna state library to determine a third target antenna that is in a first unbalanced state in the target radiation pattern area;
[0125] Whether to switch from the first target antenna to the third target antenna is controlled according to a signal reception power relationship between the first target antenna and the third target antenna.
[0126] That is, in a more specific implementation, the unbalanced state can be further subdivided into a first unbalanced state and a second unbalanced state. The first unbalanced state is better than the second unbalanced state, that is, the first unbalanced state is closer to the balanced state, and when the current antenna is in the second unbalanced state, it is also possible to consider switching to the first unbalanced state antenna with better receiving performance.
[0127] Specifically, three balance states can be defined according to different difference ranges between the antenna's receiving frequency power and transmitting frequency power, such as a balanced state, an unbalanced state 1, and an unbalanced state 2. The threshold for defining the balanced state and the unbalanced state 1 is X, which is the first preset threshold, and the threshold for defining the unbalanced state 1 and the unbalanced state 2 is Y, which is the second preset threshold.
[0128] In specific implementation, the receiving frequency antenna power can be used as a reference, and the balance state can be determined according to the difference between the receiving frequency antenna power and the transmitting frequency antenna power. For example, assuming that the receiving frequency power is 0dbi, the threshold X corresponding to the imbalance state 1 is 3db (i.e., the difference is 3db), and the threshold Y corresponding to the imbalance state 2 is 6db (i.e., the difference is 6db). If the transmitting frequency power is greater than or equal to 0dbi, or greater than -3db, it is set to a balanced state; if the transmitting frequency power is greater than -6dbi and less than -3dbi, it is set to unbalanced state 1; if the transmitting frequency power is less than -6dbi, it is set to unbalanced state 2.
[0129] For example, ANT1, for example, when the received power is 0dbi, the balanced state transmission power is greater than -3dbi, when the unbalanced state 1 transmission power is greater than -6dB and less than -3dbi, the unbalanced state 2 transmission power is less than -6dbi. After definition, the preset antenna library can store the following corresponding information of the electronic device posture, radiation pattern area and antenna balance state:
[0130] Posture 1-Upper Hemisphere 1: Balanced state;
[0131] Posture 1-Upper Hemisphere 2: Balanced state;
[0132] Posture 1-Upper Hemisphere 3: Unbalanced State 1;
[0133] Posture 1-Upper Hemisphere 4: Unbalanced State 1;
[0134] Posture 1-lower hemisphere 1: imbalance 1;
[0135] Posture 1-lower hemisphere 2: unbalanced state 2;
[0136] Posture 1-lower hemisphere 3: unbalanced state 2;
[0137] Posture 1-lower hemisphere 4: equilibrium state.
[0138] In this implementation, after selecting the current working antenna, the antenna state library can be queried to determine whether the current antenna is in a balanced state in the current radiation pattern area; if it is in the first unbalanced state or the second unbalanced state, the table can be further looked up to determine the candidate switching antenna in a balanced state, that is, the second target antenna; and further compare the receiving performance of the second target antenna with that of the first target antenna, such as comparing RSRP. If the RSRP of the second target antenna is better or worse but the difference in RSRP with the first target antenna is within a certain range, such as less than or equal to a third preset threshold, then the second target antenna can be switched to.
[0139] If the first target antenna is in a first unbalanced state, and the RSRP of the second target antenna is worse and the RSRP difference with the first target antenna exceeds a certain range, such as greater than the third preset threshold, there is no need to switch and maintain the first target antenna.
[0140] If the first target antenna is in the second unbalanced state, and the RSRP of the second target antenna is worse and the RSRP difference with the first target antenna exceeds a certain range, such as being greater than the third preset threshold, the table can be further looked up to determine the candidate switching antenna in the first unbalanced state, that is, the third target antenna; and further compare the receiving performance of the third target antenna with that of the first target antenna, such as comparing RSRP, and determine whether it is necessary to switch the antenna according to the size relationship and the degree of difference between the RSRPs of the two, and control whether to keep the currently selected first target antenna or switch to the third target antenna according to the judgment result.
[0141] Exemplarily, when the RSRP of the third target antenna is better than the RSRP of the first target antenna, switching can be selected, that is, switching from the first target antenna to the third target antenna, so as to use the third target antenna in subsequent communications with the base station; or, when the RSRP of the third target antenna is worse than the RSRP of the first target antenna, but the difference is not very large, switching can also be selected; or, when the RSRP of the third target antenna is significantly worse than the RSRP of the first target antenna, and the difference is very large, you can choose not to switch and keep the current antenna.
[0142] In this way, by defining two imbalance states, it is advantageous to switch antennas in a finer granularity, thereby ensuring that an antenna with better antenna performance and closer to a balanced state is used.
[0143] Accordingly, in some embodiments, when the third difference is greater than the first preset threshold, defining the balanced state of the first antenna in the first radiation pattern area as an unbalanced state includes:
[0144] When the third difference is greater than the first preset threshold and less than the second preset threshold, defining the balanced state of the first antenna in the first radiation pattern area as a first unbalanced state;
[0145] When the third difference is greater than or equal to the second preset threshold, the balanced state of the first antenna in the first radiation pattern area is defined as a second unbalanced state.
[0146] In this way, the electronic device can define more detailed antenna balance states in the above manner and establish the antenna state library for subsequent direct table lookup to quickly obtain the balance state of each antenna in the current radiation pattern area, which is beneficial to improving antenna switching efficiency and antenna performance.
[0147] Further, the controlling whether to switch from the first target antenna to the third target antenna according to the signal receiving power relationship between the first target antenna and the third target antenna includes at least one of the following:
[0148] When the signal receiving power of the third target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area, switching from the first target antenna to the third target antenna;
[0149] When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is less than a fourth preset threshold, switching from the first target antenna to the third target antenna;
[0150] When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the fourth preset threshold, keep using the first target antenna for communication.
[0151] That is, in one case, when the signal receiving power of the current candidate switching antenna, i.e., the third target antenna, in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area, if the RSRP of the candidate switching antenna is -72dB and the RSRP of the source antenna is -75dB, it indicates that in the current state there is a candidate switching antenna with better reception performance and closer to the equilibrium state, so it can be switched to this antenna to improve the antenna gain.
[0152] In another case, the signal receiving power of the candidate switching antenna, i.e., the third target antenna, in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the signal receiving power of the second target antenna and the first target antenna in the target radiation pattern area is not much different. If the difference is less than the fourth preset threshold, if the fourth preset threshold is assumed to be 6dB, the RSRP of the candidate switching antenna is -77dB, and the RSRP of the source antenna is -72dB, the difference between the two is 5dB, which does not exceed the threshold of 6dB, indicating that there is a candidate switching antenna with similar receiving performance but closer to the equilibrium state in the current state, so that it can be switched to this antenna to balance the antenna transmission and reception gains as much as possible to ensure that the uplink communication service is not greatly affected.
[0153] In another case, the signal receiving power of the candidate switching antenna, i.e., the third target antenna, in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the signal receiving power of the third target antenna and the first target antenna in the target radiation pattern area is significantly different, such as the difference is greater than or equal to the fourth preset threshold, such as the RSRP of the candidate switching antenna is -80dB, the RSRP of the source antenna is -72dB, the difference between the two is 8dB, which is far greater than the threshold of 6dB, indicating that there is no antenna with better or equivalent receiving performance in the current state, so there is no need to switch the antenna, and the current first target antenna can be used for communication.
[0154] In this way, through the antenna switching control method, it can be ensured that the performance of the antenna is continuously optimal under the current connection state.
[0155] To better illustrate the specific implementation of the above embodiments of the present application, the following takes the switching antenna of a mobile phone as an example. Figures 4 to 6 To illustrate the embodiments of this application:
[0156] like Figure 4 As shown, the antenna switching process generally includes the following steps:
[0157] S41. First, the mobile phone polls each antenna and selects the antenna with the best RSRP, that is, the best receiving gain, such as ANT1.
[0158] S42. If it is FDD mode according to the current connection status information, the switching process based on the pattern difference is entered, that is, steps S44 to S46 are entered; if it is TDD frequency band, the current antenna switching state is maintained.
[0159] S43. Maintain the current antenna switching state.
[0160] S44, entering the direction pattern difference switching function, identifying the location of the connected base station through the mobile terminal, starting the mobile terminal positioning function, reading the gyroscope data, to calculate and identify the relative position information of the mobile terminal and the base station, such as attitude 1-upper hemisphere 1, etc.
[0161] S45. Based on the relative position information obtained in step S44, query the preset antenna state library to determine whether the antenna is in a balanced state. If it is in a balanced state, then enter step S43, that is, maintain the current antenna switching state; if it is in an unbalanced state, then enter the unbalanced state switching process.
[0162] S46, enter the non-equilibrium state switching process, as follows Figure 5 and Figure 6 shown.
[0163] If the current antenna is in unbalanced state 1, then Figure 5 As shown, the following steps are included:
[0164] S51, first polling the RSRP of the balanced antenna in this location area (i.e. the radiation pattern area currently located);
[0165] S52, if there are multiple balanced antennas in the area, select the antenna with the best RSRP, and compare its RSRP value with the RSRP value of the current antenna;
[0166] S53, if the difference between the RSRP of the optimal antenna in the balanced state and the RSRP of the antenna in the current unbalanced state 1 is less than Xdb, then select the optimal antenna in the balanced state;
[0167] S54: If the difference is greater than the threshold value Xdb, that is, the uplink performance is not the best after switching, the current antenna is maintained without switching.
[0168] For example, in a certain radiation pattern area, ANT1 is in unbalanced state 1, and the RSRP is -70db, and the threshold X is 3db. If the RSRP of the balanced antenna ANT2 with the best RSRP in this area is -80db, then the difference between ANT2 and ANT1 is 10db, which is greater than 3db, and there is no need to switch to it, because the performance after switching to it is also worse than that of ANT1.
[0169] If the current antenna is in unbalanced state 2, then Figure 6 As shown. The following steps are included:
[0170] Step S61: first poll the RSRP of the balanced antennas in the location area;
[0171] Step S62: If there are multiple balanced antennas in the area, the RSRP value of the best RSRP antenna is selected for comparison with the RSRP of the current antenna;
[0172] Step S63: If the difference is less than the threshold value Xdb, select the optimal antenna in the balanced state;
[0173] Step S64: If the difference is greater than Xdb, poll the RSRP of the imbalanced state 1 antenna in this location area;
[0174] Step S65, comparing the RSRP value of the unbalanced state 1 antenna with the best RSRP with the RSRP of the current antenna;
[0175] Step S66: If the difference is less than the threshold value Ydb, the optimal antenna in the imbalance state 1RSRP is selected;
[0176] Step S67: If the difference is greater than Ydb, that is, the uplink performance is not the best after switching, the current antenna is kept without switching.
[0177] Compared with the background technology, the embodiments of the present application can obtain the relative position of the electronic device and the connected base station through the position of the connected base station, the position of the electronic device and the posture information of the electronic device, and select an antenna whose antenna gain at the transmitting frequency point is equivalent to the antenna gain at the receiving frequency point, thereby avoiding connection problems or uplink limitation problems caused by a large difference in the antenna gain at the transmitting frequency point and the antenna gain at the receiving frequency point in certain scenarios.
[0178] In an embodiment of the present application, an antenna switching method is performed by an electronic device, wherein the electronic device is provided with N antennas, and the antenna radiation pattern of the electronic device is divided into M radiation pattern areas, each radiation pattern area in the M radiation pattern areas corresponds to a radiation direction quadrant, and there is at least one antenna in each radiation pattern area that satisfies a first condition, wherein the first condition includes that the difference between the receiving frequency point power and the transmitting frequency point power is less than or equal to a first preset threshold value, and N and M are both integers greater than 1; the method includes: according to the signal receiving power of the N antennas, selecting a first target antenna whose signal receiving power meets the first preset condition for communication, wherein the first preset condition includes that the signal receiving power is the maximum or the signal receiving power is greater than a preset power threshold; according to the relative position information of the electronic device and the base station, determine the target radiation pattern area in the M radiation pattern areas; when the first difference between the receiving frequency power and the transmitting frequency power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, determine the second target antenna in the N antennas that meets the second preset condition, wherein the second preset condition at least includes: the second difference between the receiving frequency power and the transmitting frequency power of the second target antenna in the target radiation pattern area is less than the first difference; according to the signal receiving power relationship between the first target antenna and the second target antenna, control whether to switch from the first target antenna to the second target antenna. In this way, by dividing the radiation pattern of the electronic device and determining the target radiation pattern area according to the relative position information of the electronic device and the base station, and then controlling the antenna switching according to the difference between the receiving frequency power and the transmitting frequency power of each antenna in the area, and the signal receiving power, it is possible to ensure that the antenna gain of the transmitting frequency and the receiving frequency is equivalent as much as possible, thereby avoiding the problem that the antenna transmitting frequency and the receiving frequency gain are greatly different in some scenarios and affect the quality of uplink communication services.
[0179] The antenna switching method provided in the embodiment of the present application may be executed by an antenna switching device. In the embodiment of the present application, the antenna switching device performing the antenna switching method is taken as an example to illustrate the antenna switching device provided in the embodiment of the present application.
[0180] See also Figure 7 , Figure 7 A schematic diagram of the structure of an antenna switching device provided in an embodiment of the present application, wherein the antenna switching device is provided in an electronic device, wherein the electronic device is provided with N antennas, wherein the antenna radiation pattern of the electronic device is divided into M radiation pattern areas, wherein each radiation pattern area in the M radiation pattern areas corresponds to a radiation direction quadrant, and wherein at least one antenna in each radiation pattern area satisfies a first condition, wherein the first condition includes that the difference between the receiving frequency power and the transmitting frequency power is less than or equal to a first preset threshold value, and N and M are both integers greater than 1; Figure 7 As shown, the antenna switching device 700 includes:
[0181] A selection module 701 is used to select a first target antenna whose signal reception power meets a first preset condition for communication according to the signal reception power of the N antennas, wherein the first preset condition includes that the signal reception power is the maximum or the signal reception power is greater than a predetermined power threshold;
[0182] A first determination module 702 is used to determine a target radiation pattern area among the M radiation pattern areas according to the relative position information of the electronic device and the base station;
[0183] A second determination module 703 is configured to determine, when a first difference between a receiving frequency point power and a transmitting frequency point power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, a second target antenna among the N antennas that meets a second preset condition, wherein the second preset condition at least includes: a second difference between a receiving frequency point power and a transmitting frequency point power of the second target antenna in the target radiation pattern area is less than the first difference;
[0184] The first control module 704 is configured to control whether to switch from the first target antenna to the second target antenna according to a signal receiving power relationship between the first target antenna and the second target antenna.
[0185] Optionally, when the first difference is greater than the first preset threshold and less than the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold; when the first difference is greater than or equal to the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold and / or the second difference is less than the second preset threshold.
[0186] Optionally, the first control module 704 is used for at least one of the following:
[0187] Switching from the first target antenna to the second target antenna when the signal receiving power of the second target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area;
[0188] When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving power of the second target antenna and the first target antenna in the target radiation pattern area is less than a third preset threshold, switching from the first target antenna to the second target antenna;
[0189] When the first difference is less than or equal to the first preset threshold, keep using the first target antenna for communication;
[0190] When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the third preset threshold, keep using the first target antenna for communication.
[0191] Optionally, the second determining module 703 includes:
[0192] A judgment unit, used to query a preset antenna state library to determine whether the first target antenna is in a balanced state in the target radiation pattern area, wherein the antenna state library records the balanced state of each of the N antennas in each radiation pattern area; the balanced state includes a balanced state and an unbalanced state, the balanced state indicates that a third difference between a receiving frequency point power and a transmitting frequency point power of the first antenna in the first radiation pattern area is less than or equal to the first preset threshold, the unbalanced state indicates that the third difference is greater than the first preset threshold, the first antenna is any one of the N antennas, and the first radiation pattern area is any one of the M radiation pattern areas;
[0193] The determination unit is used to query the antenna state library to determine a second target antenna that is in a balanced state in the target radiation pattern area when it is determined that the first target antenna is in an unbalanced state in the target radiation pattern area.
[0194] Optionally, the unbalanced state includes a first unbalanced state and a second unbalanced state, the first unbalanced state indicates that the third difference is greater than the first preset threshold and less than a second preset threshold; the second unbalanced state indicates that the third difference is greater than or equal to the second preset threshold;
[0195] The determining unit is used to query the antenna state library to determine the second target antenna in the target radiation pattern area in a balanced state when it is determined that the first target antenna is in the first unbalanced state or the second unbalanced state in the target radiation pattern area;
[0196] The antenna switching device 700 further includes:
[0197] A third determination module is used to query the antenna state library to determine a third target antenna that is in the first unbalanced state in the target radiation pattern area when the first target antenna is in the second unbalanced state in the target radiation pattern area, the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than the third preset threshold;
[0198] The second control module is used to control whether to switch from the first target antenna to the third target antenna according to the signal receiving power relationship between the first target antenna and the third target antenna.
[0199] Optionally, the second control module is used for at least one of the following:
[0200] When the signal receiving power of the third target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area, switching from the first target antenna to the third target antenna;
[0201] When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is less than a fourth preset threshold, switching from the first target antenna to the third target antenna;
[0202] When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the fourth preset threshold, keep using the first target antenna for communication.
[0203] Optionally, each of the radiation pattern areas is associated with a posture of the electronic device;
[0204] The first determination module 702 is used to determine a target radiation pattern area associated with the posture information according to the relative position information and the posture information of the electronic device.
[0205] Optionally, the M radiation pattern areas are divided in the following manner:
[0206] The radiation pattern of the electronic device is converted into a spherical radiation pattern, which is divided into a first hemisphere part and a second hemisphere part with the center of the spherical radiation pattern as the center, and the first hemisphere part and the second hemisphere part are symmetrically divided into M / 2 equal parts, respectively, to obtain the M radiation pattern areas, wherein the spherical radiation pattern has the position of the electronic device as the center.
[0207] The antenna switching device in the embodiment of the present application is arranged in an electronic device, wherein the electronic device is provided with N antennas, and the antenna radiation pattern of the electronic device is divided into M radiation pattern areas, each radiation pattern area in the M radiation pattern areas corresponds to a radiation direction quadrant, and there is at least one antenna in each radiation pattern area that satisfies a first condition, wherein the first condition includes that the difference between the receiving frequency point power and the transmitting frequency point power is less than or equal to a first preset threshold value, and N and M are both integers greater than 1; the method includes: according to the signal receiving power of the N antennas, selecting a first target antenna whose signal receiving power meets the first preset condition for communication, wherein the first preset condition includes that the signal receiving power is the maximum or the signal receiving power is greater than a preset power threshold; according to the relative position information of the electronic device and the base station, determine the target radiation pattern area in the M radiation pattern areas; when the first difference between the receiving frequency power and the transmitting frequency power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, determine the second target antenna in the N antennas that meets the second preset condition, wherein the second preset condition at least includes: the second difference between the receiving frequency power and the transmitting frequency power of the second target antenna in the target radiation pattern area is less than the first difference; according to the signal receiving power relationship between the first target antenna and the second target antenna, control whether to switch from the first target antenna to the second target antenna. In this way, by dividing the radiation pattern of the electronic device and determining the target radiation pattern area according to the relative position information of the electronic device and the base station, and then controlling the antenna switching according to the difference between the receiving frequency power and the transmitting frequency power of each antenna in the area, and the signal receiving power, it is possible to ensure that the antenna gain of the transmitting frequency and the receiving frequency is equivalent as much as possible, thereby avoiding the problem that the antenna transmitting frequency and the receiving frequency gain are greatly different in some scenarios and affect the quality of uplink communication services.
[0208] The antenna switching device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or a device other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0209] The antenna switching device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0210] The antenna switching device provided in the embodiment of the present application can achieve Figures 1 to 6 The various processes implemented by the method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described here.
[0211] Alternatively, if Figure 8 As shown, an embodiment of the present application also provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores a program or instruction that can be executed on the processor 801, and when the program or instruction is executed by the processor 801, the various steps of the above-mentioned antenna switching method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0212] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0213] Fig. 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0214] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.
[0215] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0216] The processor 910 is configured to:
[0217] According to the signal receiving powers of the N antennas, selecting a first target antenna whose signal receiving power meets a first preset condition for communication, wherein the first preset condition includes that the signal receiving power is the maximum or the signal receiving power is greater than a predetermined power threshold;
[0218] Determining a target radiation pattern area among the M radiation pattern areas according to the relative position information of the electronic device and the base station;
[0219] In a case where a first difference between a receiving frequency point power and a transmitting frequency point power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, determining a second target antenna among the N antennas that meets a second preset condition, wherein the second preset condition at least includes: a second difference between a receiving frequency point power and a transmitting frequency point power of the second target antenna in the target radiation pattern area is less than the first difference;
[0220] Whether to switch from the first target antenna to the second target antenna is controlled according to a signal receiving power relationship between the first target antenna and the second target antenna.
[0221] Optionally, the processor 910 is further configured to:
[0222] When the first difference is greater than the first preset threshold and less than the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold; when the first difference is greater than or equal to the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold and / or the second difference is less than the second preset threshold.
[0223] Optionally, the processor 910 is further configured to perform at least one of the following:
[0224] Switching from the first target antenna to the second target antenna when the signal receiving power of the second target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area;
[0225] When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving power of the second target antenna and the first target antenna in the target radiation pattern area is less than a third preset threshold, switching from the first target antenna to the second target antenna;
[0226] When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the third preset threshold, keep using the first target antenna for communication.
[0227] Optionally, the processor 910 is further configured to:
[0228] Query a preset antenna state library to determine whether the first target antenna is in a balanced state in the target radiation pattern area, wherein the antenna state library records the balanced state of each of the N antennas in each radiation pattern area; the balanced state includes a balanced state and an unbalanced state, the balanced state indicates that a third difference between a receiving frequency point power and a transmitting frequency point power of the first antenna in the first radiation pattern area is less than or equal to the first preset threshold, the unbalanced state indicates that the third difference is greater than the first preset threshold, the first antenna is any one of the N antennas, and the first radiation pattern area is any one of the M radiation pattern areas;
[0229] When it is determined that the first target antenna is in an unbalanced state in the target radiation pattern region, the antenna state library is queried to determine a second target antenna that is in a balanced state in the target radiation pattern region.
[0230] Optionally, the unbalanced state includes a first unbalanced state and a second unbalanced state, the first unbalanced state indicates that the third difference is greater than the first preset threshold and less than a second preset threshold; the second unbalanced state indicates that the third difference is greater than or equal to the second preset threshold;
[0231] The processor 910 is further configured to:
[0232] When it is determined that the first target antenna is in a first unbalanced state or a second unbalanced state in the target radiation pattern area, querying the antenna state library to determine a second target antenna that is in a balanced state in the target radiation pattern area;
[0233] When the first target antenna is in a second unbalanced state in the target radiation pattern area, the processor 910 is further configured to:
[0234] In the case where the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than the third preset threshold, querying the antenna state library to determine a third target antenna that is in a first unbalanced state in the target radiation pattern area;
[0235] Whether to switch from the first target antenna to the third target antenna is controlled according to a signal reception power relationship between the first target antenna and the third target antenna.
[0236] Optionally, the processor 910 is further configured to perform at least one of the following:
[0237] When the signal receiving power of the third target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area, switching from the first target antenna to the third target antenna;
[0238] When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is less than a fourth preset threshold, switching from the first target antenna to the third target antenna;
[0239] When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the fourth preset threshold, keep using the first target antenna for communication.
[0240] Optionally, each radiation pattern area is associated with a posture of the electronic device; and the processor 910 is further configured to:
[0241] According to the relative position information and the posture information of the electronic device, a target radiation pattern area associated with the posture information is determined.
[0242] Optionally, the M radiation pattern areas are divided in the following manner:
[0243] The radiation pattern of the electronic device is converted into a spherical radiation pattern, which is divided into a first hemisphere part and a second hemisphere part with the center of the spherical radiation pattern as the center, and the first hemisphere part and the second hemisphere part are symmetrically divided into M / 2 equal parts, respectively, to obtain the M radiation pattern areas, wherein the spherical radiation pattern has the position of the electronic device as the center.
[0244] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0245] The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0246] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.
[0247] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned antenna switching method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0248] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0249] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned antenna switching method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0250] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0251] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned antenna switching method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0252] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0253] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0254] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An antenna switching method, characterized in that: The method is performed by an electronic device, wherein the electronic device is provided with N antennas, the antenna radiation pattern of the electronic device is divided into M radiation pattern areas, each radiation pattern area in the M radiation pattern areas corresponds to a radiation direction quadrant, and there is at least one antenna in each radiation pattern area that satisfies a first condition, wherein the first condition includes that the difference between the receiving frequency point power and the transmitting frequency point power is less than or equal to a first preset threshold value, and N and M are both integers greater than 1; the method includes: According to the signal receiving powers of the N antennas, selecting a first target antenna whose signal receiving power meets a first preset condition for communication, wherein the first preset condition includes that the signal receiving power is the maximum or the signal receiving power is greater than a predetermined power threshold; Determining a target radiation pattern area among the M radiation pattern areas according to the relative position information of the electronic device and the base station; In a case where a first difference between a receiving frequency point power and a transmitting frequency point power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, determining a second target antenna among the N antennas that meets a second preset condition, wherein the second preset condition at least includes: a second difference between a receiving frequency point power and a transmitting frequency point power of the second target antenna in the target radiation pattern area is less than the first difference; Whether to switch from the first target antenna to the second target antenna is controlled according to a signal receiving power relationship between the first target antenna and the second target antenna.
2. The method according to claim 1, characterized in that When the first difference is greater than the first preset threshold and less than the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold; when the first difference is greater than or equal to the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold and / or the second difference is less than the second preset threshold.
3. The method according to claim 1, characterized in that The controlling whether to switch from the first target antenna to the second target antenna according to the signal receiving power relationship between the first target antenna and the second target antenna includes at least one of the following: Switching from the first target antenna to the second target antenna when the signal receiving power of the second target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area; When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving power of the second target antenna and the first target antenna in the target radiation pattern area is less than a third preset threshold, switching from the first target antenna to the second target antenna; When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the third preset threshold, keep using the first target antenna for communication.
4. The method according to any one of claims 1 to 3, characterized in that The determining, when a first difference between a receiving frequency point power and a transmitting frequency point power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, a second target antenna among the N antennas that meets a second preset condition includes: Query a preset antenna state library to determine whether the first target antenna is in a balanced state in the target radiation pattern area, wherein the antenna state library records the balanced state of each of the N antennas in each radiation pattern area; the balanced state includes a balanced state and an unbalanced state, the balanced state indicates that a third difference between a receiving frequency point power and a transmitting frequency point power of the first antenna in the first radiation pattern area is less than or equal to the first preset threshold, the unbalanced state indicates that the third difference is greater than the first preset threshold, the first antenna is any one of the N antennas, and the first radiation pattern area is any one of the M radiation pattern areas; When it is determined that the first target antenna is in an unbalanced state in the target radiation pattern region, the antenna state library is queried to determine a second target antenna that is in a balanced state in the target radiation pattern region.
5. The method according to claim 4, characterized in that The unbalanced state includes a first unbalanced state and a second unbalanced state, wherein the first unbalanced state indicates that the third difference is greater than the first preset threshold and less than the second preset threshold; and the second unbalanced state indicates that the third difference is greater than or equal to the second preset threshold; The step of querying the antenna state library to determine a second target antenna in a balanced state in the target radiation pattern area when the first target antenna is determined to be in an unbalanced state in the target radiation pattern area includes: When it is determined that the first target antenna is in a first unbalanced state or a second unbalanced state in the target radiation pattern area, querying the antenna state library to determine a second target antenna that is in a balanced state in the target radiation pattern area; In a case where the first target antenna is in a second unbalanced state in the target radiation pattern area, after determining a second target antenna in a balanced state in the target radiation pattern area, the method further includes: In the case where the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than a third preset threshold, querying the antenna state library to determine a third target antenna that is in a first unbalanced state in the target radiation pattern area; Whether to switch from the first target antenna to the third target antenna is controlled according to a signal reception power relationship between the first target antenna and the third target antenna.
6. The method according to claim 5, characterized in that The controlling whether to switch from the first target antenna to the third target antenna according to the signal receiving power relationship between the first target antenna and the third target antenna includes at least one of the following: When the signal receiving power of the third target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area, switching from the first target antenna to the third target antenna; When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is less than a fourth preset threshold, switching from the first target antenna to the third target antenna; When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the fourth preset threshold, keep using the first target antenna for communication.
7. The method according to any one of claims 1 to 3, characterized in that Each of the radiation pattern areas is associated with a posture of the electronic device; The determining, according to the relative position information of the electronic device and the base station, a target radiation pattern area among the M radiation pattern areas comprises: According to the relative position information and the posture information of the electronic device, a target radiation pattern area associated with the posture information is determined.
8. The method according to any one of claims 1 to 3, characterized in that The M radiation pattern areas are divided in the following manner: The radiation pattern of the electronic device is converted into a spherical radiation pattern, which is divided into a first hemisphere part and a second hemisphere part with the center of the spherical radiation pattern as the center, and the first hemisphere part and the second hemisphere part are symmetrically divided into M / 2 equal parts, respectively, to obtain the M radiation pattern areas, wherein the spherical radiation pattern has the position of the electronic device as the center.
9. An antenna switching device, characterized in that: An electronic device is provided, wherein the electronic device is provided with N antennas, wherein the antenna radiation pattern of the electronic device is divided into M radiation pattern areas, wherein each radiation pattern area in the M radiation pattern areas corresponds to a radiation direction quadrant, and there is at least one antenna in each radiation pattern area that satisfies a first condition, wherein the first condition includes that the difference between the receiving frequency point power and the transmitting frequency point power is less than or equal to a first preset threshold value, and N and M are both integers greater than 1; and the antenna switching device includes: A selection module, configured to select, according to the signal reception powers of the N antennas, a first target antenna whose signal reception power satisfies a first preset condition for communication, wherein the first preset condition includes that the signal reception power is the maximum or the signal reception power is greater than a predetermined power threshold; A first determination module, configured to determine a target radiation pattern area among the M radiation pattern areas according to relative position information between the electronic device and the base station; A second determination module is used to determine a second target antenna among the N antennas that meets a second preset condition when a first difference between a receiving frequency point power and a transmitting frequency point power of the first target antenna in the target radiation pattern area is greater than the first preset threshold, wherein the second preset condition at least includes: a second difference between a receiving frequency point power and a transmitting frequency point power of the second target antenna in the target radiation pattern area is less than the first difference; The first control module is used to control whether to switch from the first target antenna to the second target antenna according to the signal receiving power relationship between the first target antenna and the second target antenna.
10. The antenna switching device according to claim 9, characterized in that: When the first difference is greater than the first preset threshold and less than the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold; when the first difference is greater than or equal to the second preset threshold, the second preset condition also includes that the second difference is less than the first preset threshold and / or the second difference is less than the second preset threshold.
11. The antenna switching device according to claim 9, characterized in that: The first control module is used for at least one of the following: Switching from the first target antenna to the second target antenna when the signal receiving power of the second target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area; When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving power of the second target antenna and the first target antenna in the target radiation pattern area is less than a third preset threshold, switching from the first target antenna to the second target antenna; When the first difference is less than or equal to the first preset threshold, keep using the first target antenna for communication; When the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the third preset threshold, keep using the first target antenna for communication.
12. The antenna switching device according to any one of claims 9 to 11, characterized in that: The second determining module comprises: A judgment unit, used to query a preset antenna state library to determine whether the first target antenna is in a balanced state in the target radiation pattern area, wherein the antenna state library records the balanced state of each of the N antennas in each radiation pattern area; the balanced state includes a balanced state and an unbalanced state, the balanced state indicates that a third difference between a receiving frequency point power and a transmitting frequency point power of the first antenna in the first radiation pattern area is less than or equal to the first preset threshold, the unbalanced state indicates that the third difference is greater than the first preset threshold, the first antenna is any one of the N antennas, and the first radiation pattern area is any one of the M radiation pattern areas; The determination unit is used to query the antenna state library to determine a second target antenna that is in a balanced state in the target radiation pattern area when it is determined that the first target antenna is in an unbalanced state in the target radiation pattern area.
13. The antenna switching device according to claim 12, characterized in that: The unbalanced state includes a first unbalanced state and a second unbalanced state, wherein the first unbalanced state indicates that the third difference is greater than the first preset threshold and less than the second preset threshold; and the second unbalanced state indicates that the third difference is greater than or equal to the second preset threshold; The determining unit is used to query the antenna state library to determine the second target antenna in the target radiation pattern area in a balanced state when it is determined that the first target antenna is in the first unbalanced state or the second unbalanced state in the target radiation pattern area; The antenna switching device also includes: A third determination module is used to query the antenna state library to determine a third target antenna that is in the first unbalanced state in the target radiation pattern area when the first target antenna is in the second unbalanced state in the target radiation pattern area, the signal receiving power of the second target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the second target antenna and the first target antenna in the target radiation pattern area is greater than a third preset threshold; The second control module is used to control whether to switch from the first target antenna to the third target antenna according to the signal receiving power relationship between the first target antenna and the third target antenna.
14. The antenna switching device according to claim 13, characterized in that: The second control module is used for at least one of the following: When the signal receiving power of the third target antenna in the target radiation pattern area is greater than or equal to the signal receiving power of the first target antenna in the target radiation pattern area, switching from the first target antenna to the third target antenna; When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is less than a fourth preset threshold, switching from the first target antenna to the third target antenna; When the signal receiving power of the third target antenna in the target radiation pattern area is less than the signal receiving power of the first target antenna in the target radiation pattern area, and the difference between the signal receiving powers of the third target antenna and the first target antenna in the target radiation pattern area is greater than or equal to the fourth preset threshold, keep using the first target antenna for communication.
15. The antenna switching device according to any one of claims 9 to 11, characterized in that: Each of the radiation pattern areas is associated with a posture of the electronic device; The first determination module is used to determine a target radiation pattern area associated with the posture information according to the relative position information and the posture information of the electronic device.
16. The antenna switching device according to any one of claims 9 to 11, characterized in that: The M radiation pattern areas are divided in the following manner: The radiation pattern of the electronic device is converted into a spherical radiation pattern, which is divided into a first hemisphere part and a second hemisphere part with the center of the spherical radiation pattern as the center, and the first hemisphere part and the second hemisphere part are symmetrically divided into M / 2 equal parts, respectively, to obtain the M radiation pattern areas, wherein the spherical radiation pattern has the position of the electronic device as the center.
17. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the antenna switching method according to any one of claims 1 to 8 are implemented.
18. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the antenna switching method according to any one of claims 1 to 8 are implemented.