CN110266359B - Antenna switching method and device, electronic equipment and computer readable storage medium - Google Patents
Antenna switching method and device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN110266359B CN110266359B CN201910556972.1A CN201910556972A CN110266359B CN 110266359 B CN110266359 B CN 110266359B CN 201910556972 A CN201910556972 A CN 201910556972A CN 110266359 B CN110266359 B CN 110266359B
- Authority
- CN
- China
- Prior art keywords
- antenna
- communication system
- target
- signal strength
- lpwan
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B17/00—Monitoring; Testing
- H04B17/30—Monitoring; Testing of propagation channels
- H04B17/309—Measuring or estimating channel quality parameters
- H04B17/318—Received signal strength
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B7/00—Radio transmission systems, i.e. using radiation field
- H04B7/02—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas
- H04B7/04—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas
- H04B7/06—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the transmitting station
- H04B7/0602—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the transmitting station using antenna switching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B7/00—Radio transmission systems, i.e. using radiation field
- H04B7/02—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas
- H04B7/04—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas
- H04B7/06—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the transmitting station
- H04B7/0602—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the transmitting station using antenna switching
- H04B7/0608—Antenna selection according to transmission parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B7/00—Radio transmission systems, i.e. using radiation field
- H04B7/02—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas
- H04B7/04—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas
- H04B7/08—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the receiving station
- H04B7/0802—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the receiving station using antenna selection
- H04B7/0805—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the receiving station using antenna selection with single receiver and antenna switching
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the application discloses an antenna switching method and a related product, which are applied to electronic equipment, wherein at least one target communication system is obtained by taking at least one of a cellular communication system and an LPWAN communication system as the target communication system, at least one target signal strength corresponding to the at least one target communication system is obtained, the priority sequence between a first antenna and a second antenna is determined according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, the priority of the first antenna is higher than that of the second antenna, if any target signal strength is smaller than a corresponding preset signal strength threshold value, a first communication branch corresponding to any target signal strength is switched to the first antenna, and the second communication branch is switched to the second antenna, so that an antenna with higher priority can be selected for antenna switching according to the target signal strength corresponding to the target communication system in the electronic equipment, and the communication performance of the target communication system is improved.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to an antenna switching method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the widespread use of electronic devices (such as mobile phones, tablet computers, etc.), the electronic devices have more and more applications and more powerful functions, and the electronic devices are developed towards diversification and personalization, and become indispensable electronic products in the life of users.
Currently, radio frequency front end circuits of most electronic devices adopt technologies such as a cellular Network and a short-range radio frequency, wherein the short-range radio frequency technology includes a wireless fidelity (WIFI) technology, a Bluetooth (BT) technology, a Global Positioning System (GPS) technology, and a Frequency Modulation (FM) technology, but a Low-Power Wide-Area Network (LPWAN) technology is rarely adopted. The LPWAN technology is an Internet of things network layer technology for meeting communication requirements of long distance and low power consumption in the Internet of things.
Disclosure of Invention
The embodiment of the application provides an antenna switching method and device, electronic equipment and a computer readable storage medium, which can select an antenna with higher priority to switch antennas according to target signal strength corresponding to a target communication system in the electronic equipment, so as to improve the communication performance of the target communication system.
In a first aspect, an embodiment of the present application provides an antenna switching method, which is applied to an electronic device, where the electronic device includes a low power wide area network LPWAN communication module, a cellular communication module, a DPDT switch, a first antenna, and a second antenna, the LPWAN communication module and the cellular communication module are respectively connected to one end of the DPDT switch, and the other end of the DPDT switch is respectively connected to the first antenna and the second antenna, and the method includes:
taking at least one of a cellular communication system and an LPWAN communication system as a target communication system to obtain at least one target communication system, wherein the cellular communication system corresponds to the cellular communication module, and the LPWAN communication system corresponds to the LPWAN communication module;
acquiring target signal intensity corresponding to each target communication system in the at least one target communication system to obtain at least one target signal intensity;
determining a priority order between the first antenna and the second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, and obtaining that the priority of the first antenna is higher than that of the second antenna;
if any target signal strength in the at least one target signal strength is smaller than a corresponding preset signal strength threshold value, switching a first communication branch corresponding to the any target signal strength to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch corresponding to a communication system except for the target communication system corresponding to the first communication branch in the cellular communication system and the LPWAN communication system.
In a second aspect, an embodiment of the present application provides an antenna switching apparatus, which is applied to an electronic device, where the electronic device includes a low power wide area network LPWAN communication module, a cellular communication module, a DPDT switch, a first antenna, and a second antenna, the LPWAN communication module and the cellular communication module are respectively connected to one end of the DPDT switch, and the other end of the DPDT switch is respectively connected to the first antenna and the second antenna, and the antenna switching apparatus includes:
the device comprises a determining unit, a determining unit and a judging unit, wherein the determining unit is used for taking at least one of a cellular communication system and an LPWAN communication system as a target communication system to obtain at least one target communication system, the cellular communication system corresponds to the cellular communication module, and the LPWAN communication system corresponds to the LPWAN communication module;
the acquisition unit is used for acquiring the target signal strength corresponding to each target communication system in the at least one target communication system to obtain at least one target signal strength;
the determining unit is further configured to determine a priority order between the first antenna and the second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, so as to obtain a priority of the first antenna higher than a priority of the second antenna;
a switching unit, configured to switch, by using the DPDT switch, a first communication branch corresponding to any one of the target signal strengths to the first antenna when any one of the target signal strengths is smaller than a corresponding preset signal strength threshold; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch corresponding to a communication system except for the target communication system corresponding to the first communication branch in the cellular communication system and the LPWAN communication system.
In a third aspect, an embodiment of the present application provides an electronic device, including: the system comprises an LPWAN communication module, a cellular communication module, a DPDT switch, a first antenna, a second antenna, a processor, a memory and a communication interface; and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for some or all of the steps as described in the first aspect of an embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, where the computer program is used to make a computer execute some or all of the steps described in the first aspect of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that, the antenna switching method, the apparatus, the electronic device, and the computer-readable storage medium described in the embodiments of the present application are applied to an electronic device, and at least one target communication system is obtained by taking at least one of a cellular communication system and an LPWAN communication system as a target communication system, obtaining at least one target signal strength corresponding to the at least one target communication system, determining a priority order between a first antenna and a second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, obtaining a priority of the first antenna higher than a priority of the second antenna, if any target signal strength is smaller than a corresponding preset signal strength threshold, switching the first communication branch corresponding to any target signal strength to the first antenna, switching the second communication branch to the second antenna, and so on, the antenna with higher priority can be selected for antenna switching according to the target signal strength corresponding to the target communication system in the electronic equipment, so that the communication performance of the target communication system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 1B is a schematic flowchart of an antenna switching method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another antenna switching method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another antenna switching method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an antenna switching apparatus according to an embodiment of the present application;
fig. 6 is another schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, 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, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic devices involved in the embodiments of the present application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with wireless communication functions, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal equipment (terminal device), and so on. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices.
In the embodiment of the present application, a wide area network may be formed by using a technology in an Industrial Scientific Medical (ISM) frequency band in the LPWAN, for example, communication technologies such as LORA and Sigfox do not need to depend on a base station. Therefore, the radio frequency front-end circuit of the electronic equipment can adopt communication technologies such as LORA, Sigfox, Weightless and the like, and a good communication effect is achieved.
The LORA technology is a low power consumption networking technology developed by the company semtech, and is a long-distance wireless transmission technology based on a spread spectrum technology, and mainly works at ism (industrial Scientific medical) public frequency.
The Sigfox technology is a Low Power Wide Area network (LPWA) technology with prominent characteristics of long distance, Low Power consumption and Low transmission rate, utilizes an Ultra Narrow Band (umb) technology, and mainly works at ISM public frequency.
The following describes embodiments of the present application in detail.
Referring to fig. 1A, fig. 1A is a schematic structural diagram of an electronic device 100 according to an embodiment of the present disclosure, where the electronic device 100 includes: the system comprises a processor 110, a memory 120, a Low Power Wide Area Network (LPWAN) communication module 130, a cellular communication module 140, a DPDT switch 150, a first antenna 160 and a second antenna 170, wherein the LPWAN communication module 130 and the cellular communication module 140 are respectively connected with one end of the DPDT150 switch, and the other end of the DPDT switch 150 is respectively connected with the first antenna 160 and the second antenna 170.
Wherein the LPWAN communication module 130 and the cellular communication module 140 are respectively connected with the processor 110.
Optionally, the cellular communication module comprises a cellular communication transceiver module and a cellular communication radio frequency front end module.
Wherein, a filter is further included between the LPWAN communication module 130 and the DPDT150 switch.
Referring to fig. 1B, fig. 1B is a schematic flowchart of an antenna switching method provided in an embodiment of the present application, where the antenna switching method described in this embodiment is applied to an electronic device shown in fig. 1A, the electronic device includes a low power wide area network LPWAN communication module, a cellular communication module, a DPDT switch, a first antenna and a second antenna, the LPWAN communication module and the cellular communication module are respectively connected to one end of the DPDT switch, and the DPDT switch has another end connected to the first antenna and the second antenna, and the antenna switching method includes:
101. and taking at least one of the cellular communication system and the LPWAN communication system as a target communication system to obtain at least one target communication system, wherein the cellular communication system corresponds to the cellular communication module, and the LPWAN communication system corresponds to the LPWAN communication module.
In the embodiment of the present application, the electronic device includes a cellular communication module and an LPWAN communication module, and therefore, the electronic device may use a cellular communication system corresponding to the cellular communication module and an LPWAN communication system corresponding to the LPWAN communication module. Therefore, the electronic device can take at least one of the cellular communication system and the LPWAN communication system as a target communication system to obtain at least one target communication system. Specifically, the electronic device may determine one communication system from the cellular communication system and the LPWAN communication system as a target communication system, or the electronic device may use both the cellular communication system and the LPWAN communication system as the target communication systems to obtain two target communication systems.
Optionally, the electronic device determines a communication system from the cellular communication system and the LPWAN communication system as a target communication system, and the cellular communication system or the LPWAN communication system may be set as the target communication system by user selection or system default.
Optionally, in the step 101, the obtaining at least one target communication standard by taking at least one of the cellular communication standard and the LPWAN communication standard as the target communication standard may include the following steps:
11. determining a target application operated by the foreground of the electronic equipment;
12. if the target application belongs to a preset first application list, taking the cellular communication system as the target communication system;
13. and if the target application belongs to a preset second application list, taking the LPWAN communication system as the target communication system.
In the embodiment of the application, a first application list corresponding to a cellular communication system and a second application list corresponding to an LPWAN communication system may be preset, so that after determining a target application running in a foreground of an electronic device, it may be determined whether the target application belongs to the first application list or the second application list. If the target application belongs to the preset first application list, the cellular communication system is used as the target communication system, for example, when the target application is a browser application, and the browser application belongs to the first application list, it indicates that the data transmission rate applicable to the cellular communication system is faster, and the cellular communication system can be used as the target communication system. If the target application belongs to the preset second application list, the LPWAN communication system is used as the target communication system, and a plurality of applications with higher data transmission rate in the LPWAN communication system can be set in the second application list, so that the target application can realize better communication performance by using the LPWAN communication system as the target communication system.
102. And acquiring the target signal intensity corresponding to each target communication system in the at least one target communication system to obtain at least one target signal intensity.
In the embodiment of the application, for each target communication system in at least one target communication system, the target signal strength corresponding to each target communication system can be determined, so that at least one target signal strength value can be obtained.
Optionally, in the step 102, obtaining a target signal strength corresponding to each target communication system in the at least one target communication system to obtain the at least one target signal strength may include the following steps:
and acquiring the target signal strength corresponding to the antenna currently connected with the communication module corresponding to each target communication system in the at least one target communication system to obtain at least one target signal strength.
The target signal strength corresponding to the antenna currently connected with the communication module corresponding to each target communication system can be obtained, so that at least one target signal strength can be obtained.
Optionally, if the target communication system is a communication system, that is, when the target communication system is a cellular communication system or an LPWAN communication system, the target signal strength corresponding to the target communication system may be obtained. For example, when the target communication system is a cellular communication system, the first target signal strength corresponding to the antenna currently connected to the communication module corresponding to the cellular communication system may be obtained. For another example, when the target communication system is the LPWAN communication system, the second target signal strength corresponding to the antenna currently connected to the communication module corresponding to the LPWAN communication system may be obtained.
Optionally, if the target communication system includes a cellular communication system and an LPWAN communication system, a first target signal strength corresponding to an antenna currently connected to a communication module corresponding to the cellular communication system and a second target signal strength corresponding to an antenna currently connected to the communication module corresponding to the LPWAN communication system may be obtained.
103. Determining the priority order between a first antenna and a second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, and obtaining that the priority of the first antenna is higher than that of the second antenna.
Wherein the first detection parameter of the first antenna may include at least one of: a first working efficiency value of a working frequency band of a first antenna working under a target communication system, a first reference signal strength value corresponding to the first antenna, a first standing wave value of the first antenna working under the working frequency band, a first approaching state of the first antenna and the like; the second detection parameter of the second antenna may include at least one of: a second working efficiency value of a working frequency band of the second antenna working under the target communication system, a second reference signal strength value corresponding to the second antenna, a second standing wave value of the second antenna working under the working frequency band, a second approach state of the second antenna, and the like.
The priority order between the first antenna and the second antenna can be determined according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, so that the priority of the first antenna is higher than that of the second antenna.
Optionally, the first detection parameter is a first operating efficiency value of the first antenna, the second detection parameter is a second operating efficiency value of the second antenna, and in step 103, the priority order between the first antenna and the second antenna is determined according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, so as to obtain a priority of the first antenna higher than a priority of the second antenna, which may include the following steps:
31. acquiring a working frequency band of the electronic equipment in any one target communication system of the at least one target communication system;
32. acquiring a first working efficiency value of the first antenna working in the working frequency band and a second working efficiency value of the second antenna working in the working frequency band;
33. if the first operating efficiency value is greater than the second operating efficiency value, determining that the priority of the first antenna is higher than the priority of the second antenna.
Specifically, if the target communication system is a cellular communication system or LPWAN communication system, the first and second operating efficiency values of the first and second antennas at the operating frequency bands corresponding to the target communication system may be obtained, and if the first operating efficiency value is greater than the second operating efficiency value, the priority of the first antenna may be determined to be higher than the priority of the second antenna. For example, when the target communication system is the LPWAN communication system, the operating frequency band in which the electronic device operates in the LPWAN communication system may be determined, then, a first operating efficiency value of the first antenna operating in the operating frequency band and a second operating efficiency value of the second antenna operating in the operating frequency band may be obtained, and if the first operating efficiency value is greater than the second operating efficiency value, it may be determined that the priority of the first antenna is higher than the priority of the second antenna. For another example, when the target communication system is a cellular communication system, an operating frequency band in which the electronic device operates in the cellular communication system may be determined, then, a first operating efficiency value of the first antenna operating in the operating frequency band and a second operating efficiency value of the second antenna operating in the operating frequency band may be obtained, and if the first operating efficiency value is greater than the second operating efficiency value, it may be determined that the priority of the first antenna is higher than the priority of the second antenna.
If the target communication system comprises a cellular communication system and an LPWAN communication system, a working frequency band of the electronic equipment in any one of the two target communication systems can be acquired, namely, a working frequency band corresponding to the cellular communication system or the LPWAN communication system can be acquired, then, a first working efficiency value of the first antenna working in the working frequency band and a second working efficiency value of the second antenna working in the working frequency band are acquired, and if the first working efficiency value is greater than the second working efficiency value, the priority of the first antenna is determined to be higher than the priority of the second antenna.
Therefore, the first antenna with the larger working efficiency value is determined to be selected to be connected with the first communication branch corresponding to the target communication system according to the first working efficiency value of the first antenna and the second working efficiency value of the second antenna, and therefore the working efficiency of the antenna working under the target communication system can be improved.
Optionally, the first detection parameter is a first reference signal strength value of the first antenna, and the second detection parameter is a second reference signal strength value of the second antenna, in step 103, the priority order between the first antenna and the second antenna is determined according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, so as to obtain that the priority of the first antenna is higher than the priority of the second antenna, and the method may include the following steps:
34. switching the DPDT switch to the first antenna to obtain a first reference signal strength value corresponding to the first antenna;
35. switching the DPDT switch to the second antenna to obtain a second reference signal strength value corresponding to the second antenna;
36. if the first reference signal strength value is greater than the second reference signal strength value, determining that the priority of the first antenna is higher than the priority of the second antenna.
The priority order between the first antenna and the second antenna may be determined according to a first reference signal strength value of the first antenna and a second reference signal strength value of the second antenna, and specifically, the DPDT switch may be switched to the first antenna to obtain a first reference signal strength value corresponding to the first antenna, and then the DPDT switch may be switched to the second antenna to obtain a second reference signal strength value corresponding to the second antenna, and if the first reference signal strength value is greater than the second reference signal strength value, it may be determined that the priority of the first antenna is higher than the priority of the second antenna. Therefore, the first antenna with the larger signal intensity value can be determined to be selected to be connected with the first communication branch corresponding to the target communication system according to the first reference signal intensity value of the first antenna and the second reference signal intensity value of the second antenna, and therefore the signal intensity of the antenna working under the target communication system can be improved.
Optionally, the first detection parameter is a first standing wave value of the first antenna, the second detection parameter is a second standing wave value of the second antenna, and in step 103, the priority order between the first antenna and the second antenna is determined according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, so as to obtain a priority that the priority of the first antenna is higher than the priority of the second antenna, which may include the following steps:
37. acquiring a working frequency band of the electronic equipment in any one target communication system of the at least one target communication system;
38. acquiring a first standing wave value of the first antenna working in the working frequency band and a second standing wave value of the second antenna working in the working frequency band;
39. and if the first standing wave value is smaller than the second standing wave value, determining that the priority of the first antenna is higher than that of the second antenna.
Specifically, if the target communication system is a cellular communication system or LPWAN communication system, the first standing wave value and the second standing wave value of the first antenna and the second antenna at the working frequency band corresponding to the target communication system may be obtained, and if the first standing wave value is smaller than the second standing wave value, the priority of the first antenna may be determined to be higher than the priority of the second antenna. For example, when the target communication system is the LPWAN communication system, an operating frequency band in which the electronic device operates in the LPWAN communication system may be determined, then, a first standing wave value at which the first antenna operates in the operating frequency band and a second standing wave value at which the second antenna operates in the operating frequency band may be obtained, and if the first standing wave value is smaller than the second standing wave value, it may be determined that the priority of the first antenna is higher than the priority of the second antenna. When the target communication system is a cellular communication system, a working frequency band in which the electronic device works in the cellular communication system can be determined, then, a first standing wave value of the first antenna working in the working frequency band and a second standing wave value of the second antenna working in the working frequency band are obtained, and if the first standing wave value is smaller than the second standing wave value, the priority of the first antenna can be determined to be higher than that of the second antenna. Therefore, the first antenna with the smaller standing wave value can be determined to be connected with the first communication branch corresponding to the target communication system according to the first standing wave value of the first antenna and the second standing wave value of the second antenna, and the smaller the standing wave value is, the smaller the loss in the signal transmission process is, and the higher the signal transmission rate is, so that the signal transmission rate of the antenna working in the target communication system can be improved.
If the target communication system comprises a cellular communication system and an LPWAN communication system, a working frequency band of the electronic equipment in any one of the two target communication systems can be acquired, namely, a working frequency band corresponding to the cellular communication system or the LPWAN communication system can be acquired, then, a first standing wave value of the first antenna working in the working frequency band and a second standing wave value of the second antenna working in the working frequency band are acquired, and if the first standing wave value is smaller than the second standing wave value, the priority of the first antenna is determined to be higher than that of the second antenna.
Optionally, the first detection parameter is a first proximity state of the first antenna, the second detection parameter is a second proximity state of the second antenna, the electronic device further includes a first proximity sensor corresponding to the first antenna, and a second proximity sensor corresponding to the second antenna, in step 103, the priority order between the first antenna and the second antenna is determined according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, and the priority of the first antenna is higher than the priority of the second antenna, which may include the following steps:
and if the second proximity sensor detects that an object is close to the second antenna within a preset distance, determining that the priority of the first antenna is higher than that of the second antenna.
In the embodiment of the application, in the electronic device, a first proximity sensor is arranged at a first position corresponding to a first antenna, a second proximity sensor is arranged at a second position corresponding to a second antenna, and the first proximity sensor can be used for detecting a first proximity state of the first antenna, that is, whether an object is close to the first antenna within a preset distance or not. When the second proximity sensor detects that an object is close to the second antenna within the preset distance, the second proximity sensor indicates that the second antenna is possibly blocked by the object, and therefore the priority of the first antenna can be determined to be higher than that of the second antenna. When the second antenna is blocked by the hand of the user, the signal transmission of the second antenna can be influenced, and therefore, whether the first antenna or the second antenna is blocked or not is judged through the proximity sensor, so that the priority of the unblocked first antenna can be determined to be higher than that of the second antenna, and the signal strength of the antenna working under the target communication system can be improved.
104. If any target signal strength in the at least one target signal strength is smaller than a corresponding preset signal strength threshold value, switching a first communication branch corresponding to the any target signal strength to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch corresponding to a communication system except for the target communication system corresponding to the first communication branch in the cellular communication system and the LPWAN communication system.
In the embodiment of the application, one end of the DPDT switch is connected to the LPWAN communication module and the cellular communication module, and the other end of the DPDT switch is connected to the first antenna and the second antenna, so that the DPDT switch can be switched to determine the connection between the LPWAN communication module and the first antenna or the second antenna, and to determine the connection between the LPWAN communication module and the first antenna or the second antenna. Thus, the LPWAN communication system and the cellular communication system in the electronic equipment can share 2 antennas, and the two communication systems can be used simultaneously.
In a specific implementation, after determining that the priority of the first antenna is higher than the priority of the second antenna, if any one of the at least one target signal strengths is smaller than the corresponding preset signal strength threshold, the DPDT switch may be used to switch the first communication branch corresponding to the any one target signal strength to the first antenna, and the DPDT switch may be used to switch the second communication branch to the second antenna. If the antenna connected with the first communication branch corresponding to the target communication system is the first antenna, the state that the first communication branch is connected with the first antenna is maintained, and antenna switching does not need to be performed through a DPDT switch. Therefore, the antenna with higher priority is selected for antenna switching according to the target communication system currently used by the electronic equipment, and the communication performance of the target communication system is improved.
Optionally, the at least one target communication system is the cellular communication system and the LPWAN communication system, and the at least one target signal strength includes a first target signal strength corresponding to the cellular communication system and a second target signal strength corresponding to the LPWAN communication system; in the embodiment of the present application, the method may further include the following steps:
if the first target signal strength is smaller than a first preset signal strength threshold corresponding to the cellular communication system and the second target signal strength is smaller than a second preset signal strength threshold corresponding to the LPWAN communication system, switching a first communication branch corresponding to the cellular communication system to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch other than the target communication system corresponding to the first communication branch.
Under the scene that the target communication system comprises a cellular communication system and an LPWAN communication system, if the first target signal strength is smaller than a first preset signal strength threshold value and the second target signal strength is smaller than a second preset signal strength threshold value, switching a first communication branch corresponding to the cellular communication system to the first antenna through a DPDT switch; the second communication branch is switched to the second antenna through the DPDT switch, and the second communication branch is a communication branch corresponding to the LPWAN communication system, so that antenna switching can be performed on the first communication branch corresponding to the cellular communication system, and the communication performance of the first communication branch corresponding to the cellular communication system is ensured.
It can be seen that the antenna switching method described in this embodiment of the present application is applied to an electronic device, obtains at least one target communication system by using at least one of a cellular communication system and an LPWAN communication system as a target communication system, obtains at least one target signal strength corresponding to the at least one target communication system, determines a priority order between a first antenna and a second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, obtains a priority of the first antenna higher than that of the second antenna, switches a first communication branch corresponding to any target signal strength to the first antenna and a second communication branch to the second antenna if any target signal strength is smaller than a corresponding preset signal strength threshold, and thus, selects an antenna with a higher priority for antenna switching according to the target signal strength corresponding to the target communication system in the electronic device, and the communication performance of the target communication system is improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating another antenna switching method according to an embodiment of the present disclosure, where the antenna switching method described in this embodiment is applied to the electronic device shown in fig. 1A, where the electronic device includes a low power wide area network LPWAN communication module, a cellular communication module, a DPDT switch, a first antenna and a second antenna, the LPWAN communication module and the cellular communication module are respectively connected to one end of the DPDT switch, and the other end of the DPDT switch is respectively connected to the first antenna and the second antenna, and the method may include the following steps:
201. and determining the target application operated by the foreground of the electronic equipment.
202. If the target application belongs to a preset first application list, a cellular communication system is used as a target communication system, if the target application belongs to a preset second application list, an LPWAN communication system is used as a target communication system, the cellular communication system corresponds to a cellular communication module, and the LPWAN communication system corresponds to an LPWAN communication module.
203. And acquiring the target signal intensity corresponding to the target communication system.
204. Determining a priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, and obtaining that the priority of the first antenna is higher than that of the second antenna.
205. If the target signal intensity is smaller than the corresponding preset signal intensity threshold value, switching a first communication branch corresponding to the target communication system to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch corresponding to a communication system except the target communication system among the cellular communication system and the LPWAN communication system.
The specific implementation process of the steps 201-205 can refer to the corresponding description in the steps 101-104, and will not be described herein again.
It can be seen that the antenna switching method described in the embodiment of the present application is applied to an electronic device, and is implemented by determining a target application running on a foreground of the electronic device, taking a cellular communication system as a target communication system if the target application belongs to a preset first application list, taking an LPWAN communication system as the target communication system if the target application belongs to a preset second application list, obtaining a target signal strength corresponding to the target communication system, determining a priority order between a first antenna and a second antenna, obtaining a priority of the first antenna higher than that of the second antenna, and switching a first communication branch corresponding to the target communication system to the first antenna if the target signal strength is smaller than a corresponding preset signal strength threshold; and switching the second communication branch to a second antenna, thus, determining a target communication system according to the target application, and then selecting an antenna with higher priority for antenna switching according to the target signal strength corresponding to the target communication system in the electronic equipment, so that the communication performance of the target communication system can be improved.
In accordance with the foregoing, please refer to fig. 3, which is a flowchart illustrating another antenna switching method provided in this embodiment of the present application, where the antenna switching method described in this embodiment is applied to an electronic device shown in fig. 1A, where the electronic device includes a low power wide area network LPWAN communication module, a cellular communication module, a DPDT switch, a first antenna and a second antenna, the LPWAN communication module and the cellular communication module are respectively connected to one end of the DPDT switch, and the DPDT switch has another end connected to the first antenna and the second antenna, and the method may include the following steps:
301. and taking a cellular communication system and an LPWAN communication system as target communication systems to obtain two target communication systems, wherein the cellular communication system corresponds to the cellular communication module, and the LPWAN communication system corresponds to the LPWAN communication module.
302. And acquiring a first target signal strength corresponding to the cellular communication system and a second target signal strength corresponding to the LPWAN communication system.
303. Determining a priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, and obtaining that the priority of the first antenna is higher than that of the second antenna.
304. If any one of the first target signal strength and the second target signal strength is smaller than a corresponding preset signal strength threshold, switching a first communication branch corresponding to the any one of the target signal strengths to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch corresponding to a communication system except for the target communication system corresponding to the first communication branch in the cellular communication system and the LPWAN communication system.
305. If the first target signal strength is smaller than a first preset signal strength threshold corresponding to the cellular communication system and the second target signal strength is smaller than a second preset signal strength threshold corresponding to the LPWAN communication system, switching a first communication branch corresponding to the cellular communication system to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch except for the target communication system corresponding to the first communication branch.
The specific implementation process of steps 301-305 may refer to the corresponding description in steps 101-104, and will not be described herein again.
It can be seen that the antenna switching method described in this embodiment of the present application is applied to an electronic device, and obtains two target communication systems by taking a cellular communication system and an LPWAN communication system as target communication systems, obtains a first target signal strength corresponding to the cellular communication system and a second target signal strength corresponding to the LPWAN communication system, determines a priority order between a first antenna and a second antenna, obtains a priority of the first antenna higher than that of the second antenna, switches a first communication branch corresponding to any target signal strength to the first antenna and switches a second communication branch to the second antenna if any target signal strength of the first target signal strength and the second target signal strength is smaller than a corresponding preset signal strength threshold, and switches the first communication branch to the second antenna if the first target signal strength is smaller than the first preset signal strength threshold and the second target signal strength is smaller than the second preset signal strength threshold, the first communication branch corresponding to the cellular communication system is switched to the first antenna, and the second communication branch is switched to the second antenna, so that the antenna with higher priority can be selected for antenna switching according to the target signal strength corresponding to the target communication system in the electronic equipment, and the communication performance of the target communication system is improved.
The following is a device for implementing the antenna switching method, specifically as follows:
in accordance with the above, please refer to fig. 4, where fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, the electronic device includes: processor 410, LPWAN communication module 430, cellular communication module 440, DPDT switch 450, first antenna 460, second antenna 470, communication interface 480, and memory 420; and one or more programs, the one or more programs 421 stored in the memory and configured to be executed by the processor, the programs 421 including instructions for:
taking at least one of a cellular communication system and an LPWAN communication system as a target communication system to obtain at least one target communication system, wherein the cellular communication system corresponds to the cellular communication module, and the LPWAN communication system corresponds to the LPWAN communication module;
acquiring target signal intensity corresponding to each target communication system in the at least one target communication system to obtain at least one target signal intensity;
determining a priority order between the first antenna and the second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, and obtaining that the priority of the first antenna is higher than that of the second antenna;
if any target signal strength in the at least one target signal strength is smaller than a corresponding preset signal strength threshold value, switching a first communication branch corresponding to the any target signal strength to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch corresponding to a communication system except for the target communication system corresponding to the first communication branch in the cellular communication system and the LPWAN communication system.
In one possible example, in terms of obtaining at least one target communication standard by using at least one of the cellular communication standard and the LPWAN communication standard as the target communication standard, the program 421 includes instructions for performing the following steps:
determining a target application operated by the foreground of the electronic equipment;
if the target application belongs to a preset first application list, taking the cellular communication system as the target communication system;
and if the target application belongs to a preset second application list, taking the LPWAN communication system as the target communication system.
In a possible example, in the aspect of obtaining a target signal strength corresponding to each target communication system in the at least one target communication system to obtain at least one target signal strength, the program 421 includes instructions for performing the following steps:
and acquiring the target signal strength corresponding to the antenna currently connected with the communication module corresponding to each target communication system in the at least one target communication system to obtain at least one target signal strength.
In one possible example, the first detection parameter is a first operating efficiency value of the first antenna, the second detection parameter is a second operating efficiency value of the second antenna, and in the aspect of determining the priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, the priority order of the first antenna is higher than that of the second antenna, the program 421 includes instructions for:
acquiring a working frequency band of the electronic equipment in any one target communication system of the at least one target communication system;
acquiring a first working efficiency value of the first antenna working in the working frequency band and a second working efficiency value of the second antenna working in the working frequency band;
if the first operating efficiency value is greater than the second operating efficiency value, determining that the priority of the first antenna is higher than the priority of the second antenna.
In one possible example, the first detection parameter is a first reference signal strength value of the first antenna, the second detection parameter is a second reference signal strength value of the second antenna, and in the aspect of determining the priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, the priority of the first antenna is higher than that of the second antenna, the program 421 includes instructions for performing the following steps:
switching the DPDT switch to the first antenna to obtain a first reference signal strength value corresponding to the first antenna;
switching the DPDT switch to the second antenna to obtain a second reference signal strength value corresponding to the second antenna;
if the first reference signal strength value is greater than the second reference signal strength value, determining that the priority of the first antenna is higher than the priority of the second antenna.
In one possible example, the preset application is a game application, the first detection parameter is a first standing wave value of the first antenna, the second detection parameter is a second standing wave value of the second antenna, and in the aspect that the priority order between the first antenna and the second antenna is determined according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, the priority of the first antenna is higher than that of the second antenna, the program 421 includes instructions for performing the following steps:
acquiring a working frequency band of the electronic equipment in any one target communication system of the at least one target communication system;
acquiring a first standing wave value of the first antenna working in the working frequency band and a second standing wave value of the second antenna working in the working frequency band;
and if the first standing wave value is smaller than the second standing wave value, determining that the priority of the first antenna is higher than that of the second antenna.
In one possible example, the first detection parameter is a first proximity status of the first antenna, the second detection parameter is a second proximity status of the second antenna, the electronic device further includes a first proximity sensor corresponding to the first antenna, and a second proximity sensor corresponding to the second antenna, and in the aspect of determining the priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, the priority order of the first antenna is higher than the priority order of the second antenna, the program 421 includes instructions for:
and if the second proximity sensor detects that an object is close to the second antenna within a preset distance, determining that the priority of the first antenna is higher than that of the second antenna.
In one possible example, the at least one target communication system is the cellular communication system and the LPWAN communication system, and the at least one target signal strength includes a first target signal strength corresponding to the cellular communication system and a second target signal strength corresponding to the LPWAN communication system; the program 421 also includes instructions for performing the steps of:
if the first target signal strength is smaller than a first preset signal strength threshold corresponding to the cellular communication system and the second target signal strength is smaller than a second preset signal strength threshold corresponding to the LPWAN communication system, switching a first communication branch corresponding to the cellular communication system to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch other than the target communication system corresponding to the first communication branch.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an antenna switching apparatus provided in this embodiment, which is applied to an electronic device, where the electronic device includes a low power wide area network LPWAN communication module, a cellular communication module, a DPDT switch, a first antenna, and a second antenna, the LPWAN communication module and the cellular communication module are respectively connected to one end of the DPDT switch, the other end of the DPDT switch is respectively connected to the first antenna and the second antenna, the antenna switching apparatus includes a determining unit 501, an obtaining unit 502, and a switching unit 503, where,
the determining unit 501 is configured to use at least one of a cellular communication system and an LPWAN communication system as a target communication system to obtain at least one target communication system, where the cellular communication system corresponds to the cellular communication module, and the LPWAN communication system corresponds to the LPWAN communication module;
the obtaining unit 502 is configured to obtain a target signal strength corresponding to each target communication system in the at least one target communication system, so as to obtain at least one target signal strength;
the determining unit 501 is further configured to determine a priority order between the first antenna and the second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, so as to obtain a priority of the first antenna higher than a priority of the second antenna;
the switching unit 503 is configured to switch, by using the DPDT switch, a first communication branch corresponding to any target signal strength to the first antenna when any target signal strength of the at least one target signal strength is smaller than a corresponding preset signal strength threshold; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch corresponding to a communication system except for the target communication system corresponding to the first communication branch in the cellular communication system and the LPWAN communication system.
Optionally, in the aspect that at least one of the cellular communication system and the LPWAN communication system is used as a target communication system to obtain at least one target communication system, the determining unit 501 is specifically configured to:
determining a target application operated by the foreground of the electronic equipment;
if the target application belongs to a preset first application list, taking the cellular communication system as the target communication system;
and if the target application belongs to a preset second application list, taking the LPWAN communication system as the target communication system.
Optionally, in the aspect of obtaining the target signal strength corresponding to each target communication system in the at least one target communication system to obtain the at least one target signal strength, the obtaining unit 502 is specifically configured to:
and acquiring the target signal strength corresponding to the antenna currently connected with the communication module corresponding to each target communication system in the at least one target communication system to obtain at least one target signal strength.
Optionally, the first detection parameter is a first operating efficiency value of the first antenna, the second detection parameter is a second operating efficiency value of the second antenna, and in terms of determining a priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, and obtaining that the priority of the first antenna is higher than the priority of the second antenna, the determining unit 502 is specifically configured to:
acquiring a working frequency band of the electronic equipment in any one target communication system of the at least one target communication system;
acquiring a first working efficiency value of the first antenna working in the working frequency band and a second working efficiency value of the second antenna working in the working frequency band;
if the first operating efficiency value is greater than the second operating efficiency value, determining that the priority of the first antenna is higher than the priority of the second antenna.
Optionally, the first detection parameter is a first reference signal strength value of the first antenna, the second detection parameter is a second reference signal strength value of the second antenna, and in terms of determining a priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, and obtaining that the priority of the first antenna is higher than the priority of the second antenna, the determining unit 502 is specifically configured to:
switching the DPDT switch to the first antenna to obtain a first reference signal strength value corresponding to the first antenna;
switching the DPDT switch to the second antenna to obtain a second reference signal strength value corresponding to the second antenna;
if the first reference signal strength value is greater than the second reference signal strength value, determining that the priority of the first antenna is higher than the priority of the second antenna.
Optionally, the first detection parameter is a first standing wave value of the first antenna, the second detection parameter is a second standing wave value of the second antenna, and in terms of determining a priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, and obtaining a priority of the first antenna higher than a priority of the second antenna, the determining unit 502 is specifically configured to:
acquiring a working frequency band of the electronic equipment in any one target communication system of the at least one target communication system;
acquiring a first standing wave value of the first antenna working in the working frequency band and a second standing wave value of the second antenna working in the working frequency band;
and if the first standing wave value is smaller than the second standing wave value, determining that the priority of the first antenna is higher than that of the second antenna.
Optionally, the first detection parameter is a first proximity state of the first antenna, the second detection parameter is a second proximity state of the second antenna, the electronic device further includes a first proximity sensor corresponding to the first antenna, and a second proximity sensor corresponding to the second antenna, and in the aspect that the priority order between the first antenna and the second antenna is determined according to the first detection parameter of the first antenna and the second detection parameter of the second antenna, and the priority of the first antenna is higher than the priority of the second antenna, the determining unit 502 is specifically configured to:
and if the second proximity sensor detects that an object is close to the second antenna within a preset distance, determining that the priority of the first antenna is higher than that of the second antenna.
Optionally, the at least one target communication system is the cellular communication system and the LPWAN communication system, and the at least one target signal strength includes a first target signal strength corresponding to the cellular communication system and a second target signal strength corresponding to the LPWAN communication system; the switching unit 503 is further configured to:
if the first target signal strength is smaller than a first preset signal strength threshold corresponding to the cellular communication system and the second target signal strength is smaller than a second preset signal strength threshold corresponding to the LPWAN communication system, switching a first communication branch corresponding to the cellular communication system to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch other than the target communication system corresponding to the first communication branch.
It can be seen that the antenna switching apparatus described in this embodiment of the present application is applied to an electronic device, obtains at least one target communication system by using at least one of a cellular communication system and an LPWAN communication system as a target communication system, obtains at least one target signal strength corresponding to the at least one target communication system, determines a priority order between a first antenna and a second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, obtains a priority of the first antenna higher than that of the second antenna, switches a first communication branch corresponding to any target signal strength to the first antenna and switches a second communication branch to the second antenna if any target signal strength is smaller than a corresponding preset signal strength threshold, and thus, selects an antenna with a higher priority to perform antenna switching according to the target signal strength corresponding to the target communication system in the electronic device, and the communication performance of the target communication system is improved.
It can be understood that the functions of each program module of the antenna switching device in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
As shown in fig. 6, for convenience of description, only the portions related to the embodiments of the present application are shown, and details of the specific technology are not disclosed, please refer to the method portion of the embodiments of the present application. The electronic device may be any terminal device including a mobile phone, a tablet computer, a PDA (personal digital assistant), a POS (point of sales), a vehicle-mounted computer, etc., taking the electronic device as the mobile phone as an example:
fig. 6 is a block diagram illustrating a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application. Referring to fig. 6, the handset includes: a Radio Frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a Wireless Fidelity (Wi-Fi) module 970, a processor 980, a power supply 990, a camera 9100, an LPWAN communication module 9200, a cellular communication module 9300, a DPDT switch 9400, a first antenna 9500, and a second antenna 9600. Those skilled in the art will appreciate that the handset configuration shown in fig. 6 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 6:
The memory 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like. Further, the memory 920 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 930 may include a fingerprint recognition module 931 and other input devices 932. Fingerprint identification module 931, can gather the fingerprint data of user above it. The input unit 930 may include other input devices 932 in addition to the fingerprint recognition module 931. In particular, other input devices 932 may include, but are not limited to, one or more of a touch screen, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The Display unit 940 may include a Display screen 941, and optionally, the Display screen 941 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The handset may also include at least one sensor 950, such as a light sensor, motion sensor, pressure sensor, temperature sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor (also referred to as a light sensor) that can adjust the backlight brightness of the mobile phone according to the brightness of ambient light, and thus adjust the brightness of the display screen 941, and a proximity sensor that can turn off the display screen 941 and/or the backlight when the mobile phone is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of a mobile phone; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Wi-Fi belongs to short-distance wireless transmission technology, and a mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through a Wi-Fi module 970, and provides wireless broadband internet access for the user. Although fig. 6 shows the Wi-Fi module 970, it is understood that it does not belong to the essential constitution of the cellular phone and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 980 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. Alternatively, processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor AP, which mainly handles operating systems, user interfaces, applications, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 980.
The handset also includes a battery 990 to provide power to the various components, preferably, a power supply that may be logically connected to the processor 980 via a power management system to manage charging, discharging, and power consumption.
The mobile phone can further include a camera 9100, where the camera 9100 includes a front camera and a rear camera, and the front camera and the rear camera are used for shooting images and videos and transmitting the shot images and videos to the processor 980 for processing.
The mobile phone may further include a bluetooth module, etc., which will not be described herein.
In the embodiments shown in fig. 1B, fig. 2 and fig. 3, the method flows of the steps may be implemented based on the structure of the mobile phone.
Embodiments of the present application also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute some or all of the steps of any one of the methods described in the above embodiments of the antenna switching method, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform part or all of the steps of any of the antenna switching methods described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person 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.
Claims (10)
1. An antenna switching method is applied to an electronic device, the electronic device includes a Low Power Wide Area Network (LPWAN) communication module, a cellular communication module, a digital pre-distortion transmit (DPDT) switch, a first antenna and a second antenna, the LPWAN communication module and the cellular communication module are respectively connected with one end of the DPDT switch, and the other end of the DPDT switch is respectively connected with the first antenna and the second antenna, the method includes:
taking at least one of a cellular communication system and an LPWAN communication system as a target communication system to obtain at least one target communication system, wherein the cellular communication system corresponds to the cellular communication module, and the LPWAN communication system corresponds to the LPWAN communication module;
acquiring target signal intensity corresponding to each target communication system in the at least one target communication system to obtain at least one target signal intensity;
determining a priority order between the first antenna and the second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, and obtaining that the priority of the first antenna is higher than that of the second antenna;
if any target signal strength in the at least one target signal strength is smaller than a corresponding preset signal strength threshold value, switching a first communication branch corresponding to the any target signal strength to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch corresponding to a communication system except for the target communication system corresponding to the first communication branch in the cellular communication system and the LPWAN communication system.
2. The method of claim 1, wherein the obtaining at least one target communication standard by using at least one of a cellular communication standard and an LPWAN communication standard as the target communication standard comprises:
determining a target application operated by the foreground of the electronic equipment;
if the target application belongs to a preset first application list, taking the cellular communication system as the target communication system;
and if the target application belongs to a preset second application list, taking the LPWAN communication system as the target communication system.
3. The method according to claim 1 or 2, wherein the obtaining a target signal strength corresponding to each target communication system in the at least one target communication system to obtain at least one target signal strength comprises:
and acquiring the target signal strength corresponding to the antenna currently connected with the communication module corresponding to each target communication system in the at least one target communication system to obtain at least one target signal strength.
4. The method of claim 1 or 2, wherein the first detection parameter is a first operational efficiency value of the first antenna, the second detection parameter is a second operational efficiency value of the second antenna, and the determining the priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna results in the priority of the first antenna being higher than the priority of the second antenna, comprising:
acquiring a working frequency band of the electronic equipment in any one target communication system of the at least one target communication system;
acquiring a first working efficiency value of the first antenna working in the working frequency band and a second working efficiency value of the second antenna working in the working frequency band;
if the first operating efficiency value is greater than the second operating efficiency value, determining that the priority of the first antenna is higher than the priority of the second antenna.
5. The method according to claim 1 or 2, wherein the first detection parameter is a first standing wave value of the first antenna, the second detection parameter is a second standing wave value of the second antenna, and the determining the priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna results in the priority of the first antenna being higher than that of the second antenna, comprises:
acquiring a working frequency band of the electronic equipment in any one target communication system of the at least one target communication system;
acquiring a first standing wave value of the first antenna working in the working frequency band and a second standing wave value of the second antenna working in the working frequency band;
and if the first standing wave value is smaller than the second standing wave value, determining that the priority of the first antenna is higher than that of the second antenna.
6. The method according to claim 1 or 2, wherein the first detection parameter is a first proximity status of the first antenna, the second detection parameter is a second proximity status of the second antenna, the electronic device further comprises a first proximity sensor corresponding to the first antenna, and a second proximity sensor corresponding to the second antenna, and the determining the priority order between the first antenna and the second antenna according to the first detection parameter of the first antenna and the second detection parameter of the second antenna to obtain the priority of the first antenna higher than the priority of the second antenna comprises:
and if the second proximity sensor detects that an object is close to the second antenna within a preset distance, determining that the priority of the first antenna is higher than that of the second antenna.
7. The method according to claim 6, wherein the at least one target communication standard is the cellular communication standard and the LPWAN communication standard, and the at least one target signal strength comprises a first target signal strength corresponding to the cellular communication standard and a second target signal strength corresponding to the LPWAN communication standard; the method further comprises the following steps:
if the first target signal strength is smaller than a first preset signal strength threshold corresponding to the cellular communication system and the second target signal strength is smaller than a second preset signal strength threshold corresponding to the LPWAN communication system, switching a first communication branch corresponding to the cellular communication system to the first antenna through the DPDT switch; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch other than the target communication system corresponding to the first communication branch.
8. An antenna switching apparatus, applied to an electronic device, the electronic device including a Low Power Wide Area Network (LPWAN) communication module, a cellular communication module, a digital pre-distortion transmit (DPDT) switch, a first antenna and a second antenna, wherein the LPWAN communication module and the cellular communication module are respectively connected to one end of the DPDT switch, and the other end of the DPDT switch is respectively connected to the first antenna and the second antenna, the antenna switching apparatus comprising:
the device comprises a determining unit, a determining unit and a judging unit, wherein the determining unit is used for taking at least one of a cellular communication system and an LPWAN communication system as a target communication system to obtain at least one target communication system, the cellular communication system corresponds to the cellular communication module, and the LPWAN communication system corresponds to the LPWAN communication module;
the acquisition unit is used for acquiring the target signal strength corresponding to each target communication system in the at least one target communication system to obtain at least one target signal strength;
the determining unit is further configured to determine a priority order between the first antenna and the second antenna according to a first detection parameter of the first antenna and a second detection parameter of the second antenna, so as to obtain a priority of the first antenna higher than a priority of the second antenna;
a switching unit, configured to switch, by using the DPDT switch, a first communication branch corresponding to any one of the target signal strengths to the first antenna when any one of the target signal strengths is smaller than a corresponding preset signal strength threshold; and switching a second communication branch to the second antenna through the DPDT switch, wherein the second communication branch is a communication branch corresponding to a communication system except for the target communication system corresponding to the first communication branch in the cellular communication system and the LPWAN communication system.
9. An electronic device, comprising: the system comprises an LPWAN communication module, a cellular communication module, a DPDT switch, a first antenna, a second antenna, a processor, a memory and a communication interface; and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for the method of any of claims 1-7.
10. A computer-readable storage medium for storing a computer program, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910556972.1A CN110266359B (en) | 2019-06-25 | 2019-06-25 | Antenna switching method and device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910556972.1A CN110266359B (en) | 2019-06-25 | 2019-06-25 | Antenna switching method and device, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110266359A CN110266359A (en) | 2019-09-20 |
CN110266359B true CN110266359B (en) | 2021-05-18 |
Family
ID=67921447
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910556972.1A Active CN110266359B (en) | 2019-06-25 | 2019-06-25 | Antenna switching method and device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110266359B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113992233B (en) * | 2021-10-28 | 2023-02-03 | 维沃移动通信有限公司 | Antenna switching device and method and electronic equipment |
CN115097377B (en) * | 2022-06-16 | 2024-05-24 | Oppo广东移动通信有限公司 | Angle measurement method and related device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105680891A (en) * | 2016-01-14 | 2016-06-15 | 深圳市唯传科技有限公司 | Car-mounted terminal, remote controller, communication system and networking method based on LoRa technology |
CN108173752A (en) * | 2017-12-22 | 2018-06-15 | 成都博高信息技术股份有限公司 | LORAWAN gateways and its control method |
CN109376587A (en) * | 2018-09-05 | 2019-02-22 | 福州日兆信息科技有限公司 | Communication iron tower intelligent inspection system and method are surveyed in detection based on Internet of Things |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10123214B2 (en) * | 2016-12-14 | 2018-11-06 | Dell Products, Lp | Method and apparatus for optimizing multi-protocol radio technology using local QOS advertising |
CN107529211B (en) * | 2017-07-03 | 2023-05-23 | 全球能源互联网研究院 | Wireless communication system and method |
CN109302190A (en) * | 2017-07-24 | 2019-02-01 | 深圳市中兴微电子技术有限公司 | NBIOT front end of emission optimization system and method based on DPD |
CN108494816A (en) * | 2018-02-06 | 2018-09-04 | 伦图科技(广州)有限公司 | Data transmission method, system, equipment based on LPWAN and readable storage medium storing program for executing |
CN108494414B (en) * | 2018-05-10 | 2020-08-04 | 武汉中电物联科技有限公司 | Ultra-low power consumption multimode wireless module of internet of things |
CN208209983U (en) * | 2018-05-22 | 2018-12-07 | 中国石油集团东方地球物理勘探有限责任公司 | Gateway |
CN208498288U (en) * | 2018-07-17 | 2019-02-15 | 泸州能源投资有限公司 | A kind of charging pile cellular smart Internet of Things net unit based on NB-IOT |
-
2019
- 2019-06-25 CN CN201910556972.1A patent/CN110266359B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105680891A (en) * | 2016-01-14 | 2016-06-15 | 深圳市唯传科技有限公司 | Car-mounted terminal, remote controller, communication system and networking method based on LoRa technology |
CN108173752A (en) * | 2017-12-22 | 2018-06-15 | 成都博高信息技术股份有限公司 | LORAWAN gateways and its control method |
CN109376587A (en) * | 2018-09-05 | 2019-02-22 | 福州日兆信息科技有限公司 | Communication iron tower intelligent inspection system and method are surveyed in detection based on Internet of Things |
Also Published As
Publication number | Publication date |
---|---|
CN110266359A (en) | 2019-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110311704B (en) | Antenna switching method and related product | |
CN107708168B (en) | SIM card switching method, mobile terminal and computer readable storage medium | |
CN110247692B (en) | Channel switching method, channel switching device, electronic device and readable storage medium | |
CN110224719B (en) | Communication control method and related product | |
CN107896119B (en) | Antenna sharing circuit and mobile terminal | |
CN110021256B (en) | Display brightness adjusting method and related product | |
CN107947825B (en) | Antenna selection circuit and mobile terminal | |
CN110430592B (en) | Network control method and related product | |
CN107480489B (en) | unlocking control method and related product | |
CN109922504B (en) | Data distribution method and related product | |
CN110209245B (en) | Face recognition method and related product | |
CN107071147B (en) | Parameter adjusting method and device | |
CN106413070B (en) | A kind of power regulating method, mobile terminal and computer readable storage medium | |
CN108966296B (en) | Signal prompting method, mobile terminal and computer readable storage medium | |
CN110428782B (en) | Brightness adjusting method and related product | |
CN109922539B (en) | Network connection method and related product | |
CN106330211B (en) | LTE Frequency Band Selection method and apparatus | |
CN108122528A (en) | Display control method and related product | |
CN110212965B (en) | Antenna switching method and related product | |
CN110266359B (en) | Antenna switching method and device, electronic equipment and computer readable storage medium | |
CN106453909B (en) | A kind of power regulating method and mobile terminal | |
CN106550484B (en) | Direct call communication method and terminal | |
CN112135321B (en) | Channel switching method and related product | |
CN108877733B (en) | Color temperature adjusting method and related device | |
CN106815078B (en) | Memory control method and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |