Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The electronic device 100 includes a housing 10, a circuit board 20, a battery 30, an antenna group a 41, an antenna group B42, an antenna group C43, and an antenna group D44.
The housing 10 serves to form an outer contour of the electronic device 100, while serving to accommodate other electronic elements or functional components of the electronic device 100. For example, the housing 10 may be used to house various electronic components of the electronic device 100, such as a processor, a camera, a microphone, a gravity sensor, and the like.
It is understood that the housing 10 may include a front case assembly, a middle frame, and a rear cover of the electronic device 100. Wherein, preceding shell subassembly includes the display screen and sets up apron on the display screen. The center frame is disposed between the front housing assembly and the rear cover. The middle frame is used for providing a supporting function for the electronic elements or functional components in the electronic device 100 so as to mount the electronic elements or functional components in the electronic device 100 together. For example, functional components of the electronic device 100, such as a camera, a receiver, a microphone, a gravity sensor, and a fingerprint recognition module, may be mounted on the middle frame for fixing. The back cover may be of the type such as a metal back cover, a plastic back cover, a glass back cover, or the like. The rear cover may be integrally formed. In the forming process of the rear cover, structures such as a rear camera hole and a fingerprint identification module mounting hole can be formed on the rear cover.
A circuit board 20 is disposed inside the housing 10. The circuit board 20 may be a motherboard of the electronic device 100. The circuit board 20 is provided with a radio frequency circuit, and the radio frequency circuit is used for realizing communication between the electronic device 100 and a base station or other electronic devices. In addition, one or more of a microphone, a speaker, a receiver, an earphone interface, a universal serial bus interface (USB interface), a camera, a distance sensor, an ambient light sensor, a gyroscope, a processor, a memory, and other functional components may be integrated on the circuit board 20.
The battery 30 is disposed inside the case 10. Meanwhile, the battery 30 is electrically connected to the circuit board 20 to enable the battery 30 to power the electronic device 100. Wherein, a power management circuit may be disposed on the circuit board 20. The power management circuit is used to distribute the voltage provided by the battery 30 to the various electronic components of the electronic device 100.
The antenna group a 41, the antenna group B42, the antenna group C43 and the antenna group D44 are disposed inside the casing 10. For example, the antenna group a 41, the antenna group B42, the antenna group C43, and the antenna group D44 may be disposed on a middle frame inside the casing 10. Wherein each antenna group may include one or more antennas.
The antenna group a 41, the antenna group B42, the antenna group C43, and the antenna group D44 are configured to transmit and receive radio frequency signals, so as to implement communication between the electronic device 100 and a base station or other electronic devices. In addition, the antenna group a 41, the antenna group B42, the antenna group C43 and the antenna group D44 are electrically connected to the circuit board 20, so as to process the transmitted or received radio frequency signals through the radio frequency circuit on the circuit board 20.
It should be noted that, the above-mentioned sending and receiving radio frequency signals may include various situations, such as sending radio frequency signals, receiving radio frequency signals, and simultaneously sending and receiving radio frequency signals.
It is to be appreciated that while fig. 1 illustrates an electronic device 100 as including 4 antenna groups, including antenna group a, antenna group B, antenna group C, antenna group D, etc., in practice, the electronic device 100 may include more or fewer antenna groups. For example, the electronic device 100 may include only 3 antenna groups, 5 or 6 antenna groups, and so on.
In the embodiment of the present application, the circuit board 20 is provided with a main diversity module 21, a diversity module 22, and a switch 23. The main set module 21 is used for generating an outward transmitted radio frequency signal and processing the radio frequency signal received by the antenna group. The diversity module 22 is configured to process the radio frequency signals received by the antenna group.
The main set module 21 and the diversity module 22 are both connected to one end of the switch 23, and the other end of the switch 23 is connected to the antenna group a, the antenna group B, the antenna group C, and the antenna group D. For example, the switch 23 may be connected to the antenna group a, the antenna group B, the antenna group C, and the antenna group D through a radio frequency coaxial line.
The switch 23 can be switched to electrically connect the main set module 21 with any one of the antenna group a, the antenna group B, the antenna group C and the antenna group D, and to electrically connect the diversity module 22 with any one or more of the antenna group a, the antenna group B, the antenna group C and the antenna group D except for the main set antenna. It is understood that the antenna group electrically connected to the main set module 21 is a main set antenna, and the antenna group electrically connected to the diversity module 22 is a diversity antenna.
For example, the switch 23 may include a double pole double throw switch. The main set module 21 can be electrically connected with one antenna group and the diversity module 22 can be electrically connected with the other antenna group by switching the double-pole double-throw switch. That is, one of the switch groups is switched to a main set antenna, and the other is switched to a diversity antenna. For another example, the switch 23 may further include a switch group including a plurality of single-pole single-throw switches. The main set module 21 can be electrically connected to one antenna group and the diversity module 22 can be electrically connected to a plurality of antenna groups other than the main set antenna by switching the switch group. That is, one of the switch groups is switched to a main set antenna, and the other switch groups are switched to diversity antennas.
The embodiment of the present application provides an antenna switching method, which may be applied to the electronic device 100. The electronic device 100 may be a smart phone, a tablet computer, a game device, an AR (Augmented Reality) device, an automobile, a data storage device, an audio playing device, a video playing device, a notebook computer, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like.
Referring to fig. 2, fig. 2 is a first flowchart of an antenna switching method according to an embodiment of the present application.
The antenna switching method comprises the following steps:
210, when a first antenna group receives and transmits a radio frequency signal, acquiring a communication frequency band of the first antenna group.
In the electronic device 100, any one of the antenna group a, the antenna group B, the antenna group C, and the antenna group D may be a first antenna group, and each of the other antenna groups is a second antenna group. Thus, the electronic device includes a first antenna group and a plurality of second antenna groups. In the following, only the antenna group a is taken as the first antenna group, and the antenna group B, the antenna group C, and the antenna group D are all the second antenna group for explanation.
In an initial state, one main set antenna and one or more diversity antennas are configured in the electronic device. The main antenna receives and transmits radio frequency signals at the same time, and the diversity antenna receives the radio frequency signals.
For example, when the first antenna group a is a main set antenna, the first antenna group a transceives a radio frequency signal. At this time, the electronic device may monitor the communication frequency band of the first antenna set a in real time through a Modem (Modem) of the radio frequency signal, so as to obtain the communication frequency band of the first antenna set a.
And 220, determining an interference source causing interference to the first antenna group according to the communication frequency band.
In the development and test process of the electronic device, a professional, for example, a research and development staff, may respectively test the antenna group a, the antenna group B, the antenna group C, and the antenna group D in the electronic device, so as to respectively obtain the interference condition of the antenna group a, the antenna group B, the antenna group C, and the antenna group D on each communication frequency band. For example, the frequency bands interfered by the antenna a and the interference source corresponding to each frequency band are recorded to form a list a; recording the interfered frequency bands of the antenna B and the interference source corresponding to each frequency band to form a list B; recording the interfered frequency bands of the antenna C and the interference source corresponding to each frequency band to form a list C; and recording the interfered frequency bands of the antenna D and the interference source corresponding to each frequency band to form a list D. And then, respectively storing the list A, the list B, the list C and the list D in the electronic equipment.
The interference source is a functional module which causes interference to the antenna group in the electronic device. For example, the interference source may include a display screen, a front-facing camera, a rear-facing camera, a universal serial bus interface (USB interface), a headset interface, a proximity sensor, a gravity sensor, and so forth.
After the electronic device acquires the communication frequency band of the first antenna group A, the communication frequency band is compared with the list A corresponding to the first antenna group A, and then an interference source causing interference to the first antenna group can be determined. For example, the interference source may be a display screen.
And 230, if the interference source is in the working state, determining a target antenna group from the plurality of second antenna groups.
The electronic device then detects the status of the interference source to determine whether the interference source is in an operational state. Wherein, the working state is the state that the interference source is working. For example, when the interference source is a display screen, it is detected whether the display screen is in a lighting state.
And if the interference source is in a working state, the electronic equipment determines a target antenna group from the plurality of second antenna groups. For example, the electronic device determines the target antenna group C from the second antenna group B, the second antenna group C, and the second antenna group D. The target antenna group is an antenna group which needs to be switched to receive and transmit radio frequency signals.
240, switching the first antenna group to transmit and receive radio frequency signals to the target antenna group to transmit and receive radio frequency signals.
After the electronic device determines the target antenna group, the first antenna group can be switched to the target antenna group to receive and transmit radio frequency signals. That is, the main set antenna is switched from the first antenna group to the target antenna group. For example, the antenna group a is switched to transmit and receive radio frequency signals, and the antenna group C is switched to transmit and receive radio frequency signals. That is, the main set antenna is switched from antenna group a to antenna group C.
In the antenna switching method provided by the embodiment of the application, when an interference source causing interference to a communication frequency band of a first antenna group is in a working state, the electronic device can determine a target antenna group from a plurality of second antenna groups and switch to the target antenna group to receive and transmit radio frequency signals, so that interference caused by the interference source to the radio frequency signals of the electronic device can be reduced, and the communication stability of the electronic device can be improved.
In some embodiments, referring to fig. 3, fig. 3 is a second flowchart of an antenna switching method according to an embodiment of the present disclosure.
Step 230, if the interference source is in the working state, determining a target antenna group from the plurality of second antenna groups, including the following steps:
231, if the interference source is in a working state, obtaining a working mode of the electronic equipment, wherein the working mode comprises a vertical screen mode and a horizontal screen mode;
232, determining a target antenna group from the plurality of second antenna groups according to the working mode.
And when the electronic equipment detects that the interference source is in a working state, the electronic equipment acquires the working mode of the electronic equipment. Wherein the working mode comprises a vertical screen mode and a horizontal screen mode. The vertical screen mode is a mode in which two shorter sides of the electronic device are located at the upper and lower ends and two longer sides are located at the left and right sides. The horizontal screen mode is a mode in which two longer sides of the electronic device are located at the upper and lower ends and two shorter sides are located at the left and right sides.
For example, during a call made by a user holding the electronic device, the electronic device is usually in a portrait mode; when a user browses a webpage through electronic equipment, the electronic equipment is usually in a vertical screen mode; when a user watches a movie using the electronic device, the electronic device is usually in a landscape mode; when a user plays a network game using an electronic device, the electronic device is typically in a landscape mode.
The display screen of the electronic equipment is controlled and displayed by the processor, so that the electronic equipment can acquire the working mode of the electronic equipment by inquiring the control parameters of the processor.
Then, the electronic device determines a target antenna group from the plurality of second antenna groups according to the working mode.
For example, the antenna group a, the antenna group B, the antenna group C, and the antenna group D in the electronic device are respectively disposed at four corners of the electronic device, as shown in fig. 1. When a user holds the electronic device, the user usually holds the lower half of the electronic device, and at the moment, the antenna group on the upper half of the electronic device is less interfered by the holding of the user. Therefore, when the electronic device is in the portrait mode, the electronic device can directly determine the antenna group B located in the upper half as the target antenna group. When the electronic device is in the landscape mode, the electronic device may directly determine the antenna group D located in the upper half as the target antenna group.
In some embodiments, referring to fig. 4, fig. 4 is a third flowchart illustrating an antenna switching method according to an embodiment of the present application.
Step 232, determining a target antenna group from the plurality of second antenna groups according to the working mode, including the following steps:
2321, determining a part to be held of the electronic device according to the working mode and a holding habit of the user using the electronic device;
2322, the second antenna group farthest from the held part among the plurality of second antenna groups is determined as a target antenna group.
In practical applications, the habit of using the electronic device is different for each user, and the habit of holding the electronic device may also be different. For example, when the user X holds the electronic apparatus, it is used to hold the lower half portion of the electronic apparatus; when the user Y holds the electronic equipment, the user is used to hold the upper half part of the electronic equipment; when the user Z holds the electronic device, the user Z is used to hold the electronic device with both hands and respectively holds the lower left corner and the upper right corner of the electronic device. Thus, determining a target antenna group based solely on an operating mode of the electronic device may be inaccurate.
In the using process of the electronic equipment, the electronic equipment can acquire the holding part of the electronic equipment held by the user for multiple times, so that the holding habit of the user when using the electronic equipment is formed. The holding habit can be divided into different scenes. That is, the holding habit includes holding parts of the electronic device by the user in different scenes.
After the electronic equipment acquires the working mode of the electronic equipment, the holding habit of the user on the electronic equipment can be further acquired, so that the held part of the electronic equipment can be determined according to the working mode and the holding habit of the user using the electronic equipment.
For example, referring to fig. 1, when the electronic device is in a vertical screen state and a holding habit of a user is to hold an upper half portion of the electronic device, it may be determined that a held portion of the electronic device is a portion where the antenna group a and the antenna group B are located. For another example, when the electronic device is in a landscape state and the holding habit of the user is to hold the lower half portion of the electronic device, it may be determined that the held portion of the electronic device is the portion where the antenna group a and the antenna group C are located.
Because the position of each antenna group in the electronic equipment is fixed, after the electronic equipment determines the part to be held, the second antenna group farthest from the part to be held can be determined. Then, the electronic device determines a second antenna group, which is farthest from the held part, of the plurality of second antenna groups as a target antenna group.
In some embodiments, referring to fig. 5, fig. 5 is a fourth flowchart illustrating an antenna switching method according to an embodiment of the present application.
Step 232, determining a target antenna group from the plurality of second antenna groups according to the working mode, including the following steps:
2323, determining the held part of the electronic device according to the working mode and the holding habit of the user using the electronic device;
2324, determining a third antenna group which is not held by the user from the plurality of second antenna groups according to the held part;
2325, determining whether the third antenna group is a diversity antenna of the communication frequency band;
2326, if at least one of the third antenna groups is not a diversity antenna of the communication frequency band, determining any one of the third antenna groups which is not a diversity antenna of the communication frequency band as a target antenna group.
In the using process of the electronic equipment, the electronic equipment can acquire the holding part of the electronic equipment held by the user for multiple times, so that the holding habit of the user when using the electronic equipment is formed. The holding habit can be divided into different scenes. That is, the holding habit includes holding parts of the electronic device by the user in different scenes.
After the electronic equipment acquires the working mode of the electronic equipment, the holding habit of the user on the electronic equipment can be further acquired, so that the held part of the electronic equipment can be determined according to the working mode and the holding habit of the user using the electronic equipment.
And then, the electronic equipment determines a third antenna group which is not held by the user from the plurality of second antenna groups according to the held part.
For example, referring to fig. 1, when the electronic device is in a vertical screen state and a holding habit of a user is to hold an upper half portion of the electronic device, it may be determined that a held portion of the electronic device is a portion where the antenna group a and the antenna group B are located. At this time, the electronic device can determine that the third antenna group not held by the user is the antenna group C and the antenna group D from the plurality of second antenna groups.
Subsequently, the electronic device determines whether the third antenna group is a diversity antenna of the communication frequency band. That is, it is determined whether the electronic device receives the radio frequency signal through each antenna group in the third antenna group. The electronic device may determine whether the third antenna group is a diversity antenna of the communication frequency band by querying operating parameters of the processor or the radio frequency circuit.
If the judgment is negative, that is, at least one of the third antenna groups is not a diversity antenna of the communication frequency band, determining any antenna group, which is not a diversity antenna of the communication frequency band, in the third antenna group as a target antenna group.
For example, the electronic device determines the third antenna group to be antenna group C and antenna group D. If the antenna group C is a diversity antenna of the communication frequency band and the antenna group D is not a diversity antenna of the communication frequency band, the electronic device may determine the antenna group D as a target antenna group. If neither antenna group C nor antenna group D is a diversity antenna of the communication frequency band, the electronic device may determine any one of the antenna groups C and D as a target antenna group.
In some embodiments, with reference to fig. 5 continuously, after determining, in step 2325, whether the third antenna group is all diversity antennas of the communication frequency band, the method further includes the following steps:
2327, if the third antenna groups are all diversity antennas of the communication frequency band, acquiring a first signal attenuation amount when the second antenna group corresponding to the held part transmits the radio frequency signal of the communication frequency band;
2328, comparing the first signal attenuation amount with a second signal attenuation amount interfered when the first antenna group transmits the radio frequency signal;
2329, if the first signal attenuation is smaller than the second signal attenuation, determining any one antenna group in the second antenna group corresponding to the held part as a target antenna group.
If the electronic device determines that the second antenna group is the communication frequency band, that is, the third antenna group is a diversity antenna of the communication frequency band, for example, the third antenna group is the antenna group C and the antenna group D, and the antenna group C and the antenna group D are both diversity antennas of the communication frequency band, at this time, the electronic device obtains a first signal attenuation amount when the second antenna group corresponding to the held part transmits the radio frequency signal of the communication frequency band.
For example, if the second antenna group corresponding to the held portion is the antenna group B, the electronic device obtains the first signal attenuation amount when the antenna group B transmits the radio frequency signal. The electronic device may obtain the first signal attenuation amount when the antenna group B transmits the radio frequency signal by querying the operating parameter of the processor or the radio frequency circuit. Wherein the first signal attenuation amount is a signal intensity value. For example, the first signal attenuation amount acquired by the electronic device is 2dBm (decibel-milliwatt).
The electronic device may monitor, in real time, an interference condition suffered by the first antenna group a when transmitting the radio frequency signal, so as to obtain a second signal attenuation amount suffered by the first antenna group a when transmitting the radio frequency signal. Wherein the second signal attenuation is also a signal strength value. For example, the second signal attenuation is 2.5 dBm.
Subsequently, the electronic device compares the first signal attenuation amount with the second signal attenuation amount to determine whether the first signal attenuation amount is less than the second signal attenuation amount.
If the first signal attenuation amount is smaller than the second signal attenuation amount, for example, the first signal attenuation amount 2dBm is smaller than the second signal attenuation amount 2.5dBm, it indicates that the interference received by the second antenna group corresponding to the held part is smaller than the interference received by the first antenna group, that is, the radio frequency performance of the second antenna group corresponding to the held part is better. At this time, the electronic device determines any antenna group in the second antenna group corresponding to the held part as a target antenna group. For example, the second antenna group B is determined as the target antenna group.
If the first signal attenuation amount is not less than the second signal attenuation amount, it indicates that the interference on the second antenna group corresponding to the held part is greater than the interference on the first antenna group, that is, the radio frequency performance of the first antenna group is better. At this time, the electronic device may maintain the first antenna group to receive and transmit the radio frequency signal unchanged, that is, maintain the main set antenna unchanged.
In the description of the present application, it is to be understood that like terms, such as "first," "second," "third," and the like, are used solely to distinguish similar objects from one another and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
In particular implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict.
As can be seen from the above, the antenna switching method provided in the embodiment of the present application includes: when a first antenna group receives and transmits radio frequency signals, acquiring a communication frequency band of the first antenna group; determining an interference source causing interference to the first antenna group according to the communication frequency band; if the interference source is in a working state, determining a target antenna group from a plurality of second antenna groups; and switching the first antenna group transceiving radio frequency signal to the target antenna group transceiving radio frequency signal. In the antenna switching method, when an interference source causing interference to a communication frequency band of a first antenna group is in a working state, the electronic device can determine a target antenna group from a plurality of second antenna groups and switch to the target antenna group to receive and transmit radio frequency signals, so that interference caused by the interference source to the radio frequency signals of the electronic device can be reduced, and the communication stability of the electronic device is improved.
The embodiment of the application also provides an antenna switching device, and the antenna switching device can be integrated in electronic equipment. The electronic device may be a smartphone, a tablet computer, a gaming device, an AR (Augmented Reality) device, an automobile, a data storage device, an audio playback device, a video playback device, a laptop computer, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an antenna switching apparatus according to an embodiment of the present application.
Wherein, the antenna switching device 300 comprises: the device comprises an acquisition module 301, a first determination module 302, a second determination module 303 and a switching module 304.
An obtaining module 301, configured to obtain a communication frequency band of a first antenna group when the first antenna group receives and transmits a radio frequency signal.
In the electronic device 100, any one of the antenna group a, the antenna group B, the antenna group C, and the antenna group D may be a first antenna group, and each of the other antenna groups is a second antenna group. Thus, the electronic device includes a first antenna group and a plurality of second antenna groups. In the following, only the antenna group a is taken as the first antenna group, and the antenna group B, the antenna group C, and the antenna group D are all the second antenna group for explanation.
In an initial state, one main set antenna and one or more diversity antennas are configured in the electronic device. The main antenna receives and transmits radio frequency signals at the same time, and the diversity antenna receives the radio frequency signals.
For example, when the first antenna group a is a main set antenna, the first antenna group a transceives a radio frequency signal. At this time, the obtaining module 301 may monitor the communication frequency band of the first antenna set a in real time through a Modem (Modem) of the radio frequency signal, so as to obtain the communication frequency band of the first antenna set a.
A first determining module 302, configured to determine, according to the communication frequency band, an interference source causing interference to the first antenna group.
In the development and test process of the electronic device, a professional, for example, a research and development staff, may respectively test the antenna group a, the antenna group B, the antenna group C, and the antenna group D in the electronic device, so as to respectively obtain the interference condition of the antenna group a, the antenna group B, the antenna group C, and the antenna group D on each communication frequency band. For example, the frequency bands interfered by the antenna a and the interference source corresponding to each frequency band are recorded to form a list a; recording the interfered frequency bands of the antenna B and the interference source corresponding to each frequency band to form a list B; recording the interfered frequency bands of the antenna C and the interference source corresponding to each frequency band to form a list C; and recording the interfered frequency bands of the antenna D and the interference source corresponding to each frequency band to form a list D. And then, respectively storing the list A, the list B, the list C and the list D in the electronic equipment.
The interference source is a functional module which causes interference to the antenna group in the electronic device. For example, the interference source may include a display screen, a front-facing camera, a rear-facing camera, a universal serial bus interface (USB interface), a headset interface, a proximity sensor, a gravity sensor, and so forth.
After the obtaining module 301 obtains the communication frequency band of the first antenna group a, the first determining module 302 compares the communication frequency band with the list a corresponding to the first antenna group a, so as to determine an interference source causing interference to the first antenna group. For example, the interference source may be a display screen.
A second determining module 303, configured to determine a target antenna group from the multiple second antenna groups if the interference source is in an operating state.
The second determination module 303 may detect the status of the interference source to determine whether the interference source is in an operational state. Wherein, the working state is the state that the interference source is working. For example, when the interference source is a display screen, it is detected whether the display screen is in a lighting state.
If the interference source is in the working state, the second determining module 303 determines the target antenna group from the plurality of second antenna groups. For example, the second determining module 303 determines the target antenna group C from the second antenna group B, the second antenna group C, and the second antenna group D. The target antenna group is an antenna group which needs to be switched to receive and transmit radio frequency signals.
A switching module 304, configured to switch the first antenna group to receive and transmit radio frequency signals to the target antenna group to receive and transmit radio frequency signals.
After the second determining module 303 determines the target antenna group, the switching module 304 may switch the radio frequency signal transmitted and received by the first antenna group to the radio frequency signal transmitted and received by the target antenna group. That is, the main set antenna is switched from the first antenna group to the target antenna group. For example, the antenna group a is switched to transmit and receive radio frequency signals, and the antenna group C is switched to transmit and receive radio frequency signals. That is, the main set antenna is switched from antenna group a to antenna group C.
The antenna switching device provided by the embodiment of the application can determine the target antenna group from the plurality of second antenna groups when the interference source causing interference to the communication frequency band of the first antenna group is in a working state, and switches to the target antenna group to receive and transmit the radio frequency signal, so that the interference caused by the interference source to the radio frequency signal of the electronic equipment can be reduced, and the communication stability of the electronic equipment can be improved.
In some embodiments, the second determination module 303 is configured to perform the following steps:
if the interference source is in a working state, obtaining a working mode of the electronic equipment, wherein the working mode comprises a vertical screen mode and a horizontal screen mode;
and determining a target antenna group from the plurality of second antenna groups according to the working mode.
When the interference source is detected to be in the working state, the second determining module 303 obtains the working mode of the electronic device. Wherein the working mode comprises a vertical screen mode and a horizontal screen mode. The vertical screen mode is a mode in which two shorter sides of the electronic device are located at the upper and lower ends and two longer sides are located at the left and right sides. The horizontal screen mode is a mode in which two longer sides of the electronic device are located at the upper and lower ends and two shorter sides are located at the left and right sides.
For example, during a call made by a user holding the electronic device, the electronic device is usually in a portrait mode; when a user browses a webpage through electronic equipment, the electronic equipment is usually in a vertical screen mode; when a user watches a movie using the electronic device, the electronic device is usually in a landscape mode; when a user plays a network game using an electronic device, the electronic device is typically in a landscape mode.
The display screen of the electronic device is controlled and displayed by the processor, so that the second determining module 303 can obtain the working mode of the electronic device by querying the control parameter of the processor.
Subsequently, the second determining module 303 determines a target antenna group from the plurality of second antenna groups according to the working mode.
For example, the antenna group a, the antenna group B, the antenna group C, and the antenna group D in the electronic device are respectively disposed at four corners of the electronic device, as shown in fig. 1. When a user holds the electronic device, the user usually holds the lower half of the electronic device, and at the moment, the antenna group on the upper half of the electronic device is less interfered by the holding of the user. Therefore, when the electronic device is in the portrait mode, the second determining module 303 may directly determine the antenna group B located in the upper half as the target antenna group. When the electronic device is in the landscape mode, the second determining module 303 may directly determine the antenna group D located in the upper half as the target antenna group.
In some embodiments, when determining the target antenna group from the plurality of second antenna groups according to the working mode, the second determining module 303 is configured to perform the following steps:
determining a held part of the electronic equipment according to the working mode and the holding habit of the user for using the electronic equipment;
and determining a second antenna group which is farthest away from the held part in the plurality of second antenna groups as a target antenna group.
In practical applications, the habit of using the electronic device is different for each user, and the habit of holding the electronic device may also be different. For example, when the user X holds the electronic apparatus, it is used to hold the lower half portion of the electronic apparatus; when the user Y holds the electronic equipment, the user is used to hold the upper half part of the electronic equipment; when the user Z holds the electronic device, the user Z is used to hold the electronic device with both hands and respectively holds the lower left corner and the upper right corner of the electronic device. Thus, determining a target antenna group based solely on an operating mode of the electronic device may be inaccurate.
In the using process of the electronic equipment, the electronic equipment can acquire the holding part of the electronic equipment held by the user for multiple times, so that the holding habit of the user when using the electronic equipment is formed. The holding habit can be divided into different scenes. That is, the holding habit includes holding parts of the electronic device by the user in different scenes.
After the working mode of the electronic device is obtained, the second determining module 303 may obtain a holding habit of the user on the electronic device, so as to determine a held portion of the electronic device according to the working mode and the holding habit of the user using the electronic device.
For example, referring to fig. 1, when the electronic device is in a vertical screen state and a holding habit of a user is to hold an upper half portion of the electronic device, it may be determined that a held portion of the electronic device is a portion where the antenna group a and the antenna group B are located. For another example, when the electronic device is in a landscape state and the holding habit of the user is to hold the lower half portion of the electronic device, it may be determined that the held portion of the electronic device is the portion where the antenna group a and the antenna group C are located.
Since the position of each antenna group in the electronic device is fixed, after the second determining module 303 determines the held portion, it may determine the second antenna group farthest from the held portion. Subsequently, the second determining module 303 determines a second antenna group, which is farthest from the held part, of the plurality of second antenna groups as a target antenna group.
In some embodiments, when determining the target antenna group from the plurality of second antenna groups according to the working mode, the second determining module 303 is configured to perform the following steps:
determining a held part of the electronic equipment according to the working mode and the holding habit of the user for using the electronic equipment;
determining a third antenna group which is not held by a user from the plurality of second antenna groups according to the held part;
judging whether the third antenna group is a diversity antenna of the communication frequency band;
if at least one of the third antenna groups is not a diversity antenna of the communication frequency band, determining any one of the third antenna groups which is not a diversity antenna of the communication frequency band as a target antenna group.
In the using process of the electronic equipment, the electronic equipment can acquire the holding part of the electronic equipment held by the user for multiple times, so that the holding habit of the user when using the electronic equipment is formed. The holding habit can be divided into different scenes. That is, the holding habit includes holding parts of the electronic device by the user in different scenes.
After the working mode of the electronic device is obtained, the second determining module 303 may obtain a holding habit of the user on the electronic device, so as to determine a held portion of the electronic device according to the working mode and the holding habit of the user using the electronic device.
Subsequently, the second determining module 303 determines, according to the held portion, a third antenna group that is not held by the user from the plurality of second antenna groups.
For example, referring to fig. 1, when the electronic device is in a vertical screen state and a holding habit of a user is to hold an upper half portion of the electronic device, it may be determined that a held portion of the electronic device is a portion where the antenna group a and the antenna group B are located. At this time, the electronic device can determine that the third antenna group not held by the user is the antenna group C and the antenna group D from the plurality of second antenna groups.
Subsequently, the second determining module 303 determines whether the third antenna group is a diversity antenna of the communication frequency band. That is, it is determined whether the electronic device receives the radio frequency signal through each antenna group in the third antenna group. The second determining module 303 may determine whether the third antenna group is a diversity antenna of the communication frequency band by querying an operating parameter of a processor or a radio frequency circuit.
If the judgment is negative, that is, at least one of the third antenna groups is not a diversity antenna of the communication frequency band, determining any antenna group, which is not a diversity antenna of the communication frequency band, in the third antenna group as a target antenna group.
For example, the third antenna group determined by the second determining module 303 is antenna group C and antenna group D. If the antenna group C is a diversity antenna of the communication frequency band and the antenna group D is not a diversity antenna of the communication frequency band, the second determining module 303 may determine the antenna group D as a target antenna group. If neither antenna group C nor antenna group D is a diversity antenna of the communication frequency band, the second determining module 303 may determine any one of the antenna groups C and D as a target antenna group.
In some embodiments, after determining whether the third antenna group is all diversity antennas of the communication band, the second determining module 303 is further configured to:
if the third antenna group is a diversity antenna of the communication frequency band, acquiring a first signal attenuation amount when the second antenna group corresponding to the held part transmits the radio frequency signal of the communication frequency band;
comparing the first signal attenuation amount with a second signal attenuation amount interfered when the first antenna group transmits the radio-frequency signal;
and if the first signal attenuation amount is smaller than the second signal attenuation amount, determining any one antenna group in the second antenna group corresponding to the held part as a target antenna group.
If it is determined that the third antenna group is the diversity antenna of the communication frequency band, that is, the third antenna group is the antenna group C and the antenna group D, and the antenna group C and the antenna group D are both the diversity antennas of the communication frequency band, at this time, the second determining module 303 obtains the first signal attenuation amount when the second antenna group corresponding to the held part transmits the radio frequency signal of the communication frequency band.
For example, if the second antenna group corresponding to the held portion is the antenna group B, the second determining module 303 obtains the first signal attenuation amount when the antenna group B transmits the radio frequency signal. The second determining module 303 may obtain the first signal attenuation amount when the antenna group B transmits the radio frequency signal by querying an operating parameter of a processor or a radio frequency circuit. Wherein the first signal attenuation amount is a signal intensity value. For example, the first signal attenuation amount obtained by the second determining module 303 is 2dBm (decibel-milliwatt).
The second determining module 303 may monitor, in real time, an interference condition suffered by the first antenna group a when transmitting the radio frequency signal, so as to obtain a second signal attenuation amount suffered by the first antenna group a when transmitting the radio frequency signal. Wherein the second signal attenuation is also a signal strength value. For example, the second signal attenuation is 2.5 dBm.
Subsequently, the second determining module 303 compares the first signal attenuation amount with the second signal attenuation amount to determine whether the first signal attenuation amount is smaller than the second signal attenuation amount.
If the first signal attenuation amount is smaller than the second signal attenuation amount, for example, the first signal attenuation amount 2dBm is smaller than the second signal attenuation amount 2.5dBm, it indicates that the interference received by the second antenna group corresponding to the held part is smaller than the interference received by the first antenna group, that is, the radio frequency performance of the second antenna group corresponding to the held part is better. At this time, the second determining module 303 determines any antenna group in the second antenna group corresponding to the held portion as the target antenna group. For example, the second antenna group B is determined as the target antenna group.
If the first signal attenuation amount is not less than the second signal attenuation amount, it indicates that the interference on the second antenna group corresponding to the held part is greater than the interference on the first antenna group, that is, the radio frequency performance of the first antenna group is better. At this time, the electronic device may maintain the first antenna group to receive and transmit the radio frequency signal unchanged, that is, maintain the main set antenna unchanged.
In specific implementation, the modules may be implemented as independent entities, or may be combined arbitrarily and implemented as one or several entities.
As can be seen from the above, the antenna switching apparatus 300 according to the embodiment of the present application includes: an obtaining module 301, configured to obtain a communication frequency band of a first antenna group when the first antenna group receives and transmits a radio frequency signal; a first determining module 302, configured to determine, according to the communication frequency band, an interference source causing interference to the first antenna group; a second determining module 303, configured to determine a target antenna group from the multiple second antenna groups if the interference source is in a working state; a switching module 304, configured to switch the first antenna group to receive and transmit radio frequency signals to the target antenna group to receive and transmit radio frequency signals. When an interference source causing interference to the communication frequency band of the first antenna group is in a working state, the antenna switching device can determine a target antenna group from the plurality of second antenna groups and switch to the target antenna group to receive and transmit radio frequency signals, so that interference caused by the interference source to the radio frequency signals of the electronic equipment can be reduced, and the communication stability of the electronic equipment is improved.
The embodiment of the application also provides the electronic equipment. The electronic device may be a smartphone, a tablet computer, a gaming device, an AR (Augmented Reality) device, an automobile, a data storage device, an audio playback device, a video playback device, a laptop computer, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a second electronic device according to an embodiment of the present application.
The electronic device 400 comprises a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
The processor 401 is a control center of the electronic device 400, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or calling a computer program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to one or more processes of the computer program into the memory 402 according to the following steps, and the processor 401 runs the computer program stored in the memory 402, so as to execute the following steps:
when a first antenna group receives and transmits radio frequency signals, acquiring a communication frequency band of the first antenna group;
determining an interference source causing interference to the first antenna group according to the communication frequency band;
if the interference source is in a working state, determining a target antenna group from a plurality of second antenna groups;
and switching the first antenna group transceiving radio frequency signal to the target antenna group transceiving radio frequency signal.
In some embodiments, when determining the target antenna group from the plurality of second antenna groups, the processor 301 performs the following steps:
acquiring working modes of the electronic equipment, wherein the working modes comprise a vertical screen mode and a horizontal screen mode;
and determining a target antenna group from the plurality of second antenna groups according to the working mode.
In some embodiments, when determining a target antenna group from the plurality of second antenna groups according to the working mode, the processor 301 performs the following steps:
determining a held part of the electronic equipment according to the working mode and the holding habit of the user for using the electronic equipment;
and determining a second antenna group which is farthest away from the held part in the plurality of second antenna groups as a target antenna group.
In some embodiments, when determining a target antenna group from the plurality of second antenna groups according to the working mode, the processor 301 performs the following steps:
determining a held part of the electronic equipment according to the working mode and the holding habit of the user for using the electronic equipment;
determining a third antenna group which is not held by a user from the plurality of second antenna groups according to the held part;
judging whether the third antenna group is a diversity antenna of the communication frequency band;
if at least one of the third antenna groups is not a diversity antenna of the communication frequency band, determining any one of the third antenna groups which is not a diversity antenna of the communication frequency band as a target antenna group.
In some embodiments, after determining whether the third antenna group is all diversity antennas of the communication band, the processor 301 further performs the following steps:
if the third antenna group is a diversity antenna of the communication frequency band, acquiring a first signal attenuation amount when the second antenna group corresponding to the held part transmits the radio frequency signal of the communication frequency band;
comparing the first signal attenuation amount with a second signal attenuation amount interfered when the first antenna group transmits the radio-frequency signal;
and if the first signal attenuation amount is smaller than the second signal attenuation amount, determining any one antenna group in the second antenna group corresponding to the held part as a target antenna group.
Memory 402 may be used to store computer programs and data. The memory 402 stores computer programs containing instructions executable in the processor. The computer program may constitute various functional modules. The processor 401 executes various functional applications and data processing by calling a computer program stored in the memory 402.
In some embodiments, referring to fig. 8, fig. 8 is a schematic structural diagram of a third electronic device provided in the embodiments of the present application.
Wherein the electronic device 400 further comprises: radio frequency circuit 403, display 404, control circuit 405, input unit 406, audio circuit 407, sensor 408, and power supply 409. The processor 401 is electrically connected to the radio frequency circuit 403, the display 404, the control circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power source 409.
The radio frequency circuit 403 is used for processing radio frequency signals to enable communication between the electronic device and a base station or other electronic devices through the radio frequency signals.
The display screen 404 may be used to display information entered by or provided to the user as well as various graphical user interfaces of the electronic device, which may be comprised of images, text, icons, video, and any combination thereof.
The control circuit 405 is electrically connected to the display screen 404, and is configured to control the display screen 404 to display information.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 406 may include a fingerprint recognition module.
The audio circuit 407 may provide an audio interface between the user and the electronic device through a speaker, microphone.
The sensor 408 is used to collect external environmental information. The sensors 408 may include one or more of ambient light sensors, acceleration sensors, gyroscopes, etc.
The power supply 409 is used to power the various components of the electronic device 400. In some embodiments, the power source 409 may be logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are implemented through the power management system.
Although not shown in fig. 8, the electronic device 400 may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
As can be seen from the above, an embodiment of the present application provides an electronic device, where the electronic device performs the following steps: when a first antenna group receives and transmits radio frequency signals, acquiring a communication frequency band of the first antenna group; determining an interference source causing interference to the first antenna group according to the communication frequency band; if the interference source is in a working state, determining a target antenna group from a plurality of second antenna groups; and switching the first antenna group transceiving radio frequency signal to the target antenna group transceiving radio frequency signal. When the interference source causing interference to the communication frequency band of the first antenna group is in a working state, the electronic device can determine the target antenna group from the plurality of second antenna groups and switch to the target antenna group to receive and transmit the radio frequency signal, so that the interference caused by the interference source to the radio frequency signal of the electronic device can be reduced, and the communication stability of the electronic device is improved.
An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer executes the antenna switching method according to any of the above embodiments.
It should be noted that, all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, which may include, but is not limited to: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The antenna switching method, the antenna switching device, the storage medium, and the electronic device provided in the embodiments of the present application are described in detail above. The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.