CN107734614B - Wi-Fi antenna control method, mobile terminal and computer readable storage medium - Google Patents
Wi-Fi antenna control method, mobile terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN107734614B CN107734614B CN201710989762.2A CN201710989762A CN107734614B CN 107734614 B CN107734614 B CN 107734614B CN 201710989762 A CN201710989762 A CN 201710989762A CN 107734614 B CN107734614 B CN 107734614B
- Authority
- CN
- China
- Prior art keywords
- distance sensor
- mobile terminal
- antenna
- shielded
- wifi antenna
- 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
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0225—Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
- H04W52/0245—Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal according to 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/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
- H04B7/0814—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 based on current reception conditions, e.g. switching to different antenna when signal level is below threshold
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0261—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
- H04W52/0274—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/12—Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Human Computer Interaction (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a WiFi antenna control method, a mobile terminal and a computer readable storage medium, wherein for the mobile terminal comprising at least two WiFi antennas, when the holding action of the mobile terminal is detected, whether a preset distance sensor is blocked by the holding action is judged, when the preset distance sensor is blocked by the holding action, WiFi signal receiving values of the two WiFi antennas are detected, then a WiFi signal receiving difference value of the WiFi signal receiving values of the two WiFi antennas is calculated, whether the WiFi signal receiving difference value is larger than or equal to a preset threshold value is judged, finally when the WiFi signal receiving difference value is larger than or equal to the preset threshold value, the WiFi antenna to be closed is determined from the two WiFi antennas, the determined WiFi antenna to be closed is closed, and the power consumption of the mobile terminal can be reduced on the premise of ensuring the WiFi signals.
Description
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a Wi-Fi antenna control method, a mobile terminal and a computer readable storage medium.
Background
With the improvement of the living standard of modern people, mobile terminals such as smart phones and PAD (PAD) become necessities in life, and an important function of the mobile terminals is to realize network access through Wi-Fi (Wireless Fidelity) and internet communication. However, the mobile terminal is easy to have network delay, pause, even disconnection, network disconnection and the like under the condition that Wi-Fi signals are weak, and the use experience of a user is seriously influenced. The reasons for weakening the Wi-Fi signals comprise artificial reasons and non-artificial reasons, wherein the artificial reasons are mainly that when a user uses the mobile terminal, the user holds the Wi-Fi antenna, so that the transmitting and receiving performances of the Wi-Fi antenna are reduced, and the Wi-Fi signals are weakened.
At present, in order to solve the problem that Wi-Fi signals are weakened due to the fact that a user holds a Wi-Fi antenna, the prior art can use another Wi-Fi antenna which is not held when a single Wi-Fi antenna is held by using a dual Wi-Fi antenna technology, so that the occurrence and receiving performance of a terminal are enhanced. After the Wi-Fi antenna is held, the mobile terminal can continue to use the two Wi-Fi antennas to monitor Wi-Fi, when the two Wi-Fi antennas are opened, extra power consumption can be added to the mobile terminal, the cruising ability of the mobile terminal is weakened, and therefore the problem to be solved urgently at present is how to reduce the power consumption of the mobile terminal while giving consideration to Wi-Fi signals.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a Wi-Fi antenna control method, a mobile terminal and a computer readable storage medium, and aims to solve the technical problem of reducing the power consumption of the mobile terminal while giving consideration to Wi-Fi signals.
In order to achieve the above object, the present invention provides a Wi-Fi antenna control method, which is applied to a mobile terminal, wherein the mobile terminal includes a first Wi-Fi antenna and a second Wi-Fi antenna, and the Wi-Fi antenna control method includes the following steps:
when the holding action of the mobile terminal is detected, judging whether a preset distance sensor is shielded by the holding action;
when the preset distance sensor is blocked by the holding action, detecting a first Wi-Fi signal receiving value of the first Wi-Fi antenna, and detecting a second Wi-Fi signal receiving value of the second Wi-Fi antenna;
calculating a Wi-Fi signal receiving difference value of the first Wi-Fi signal receiving value and the second Wi-Fi signal receiving value, and judging whether the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value;
and when the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value, determining to-be-closed Wi-Fi antennas according to the positions of the shielded preset distance sensors, and closing the to-be-closed Wi-Fi antennas.
Optionally, the step of determining whether the preset distance sensor is blocked by the holding motion includes:
determining the holding position of the holding action on the mobile terminal, and judging whether the holding position contains the position of a preset distance sensor;
if the holding position comprises the position of the preset distance sensor, judging that the preset distance sensor is shielded by the holding action;
and if the holding position does not contain the position of the preset distance sensor, judging that the preset distance sensor is not shielded by the holding action.
Optionally, the step of determining to-be-closed Wi-Fi antennas according to the position of the blocked preset distance sensor, and closing the to-be-closed Wi-Fi antennas includes:
judging whether the position of the shielded preset distance sensor is the position of the first Wi-Fi antenna or the position of the second Wi-Fi antenna;
if the position of the shielded preset distance sensor is the position of a first Wi-Fi antenna, the Wi-Fi antenna to be closed is the first Wi-Fi antenna, and the first Wi-Fi antenna is closed;
and if the position of the shielded preset distance sensor is the position of a second Wi-Fi antenna, the Wi-Fi antenna to be closed is the second Wi-Fi antenna, and the second Wi-Fi antenna is closed.
Optionally, the step of determining whether the preset distance sensor is blocked by the holding motion further includes:
when the holding action of the mobile terminal is detected, judging whether the mobile terminal is in a horizontal screen state;
if the mobile terminal is in a horizontal screen state, judging whether a first preset distance sensor is shielded by the holding action;
and if the mobile terminal is not in the transverse screen state, judging whether a second preset distance sensor is shielded by the holding action.
Optionally, before the step of determining to-be-closed Wi-Fi antennas according to the positions of the blocked preset distance sensors and closing the to-be-closed Wi-Fi antennas, the Wi-Fi antenna control method further includes:
when the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value, recording the duration of the Wi-Fi signal receiving difference value larger than or equal to the preset threshold value;
and when the duration is longer than or equal to the preset duration, determining the Wi-Fi antenna to be closed according to the position of the shielded preset distance sensor, and closing the Wi-Fi antenna to be closed.
Optionally, after the step of determining whether the preset distance sensor is blocked by the holding motion, the Wi-Fi antenna control method further includes:
when the preset distance sensor is shielded by the holding action, determining the holding mode of the mobile terminal according to the holding position of the holding action on the mobile terminal;
and when the holding mode is a preset holding mode, executing the steps of detecting a first Wi-Fi signal receiving value of the first Wi-Fi antenna and detecting a second Wi-Fi signal receiving value of the second Wi-Fi antenna.
Optionally, after the step of determining to-be-closed Wi-Fi antennas according to the position of the blocked preset distance sensor, and closing the to-be-closed Wi-Fi antennas, the Wi-Fi antenna control method further includes:
when the current state of the shielded preset distance sensor is detected to be the non-shielded state, recording the duration of the non-shielded state;
and when the duration of the non-shielding state is greater than or equal to the preset duration, the closed Wi-Fi antenna is turned on again.
Optionally, when the duration of the non-shielding state is greater than or equal to a preset duration, acquiring the current remaining available electric quantity of the mobile terminal;
and judging whether the current remaining available electric quantity exceeds a preset electric quantity threshold value, and executing the step of turning on the closed Wi-Fi antenna again when the current remaining available electric quantity exceeds the preset electric quantity threshold value.
In addition, to achieve the above object, the present invention also provides a mobile terminal, including: a memory, a processor, and a Wi-Fi antenna control program stored on the memory and executable on the processor, the Wi-Fi antenna control program when executed by the processor implementing the steps of the Wi-Fi antenna control method as described above.
The present invention also provides a computer-readable storage medium having stored thereon a Wi-Fi antenna control program which, when executed by a processor, implements the steps of the Wi-Fi antenna control method as recited above.
The invention provides a Wi-Fi antenna control method, a mobile terminal and a computer readable storage medium, for the mobile terminal comprising two Wi-Fi antennas, when the holding action of the mobile terminal is detected, whether a preset distance sensor is blocked by the holding action is judged, when the preset distance sensor is blocked by the holding action, Wi-Fi signal receiving values of the two Wi-Fi antennas are detected, then a Wi-Fi signal receiving difference value of the Wi-Fi signal receiving values of the two Wi-Fi antennas is calculated, whether the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value is judged, finally when the Wi-Fi signal receiving difference value is larger than or equal to the preset Fi threshold value, the Wi-Fi antenna to be closed is determined from the two Wi-Fi antennas, and the determined Wi-Fi antenna to be closed is closed, according to the scheme, when the holding action is detected, the Wi-Fi antenna held by the holding action is closed, the Wi-Fi antenna not held by the holding action is reserved, and the power consumption of the mobile terminal can be reduced on the premise that Wi-Fi signals are guaranteed.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
FIG. 2 is a flowchart illustrating a Wi-Fi antenna control method according to a first embodiment of the present invention;
FIG. 3 is a schematic layout diagram of a Wi-Fi antenna according to a first embodiment of the Wi-Fi antenna control method of the present invention;
FIG. 4 is a schematic diagram of a holding operation in the first embodiment of the Wi-Fi antenna control method of the invention;
FIG. 5 is another diagram illustrating a holding operation of the Wi-Fi antenna control method according to the first embodiment of the present invention;
fig. 6 is a flowchart illustrating a Wi-Fi antenna control method according to a fifth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, Wi-Fi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which 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 terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
Wi-Fi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to receive and send emails, browse webpages, access streaming media and the like through a Wi-Fi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the Wi-Fi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the Wi-Fi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the Wi-Fi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the 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 of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, 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.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 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 processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, 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 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
Based on the above mobile terminal hardware structure, various embodiments of the mobile terminal of the present invention are provided.
Referring to fig. 1, in a first embodiment of the mobile terminal of the present invention, the mobile terminal includes: a memory, a processor, a first Wi-Fi antenna, and a second Wi-Fi antenna, the mobile terminal further comprising a Wi-Fi antenna control program stored on the memory and executable on the processor, the Wi-Fi antenna control program when executed by the processor implementing the steps of:
when the holding action of the mobile terminal is detected, judging whether a preset distance sensor is shielded by the holding action;
when the preset distance sensor is blocked by the holding action, detecting a first Wi-Fi signal receiving value of the first Wi-Fi antenna, and detecting a second Wi-Fi signal receiving value of the second Wi-Fi antenna;
calculating a Wi-Fi signal receiving difference value of the first Wi-Fi signal receiving value and the second Wi-Fi signal receiving value, and judging whether the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value;
and when the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value, determining to-be-closed Wi-Fi antennas according to the positions of the shielded preset distance sensors, and closing the to-be-closed Wi-Fi antennas.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
determining the holding position of the holding action on the mobile terminal, and judging whether the holding position contains the position of a preset distance sensor;
if the holding position comprises the position of the preset distance sensor, judging that the preset distance sensor is shielded by the holding action;
and if the holding position does not contain the position of the preset distance sensor, judging that the preset distance sensor is not shielded by the holding action.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
judging whether the position of the shielded preset distance sensor is the position of the first Wi-Fi antenna or the position of the second Wi-Fi antenna;
if the position of the shielded preset distance sensor is the position of a first Wi-Fi antenna, the Wi-Fi antenna to be closed is the first Wi-Fi antenna, and the first Wi-Fi antenna is closed;
and if the position of the shielded preset distance sensor is the position of a second Wi-Fi antenna, the Wi-Fi antenna to be closed is the second Wi-Fi antenna, and the second Wi-Fi antenna is closed.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the holding action of the mobile terminal is detected, judging whether the mobile terminal is in a horizontal screen state;
if the mobile terminal is in a horizontal screen state, judging whether a first preset distance sensor is shielded by the holding action;
and if the mobile terminal is not in the transverse screen state, judging whether a second preset distance sensor is shielded by the holding action.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value, recording the duration of the Wi-Fi signal receiving difference value larger than or equal to the preset threshold value;
and when the duration is longer than or equal to the preset duration, determining the Wi-Fi antenna to be closed according to the position of the shielded preset distance sensor, and closing the Wi-Fi antenna to be closed.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the preset distance sensor is shielded by the holding action, determining the holding mode of the mobile terminal according to the holding position of the holding action on the mobile terminal;
and when the holding mode is a preset holding mode, executing the steps of detecting a first Wi-Fi signal receiving value of the first Wi-Fi antenna and detecting a second Wi-Fi signal receiving value of the second Wi-Fi antenna.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the current state of the shielded preset distance sensor is detected to be the non-shielded state, recording the duration of the non-shielded state;
and when the duration of the non-shielding state is greater than or equal to the preset duration, the closed Wi-Fi antenna is turned on again.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the duration of the non-shielding state is longer than or equal to a preset duration, acquiring the current remaining available electric quantity of the mobile terminal;
and judging whether the current remaining available electric quantity exceeds a preset electric quantity threshold value, and executing the step of turning on the closed Wi-Fi antenna again when the current remaining available electric quantity exceeds the preset electric quantity threshold value.
The specific embodiment of the mobile terminal of the present invention is substantially the same as the specific embodiments of the Wi-Fi antenna control method described below, and will not be described herein again.
Further, the present invention also provides a Wi-Fi antenna control method, which is applied to the mobile terminal shown in fig. 1, and referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of the Wi-Fi antenna control method according to the present invention.
Step S101, when the holding action of the mobile terminal is detected, judging whether a preset distance sensor is shielded by the holding action;
the Wi-Fi antenna control method is applied to the mobile terminal shown in the figure 1, the mobile terminal comprises a smart phone, a tablet computer and the like, the mobile terminal comprises a Wi-Fi antenna and a distance sensor, the Wi-Fi antenna at least comprises a first Wi-Fi antenna and a second Wi-Fi antenna, the distance sensor comprises a first distance sensor and a second distance sensor, the first Wi-Fi antenna is adjacent to the first distance sensor, the second Wi-Fi antenna is adjacent to the second distance sensor, and the first Wi-Fi antenna and the second Wi-Fi antenna are connected with the same Wi-Fi hotspot at the same time. It should be noted that the Wi-Fi antennas of the mobile terminal include at least 2. Fig. 3 is a schematic layout diagram of Wi-Fi antennas in the embodiment of the present invention, and as shown in fig. 3, the first Wi-Fi antenna and the first distance sensor are adjacently disposed in an upper area of the mobile terminal, and the second Wi-Fi antenna and the second distance sensor are adjacently disposed in a right area of the mobile terminal.
The side of the mobile terminal is also provided with a plurality of pressure sensors, whether the holding action of a user exists on the side of the mobile terminal can be detected through the plurality of pressure sensors, and the holding action comprises at least one of a left holding action, a right holding action, an upper holding action, a lower holding action and the like. When the mobile terminal is in a bright screen state, when the holding action is detected through a plurality of pressure sensors, whether a preset distance sensor is shielded by the holding action or not is judged, namely whether a first distance sensor is shielded by the holding action or not is judged, and whether a second distance sensor is shielded by the holding action or not is judged.
Optionally, in this embodiment, the step of determining whether the preset distance sensor is blocked by the holding motion includes:
determining the holding position of the holding action on the mobile terminal, and judging whether the holding position contains the position of a preset distance sensor;
if the holding position comprises the position of the preset distance sensor, judging that the preset distance sensor is shielded by the holding action;
and if the holding position does not contain the position of the preset distance sensor, judging that the preset distance sensor is not shielded by the holding action.
When the mobile terminal detects a holding action, determining a holding position of the holding action on the mobile terminal, and judging whether the holding position comprises the position of a preset distance sensor, namely judging whether the holding position comprises the position of a first distance sensor, and judging whether the holding position comprises the position of a second distance sensor, if the holding position comprises the position of the preset distance sensor, judging that the preset distance sensor is shielded by the holding action, namely the holding position comprises the position of the first distance sensor, judging that the first distance sensor is shielded by the holding action, or judging that the second distance sensor is shielded by the holding action if the holding position comprises the position of the second distance sensor, and if the holding position does not comprise the position of the preset distance sensor, if the preset distance sensor is judged not to be shielded by the holding action, namely the holding position does not contain the position of the first distance sensor, the first distance sensor is judged not to be shielded by the holding action, or if the holding position does not contain the position of the second distance sensor, the second distance sensor is judged not to be shielded by the holding action. Fig. 4 is a schematic diagram of a holding operation according to an embodiment of the present invention, as shown in fig. 4, when the mobile terminal is held by a right hand of a user, that is, a right holding operation, at this time, the second distance sensor and the second Wi-Fi antenna are simultaneously held by the holding operation. Fig. 5 is another schematic view of a holding operation according to an embodiment of the present invention, as shown in fig. 5, the mobile terminal is held by two hands of a user, i.e., an upper side holding and a lower side holding, at this time, the first Wi-Fi antenna and the first distance sensor are held by the holding operation.
Step S102, when the preset distance sensor is blocked by the holding action, detecting a first Wi-Fi signal receiving value of the first Wi-Fi antenna, and detecting a second Wi-Fi signal receiving value of the second Wi-Fi antenna;
the mobile terminal detects a first Wi-Fi signal receiving value of the first Wi-Fi antenna and a second Wi-Fi signal receiving value of the second Wi-Fi antenna by judging whether a preset distance sensor is shielded by the holding action, namely the first distance sensor is shielded by the holding action, or the second distance sensor is shielded by the holding action, wherein the Wi-Fi signal receiving values comprise receiving sensitivity, signal intensity, transmission rate, packet loss rate and the like of Wi-Fi signals. The size of the Wi-Fi signal receiving value of the Wi-Fi antenna represents the receiving and transmitting performance of the Wi-Fi antenna, namely the strength of the Wi-Fi signal.
Step S103, calculating a Wi-Fi signal receiving difference value of the first Wi-Fi signal receiving value and the second Wi-Fi signal receiving value, and judging whether the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value;
after detecting a first Wi-Fi signal receiving value of a first Wi-Fi antenna and a second Wi-Fi signal receiving value of a second Wi-Fi antenna, the mobile terminal calculates a Wi-Fi signal receiving difference value between the first Wi-Fi signal receiving value and the second Wi-Fi signal receiving value, and judges whether the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value or not, if the Wi-Fi signal receiving difference value is larger than or equal to the preset threshold value, it indicates that the receiving and transmitting performance of one Wi-Fi antenna is weakened due to the fact that one Wi-Fi antenna is held by a holding motion, namely, Wi-Fi signals are weakened, and if the Wi-Fi signal receiving difference value is smaller than the preset threshold value. It should be noted that the preset threshold may be set by a person skilled in the art based on actual situations, and the embodiment does not specifically limit this.
And S104, when the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value, determining a Wi-Fi antenna to be closed according to the position of the shielded preset distance sensor, and closing the Wi-Fi antenna to be closed.
When the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value, the mobile terminal determines a Wi-Fi antenna to be closed according to the position of the shielded preset distance sensor, and closes the Wi-Fi antenna to be closed.
Optionally, in this embodiment, the step of determining, according to the position of the blocked preset distance sensor, a Wi-Fi antenna to be turned off, and turning off the Wi-Fi antenna to be turned off includes:
judging whether the position of the shielded preset distance sensor is the position of the first Wi-Fi antenna or the position of the second Wi-Fi antenna;
if the position of the shielded preset distance sensor is the position of a first Wi-Fi antenna, the Wi-Fi antenna to be closed is the first Wi-Fi antenna, and the first Wi-Fi antenna is closed;
and if the position of the shielded preset distance sensor is the position of a second Wi-Fi antenna, the Wi-Fi antenna to be closed is the second Wi-Fi antenna, and the second Wi-Fi antenna is closed.
The mobile terminal acquires the position of the shielded preset distance sensor when the Wi-Fi signal receiving difference value is greater than or equal to a preset threshold value, then judges whether the position of the shielded preset distance sensor is the position of the first Wi-Fi antenna or the position of the second Wi-Fi antenna, if the position of the shielded preset distance sensor is the position of the first distance sensor, the position of the shielded preset distance sensor is the position of the first Wi-Fi antenna, if the position of the shielded preset distance sensor is the position of the second distance sensor, the position of the shielded preset distance sensor is the position of the second Wi-Fi antenna, and if the position of the shielded preset distance sensor is the position of the first Wi-Fi antenna, and if the position of the blocked preset distance sensor is the position of the second Wi-Fi antenna, the Wi-Fi antenna to be closed is the second Wi-Fi antenna, and the second Wi-Fi antenna is closed. In specific implementation, after the Wi-Fi antenna to be closed is closed, the mobile terminal detects whether the preset distance sensor is changed from being shielded to not being shielded, and if the preset distance sensor is detected to be changed from being shielded to not being shielded, the closed Wi-Fi antenna is turned on again.
In this embodiment, when a holding motion of the mobile terminal is detected, whether a preset distance sensor is blocked by the holding motion is determined, when the preset distance sensor is blocked by the holding motion, Wi-Fi signal receiving values of two Wi-Fi antennas are detected, then a Wi-Fi signal receiving difference value of the Wi-Fi signal receiving values of the two Wi-Fi antennas is calculated, whether the Wi-Fi signal receiving difference value is greater than or equal to a preset threshold value is determined, and finally, when the Wi-Fi signal receiving difference value is greater than or equal to the preset threshold value, a Wi-Fi antenna to be turned off is determined from the two Wi-Fi antennas, and the determined Wi-Fi antenna to be turned off is turned off, the Wi-Fi antenna held by the holding motion is turned off when the holding motion is detected, and the Wi-Fi antenna not held by the holding motion is retained, the power consumption of the mobile terminal can be reduced on the premise of ensuring the Wi-Fi signals.
Further, a second embodiment of the Wi-Fi antenna control method according to the present invention is proposed based on the first embodiment, and is different from the foregoing embodiments in that the step of determining whether the preset distance sensor is blocked by the holding motion further includes:
when the holding action of the mobile terminal is detected, judging whether the mobile terminal is in a horizontal screen state;
if the mobile terminal is in a horizontal screen state, judging whether a first preset distance sensor is shielded by the holding action;
and if the mobile terminal is not in the transverse screen state, judging whether a second preset distance sensor is shielded by the holding action.
When the mobile terminal detects a holding action through a plurality of pressure sensors, whether the mobile terminal is in a transverse screen state or not is judged through the gravity sensor, if the mobile terminal is in the transverse screen state, whether a first preset distance sensor is shielded by the holding action or not is judged, and if the mobile terminal is not in the transverse screen state, whether a second preset distance sensor is shielded by the holding action or not is judged.
In this embodiment, the method and the device for judging whether the corresponding distance sensor is shielded or not are judged according to the transverse screen state and the non-transverse screen state of the mobile terminal, and shielding judgment on all the distance sensors is not needed, so that the judgment times are reduced, and the efficiency is improved.
Further, a third embodiment of the Wi-Fi antenna control method of the present invention is proposed based on the foregoing first or second embodiment, and is different from the foregoing embodiments in that, before the step S104, the Wi-Fi antenna control method further includes:
when the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value, recording the duration of the Wi-Fi signal receiving difference value larger than or equal to the preset threshold value;
and when the duration is longer than or equal to the preset duration, executing step S104, namely determining the Wi-Fi antenna to be closed according to the position of the shielded preset distance sensor, and closing the Wi-Fi antenna to be closed.
It should be noted that the present invention provides a specific way to accurately control a Wi-Fi antenna based on the foregoing embodiments, and only this is described below, and other references may be made to the foregoing embodiments.
When the Wi-Fi signal receiving difference value is larger than or equal to the preset threshold value, the mobile terminal records the duration of the Wi-Fi signal receiving difference value larger than or equal to the preset threshold value, judges whether the duration exceeds or is equal to the preset duration, determines to close the Wi-Fi antenna according to the position of the shielded preset distance sensor when the duration is larger than or equal to the preset duration, and closes the Wi-Fi antenna to be closed.
In this embodiment, when the Wi-Fi signal reception difference is greater than or equal to the preset threshold, the present invention further determines whether the duration of the Wi-Fi signal reception difference being greater than or equal to the preset threshold is greater than or equal to the preset duration, so as to further improve the control accuracy of the Wi-Fi antenna.
Further, based on the foregoing first, second or third embodiment, a fourth embodiment of the Wi-Fi antenna control method of the present invention is proposed, which is different from the foregoing embodiment in that after the step of S101, the Wi-Fi antenna control method further includes:
when the preset distance sensor is shielded by the holding action, determining the holding mode of the mobile terminal according to the holding position of the holding action on the mobile terminal;
and when the holding mode is a preset holding mode, executing the steps of detecting a first Wi-Fi signal receiving value of the first Wi-Fi antenna and detecting a second Wi-Fi signal receiving value of the second Wi-Fi antenna.
The present invention proposes a method for preventing erroneous touch of a holding operation based on the above-described embodiment, and only this will be described below, and the other embodiments can be referred to.
When the mobile terminal is shielded by the holding action in a preset distance sensor, determining a holding mode of the mobile terminal according to the holding position of the holding action on the mobile terminal, and judging whether the holding mode is a preset holding mode, when the holding mode is the preset holding mode, detecting a first Wi-Fi signal receiving value of the first Wi-Fi antenna, and detecting a second Wi-Fi signal receiving value of the second Wi-Fi antenna, wherein the holding mode comprises a front horizontal holding mode, a back horizontal holding mode, a side holding mode, a vertical holding mode and the like, and the preset holding mode comprises a front horizontal holding mode and a vertical holding mode. It should be noted that the preset holding mode may be set by a person skilled in the art based on actual situations, and this embodiment is not particularly limited thereto.
In the embodiment, the Wi-Fi antenna can be prevented from being closed due to the wrong holding action of the user by presetting the holding mode, and the control accuracy of the Wi-Fi antenna is improved.
Further, referring to fig. 6, a fifth embodiment of the Wi-Fi antenna control method according to the present invention is proposed based on the first, second, third, or fourth embodiments, and is different from the foregoing embodiments in that after step S104, the Wi-Fi antenna control method further includes:
step S105, when the current state of the shielded preset distance sensor is detected to be the non-shielding state, recording the duration of the non-shielding state;
and S106, when the duration of the unoccluded state is greater than or equal to the preset duration, re-opening the closed Wi-Fi antenna.
It should be noted that the present invention provides an automatic restart method for turning off a Wi-Fi antenna based on the foregoing embodiments, which will be described below only, and other embodiments can be referred to.
The mobile terminal detects whether the current state of the shielded preset distance sensor is in a non-shielding state or not after the Wi-Fi antenna to be closed is closed, records the duration of the non-shielding state when the current state of the shielded preset distance sensor is in the non-shielding state, then judges whether the duration of the non-shielding state is greater than or equal to the preset duration or not, and restarts the closed Wi-Fi antenna if the duration of the non-shielding state is greater than or equal to the preset duration.
In this embodiment, after the Wi-Fi antenna to be turned off is turned off, whether the current state of the shielded preset distance sensor is in the non-shielded state is detected, and then the turned-off Wi-Fi antenna can be turned on again when the current state of the shielded preset distance sensor is detected to be in the non-shielded state and the duration of the non-shielded state is greater than or equal to the preset duration, so that the turned-off Wi-Fi antenna is turned on automatically.
Optionally, in this embodiment, before the step of turning on the turned-off Wi-Fi antenna again, the step of turning on the turned-off Wi-Fi antenna further includes:
when the duration of the non-shielding state is longer than or equal to a preset duration, acquiring the current remaining available electric quantity of the mobile terminal;
and judging whether the current remaining available electric quantity exceeds a preset electric quantity threshold value, and executing the step of turning on the closed Wi-Fi antenna again when the current remaining available electric quantity exceeds the preset electric quantity threshold value.
When the duration of the non-shielding state of the mobile terminal is longer than or equal to the preset duration, obtaining the current remaining available electric quantity of the mobile terminal, judging whether the current remaining available electric quantity exceeds a preset electric quantity threshold value, restarting the closed Wi-Fi antenna if the current remaining available electric quantity exceeds the preset electric quantity threshold value, and not restarting the closed Wi-Fi antenna if the current remaining available electric quantity is lower than the preset electric quantity threshold value. In specific implementation, when the current remaining available electric quantity is lower than a preset electric quantity threshold value, the first distance sensor is shielded, and the second distance sensor is not shielded, the first Wi-Fi antenna is closed; when the current remaining available electric quantity is lower than a preset electric quantity threshold value, the second distance sensor is shielded, and the first distance sensor is not shielded, the second Wi-Fi antenna is closed, namely only one Wi-Fi antenna is allowed to be opened under the condition that the electric quantity of the mobile terminal is insufficient, when the opened Wi-Fi antenna is held, the held Wi-Fi antenna is closed, the non-held Wi-Fi antenna is opened, and the switching of the Wi-Fi antenna is realized.
In this embodiment, the method and the device can automatically restart the closed Wi-Fi antenna by detecting whether the current remaining available power of the mobile terminal exceeds the preset power threshold, and reduce the power consumption of the mobile terminal by using one Wi-Fi antenna when the power of the mobile terminal is sufficient.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a Wi-Fi antenna control program is stored on the computer-readable storage medium, and when executed by a processor, the Wi-Fi antenna control program implements the following steps:
when the holding action of the mobile terminal is detected, judging whether a preset distance sensor is shielded by the holding action;
when the preset distance sensor is blocked by the holding action, detecting a first Wi-Fi signal receiving value of the first Wi-Fi antenna, and detecting a second Wi-Fi signal receiving value of the second Wi-Fi antenna;
calculating a Wi-Fi signal receiving difference value of the first Wi-Fi signal receiving value and the second Wi-Fi signal receiving value, and judging whether the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value;
and when the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value, determining to-be-closed Wi-Fi antennas according to the positions of the shielded preset distance sensors, and closing the to-be-closed Wi-Fi antennas.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
determining the holding position of the holding action on the mobile terminal, and judging whether the holding position contains the position of a preset distance sensor;
if the holding position comprises the position of the preset distance sensor, judging that the preset distance sensor is shielded by the holding action;
and if the holding position does not contain the position of the preset distance sensor, judging that the preset distance sensor is not shielded by the holding action.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
judging whether the position of the shielded preset distance sensor is the position of the first Wi-Fi antenna or the position of the second Wi-Fi antenna;
if the position of the shielded preset distance sensor is the position of a first Wi-Fi antenna, the Wi-Fi antenna to be closed is the first Wi-Fi antenna, and the first Wi-Fi antenna is closed;
and if the position of the shielded preset distance sensor is the position of a second Wi-Fi antenna, the Wi-Fi antenna to be closed is the second Wi-Fi antenna, and the second Wi-Fi antenna is closed.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the holding action of the mobile terminal is detected, judging whether the mobile terminal is in a horizontal screen state;
if the mobile terminal is in a horizontal screen state, judging whether a first preset distance sensor is shielded by the holding action;
and if the mobile terminal is not in the transverse screen state, judging whether a second preset distance sensor is shielded by the holding action.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the Wi-Fi signal receiving difference value is larger than or equal to a preset threshold value, recording the duration of the Wi-Fi signal receiving difference value larger than or equal to the preset threshold value;
and when the duration is longer than or equal to the preset duration, determining the Wi-Fi antenna to be closed according to the position of the shielded preset distance sensor, and closing the Wi-Fi antenna to be closed.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the preset distance sensor is shielded by the holding action, determining the holding mode of the mobile terminal according to the holding position of the holding action on the mobile terminal;
and when the holding mode is a preset holding mode, executing the steps of detecting a first Wi-Fi signal receiving value of the first Wi-Fi antenna and detecting a second Wi-Fi signal receiving value of the second Wi-Fi antenna.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the current state of the shielded preset distance sensor is detected to be the non-shielded state, recording the duration of the non-shielded state;
and when the duration of the non-shielding state is greater than or equal to the preset duration, the closed Wi-Fi antenna is turned on again.
Further, the Wi-Fi antenna control program when executed by the processor further implements the steps of:
when the duration of the non-shielding state is longer than or equal to a preset duration, acquiring the current remaining available electric quantity of the mobile terminal;
and judging whether the current remaining available electric quantity exceeds a preset electric quantity threshold value, and executing the step of turning on the closed Wi-Fi antenna again when the current remaining available electric quantity exceeds the preset electric quantity threshold value.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the specific embodiments of the Wi-Fi antenna control method described above, and details thereof are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (7)
1. A WiFi antenna control method is applied to a mobile terminal, and is characterized in that the mobile terminal comprises a first WiFi antenna and a second WiFi antenna, and the method comprises the following steps:
when the holding action of the mobile terminal is detected, judging whether a preset distance sensor is shielded by the holding action;
when the preset sensor is shielded by the holding action, detecting a first WiFi signal receiving value of the first WiFi antenna, and detecting a second WiFi signal receiving value of the second WiFi antenna;
calculating a WiFi signal receiving difference value of the first WiFi signal receiving value and the second WiFi signal receiving value, and judging whether the WiFi signal receiving difference value is larger than or equal to a preset threshold value or not;
when the WiFi signal receiving difference value is larger than or equal to a preset threshold value, determining a WiFi antenna to be closed according to the position of the shielded preset distance sensor, and closing the WiFi antenna to be closed;
when the current state of the shielded preset distance sensor is detected to be the non-shielded state, recording the duration of the non-shielded state;
when the duration of the non-shielding state is longer than or equal to a preset duration, acquiring the current remaining available electric quantity of the mobile terminal;
judging whether the current remaining available electric quantity exceeds a preset electric quantity threshold value, and restarting the closed WiFi antenna when the current remaining available electric quantity exceeds the preset electric quantity threshold value;
when the holding action of the mobile terminal is detected, judging whether the mobile terminal is in a horizontal screen state;
if the mobile terminal is in a horizontal screen state, judging whether a first preset distance sensor is shielded by the holding action;
and if the mobile terminal is not in the transverse screen state, judging whether a second preset distance sensor is shielded by the holding action.
2. The WiFi antenna control method of claim 1, wherein the step of determining whether the preset distance sensor is blocked by the holding action includes:
determining the holding position of the holding action on the mobile terminal, and judging whether the holding position contains the position of a preset distance sensor;
if the holding position comprises the position of the preset distance sensor, judging that the preset distance sensor is shielded by the holding action;
and if the holding position does not contain the position of the preset distance sensor, judging that the preset distance sensor is not shielded by the holding action.
3. The WiFi antenna control method of claim 1, wherein the determining the WiFi antenna to be turned off according to the location of the shielded preset distance sensor, and the turning off the WiFi antenna to be turned off includes:
judging whether the position of the shielded preset distance sensor is the position of the first WiFi antenna or the position of the second WiFi antenna;
if the position of the shielded preset distance sensor is the position of the first WiFi antenna, the WiFi antenna to be closed is the first WiFi antenna, and the first WiFi antenna is closed;
and if the position of the shielded preset distance sensor is the position of the second WiFi antenna, the WiFi antenna to be closed is the second WiFi antenna, and the second WiFi antenna is closed.
4. The WiFi antenna control method of claim 1, wherein before the step of determining the WiFi antenna to be turned off according to the location of the blocked preset distance sensor, and turning off the WiFi antenna to be turned off, the WiFi antenna control method further comprises:
when the WiFi signal receiving difference value is larger than or equal to a preset threshold value, recording the duration of the WiFi signal receiving difference value larger than or equal to the preset threshold value;
and when the duration is longer than or equal to the preset duration, determining the WiFi antenna to be closed according to the position of the shielded preset distance sensor, and closing the WiFi antenna to be closed.
5. The WiFi antenna control method of claim 1, wherein after the step of determining whether the preset distance sensor is blocked by the holding action, the WiFi antenna control method further comprises:
when the preset distance sensor is shielded by the holding action, determining the holding mode of the mobile terminal according to the holding position of the holding action on the mobile terminal;
and when the holding mode is a preset holding mode, executing the steps of detecting a first WiFi signal receiving value of the first WiFi antenna and detecting a second WiFi signal receiving value of the second WiFi antenna.
6. A mobile terminal, characterized in that the mobile terminal comprises: memory, a processor and a WiFi antenna control program stored on the memory and executable on the processor, the WiFi antenna control program when executed by the processor implementing the steps of the WiFi antenna control method of any of claims 1 to 5.
7. A computer-readable storage medium, having a WiFi antenna control program stored thereon, which when executed by a processor implements the steps of the WiFi antenna control method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710989762.2A CN107734614B (en) | 2017-10-19 | 2017-10-19 | Wi-Fi antenna control method, mobile terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710989762.2A CN107734614B (en) | 2017-10-19 | 2017-10-19 | Wi-Fi antenna control method, mobile terminal and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107734614A CN107734614A (en) | 2018-02-23 |
CN107734614B true CN107734614B (en) | 2021-05-21 |
Family
ID=61212370
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710989762.2A Active CN107734614B (en) | 2017-10-19 | 2017-10-19 | Wi-Fi antenna control method, mobile terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107734614B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108417988B (en) * | 2018-03-13 | 2021-02-19 | Oppo广东移动通信有限公司 | Antenna switching method, antenna assembly, electronic device and storage medium |
CN108736950A (en) * | 2018-05-29 | 2018-11-02 | Oppo(重庆)智能科技有限公司 | Method, mobile terminal and the computer readable storage medium of antenna switching |
CN108810261B (en) * | 2018-05-29 | 2021-03-02 | Oppo广东移动通信有限公司 | Antenna switching method in call and related product |
CN108897417B (en) * | 2018-06-29 | 2021-06-15 | 努比亚技术有限公司 | Working mode adjusting method, mobile terminal and computer readable storage medium |
CN109547084B (en) * | 2019-01-03 | 2023-12-22 | 上海龙旗科技股份有限公司 | Method, device and storage medium for determining target antenna |
CN109548124B (en) * | 2019-01-11 | 2021-11-12 | 普联技术有限公司 | Wireless router power control method, device, storage medium and wireless router |
CN110475333B (en) * | 2019-08-19 | 2021-07-16 | Oppo广东移动通信有限公司 | Method for disconnecting WIFI network and related equipment |
US11916639B2 (en) | 2020-03-12 | 2024-02-27 | Telefonaktiebolaget Lm Ericsson (Publ) | Antenna apparatus and method in an antenna apparatus for selectively combining antenna outputs |
CN112118337A (en) * | 2020-09-25 | 2020-12-22 | Oppo(重庆)智能科技有限公司 | Antenna control method and electronic equipment |
TWI774298B (en) | 2021-03-30 | 2022-08-11 | 華碩電腦股份有限公司 | Electronic device |
CN116073869A (en) * | 2021-10-29 | 2023-05-05 | 华为终端有限公司 | Antenna selection method, terminal and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102684718A (en) * | 2011-03-18 | 2012-09-19 | 和硕联合科技股份有限公司 | Electronic device and antenna switching method |
CN103108414A (en) * | 2013-01-07 | 2013-05-15 | 华为终端有限公司 | Mobile terminal and signal processing method of mobile terminal |
CN103391109A (en) * | 2013-07-30 | 2013-11-13 | 华为终端有限公司 | Terminal equipment and improving method of wireless performance of terminal equipment |
CN104752831A (en) * | 2013-12-31 | 2015-07-01 | 深圳富泰宏精密工业有限公司 | Wireless communication device and antenna switching system |
CN106159444A (en) * | 2015-03-31 | 2016-11-23 | 联想(北京)有限公司 | Antenna module, mobile terminal and control method thereof |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9312933B2 (en) * | 2013-02-22 | 2016-04-12 | Qualcomm Incorporated | Apparatus and method for dynamically altering a downlink MIMO configuration |
CN205992594U (en) * | 2016-09-12 | 2017-03-01 | 广东欧珀移动通信有限公司 | Antenna structure and mobile terminal |
CN106911848B (en) * | 2017-02-21 | 2020-03-31 | Oppo广东移动通信有限公司 | Method for outputting prompt message and terminal equipment |
CN106877914A (en) * | 2017-03-03 | 2017-06-20 | 深圳天珑无线科技有限公司 | Antenna switching system based on power and signal intensity detection |
-
2017
- 2017-10-19 CN CN201710989762.2A patent/CN107734614B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102684718A (en) * | 2011-03-18 | 2012-09-19 | 和硕联合科技股份有限公司 | Electronic device and antenna switching method |
CN103108414A (en) * | 2013-01-07 | 2013-05-15 | 华为终端有限公司 | Mobile terminal and signal processing method of mobile terminal |
CN103391109A (en) * | 2013-07-30 | 2013-11-13 | 华为终端有限公司 | Terminal equipment and improving method of wireless performance of terminal equipment |
CN104752831A (en) * | 2013-12-31 | 2015-07-01 | 深圳富泰宏精密工业有限公司 | Wireless communication device and antenna switching system |
CN106159444A (en) * | 2015-03-31 | 2016-11-23 | 联想(北京)有限公司 | Antenna module, mobile terminal and control method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN107734614A (en) | 2018-02-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107734614B (en) | Wi-Fi antenna control method, mobile terminal and computer readable storage medium | |
CN109067418B (en) | Antenna control method and mobile terminal | |
CN107196363B (en) | Method for adjusting charging current, terminal and computer readable storage medium | |
US20170315777A1 (en) | Method, terminal, and storage medium for starting voice input function of terminal | |
CN108135033B (en) | Bluetooth connection method and mobile terminal | |
CN109195213B (en) | Mobile terminal screen control method, mobile terminal and computer readable storage medium | |
US12082062B2 (en) | Handover method and terminal | |
CN109799924B (en) | False touch prevention control method and device, mobile terminal and computer readable storage medium | |
CN109819506B (en) | Intelligent connection method, wearable device and computer readable storage medium | |
CN112261535A (en) | Major-minor switching method and device for wireless earphone and readable storage medium | |
CN109195191B (en) | Cell reselection control method and terminal | |
CN108388400B (en) | Operation processing method and mobile terminal | |
CN109126127B (en) | Game control method, dual-screen mobile terminal and computer-readable storage medium | |
CN111124098A (en) | Intelligent power saving method and device for terminal and readable storage medium | |
CN108512616B (en) | Signal intensity display method, mobile terminal and computer readable storage medium | |
CN108307075B (en) | Incoming call processing method and mobile terminal | |
CN107424393B (en) | Mobile terminal searching method, mobile terminal and storage medium | |
CN109947617B (en) | Method, terminal and readable storage medium for monitoring display content of application interface | |
CN110083205B (en) | Page switching method, wearable device and computer-readable storage medium | |
CN108874111B (en) | Battery over-discharge protection control method and mobile terminal | |
CN112437476A (en) | Network switching control method and device, intelligent terminal and readable storage medium | |
CN109151201B (en) | Anti-addiction method, mobile terminal and computer storage medium | |
CN108170360B (en) | Control method of gesture function and mobile terminal | |
CN107562305B (en) | Method for setting dynamic icon, terminal and computer readable storage medium | |
CN111443764A (en) | Separation state processing method and electronic 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 |