CN112491562B - Communication control method and device and mobile terminal - Google Patents
Communication control method and device and mobile terminal Download PDFInfo
- Publication number
- CN112491562B CN112491562B CN202011293285.4A CN202011293285A CN112491562B CN 112491562 B CN112491562 B CN 112491562B CN 202011293285 A CN202011293285 A CN 202011293285A CN 112491562 B CN112491562 B CN 112491562B
- Authority
- CN
- China
- Prior art keywords
- communication
- mobile terminal
- rate
- state
- switch
- 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
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/10—Current supply arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0894—Packet rate
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Telephone Function (AREA)
Abstract
The application provides a communication control method, a device and a mobile terminal, wherein the communication control method is used for communication between the mobile terminal and OTG equipment, and the method comprises the following steps: and when the communication rate is judged to be greater than the preset rate threshold, controlling a switch to be in an off state so as to stop the mobile terminal from supplying power to the OTG equipment, wherein the switch is respectively connected with the mobile terminal and the OTG equipment. When the method is used for high-speed communication between the mobile terminal and the OTG equipment, whether the switch needs to be disconnected or not is controlled by judging the communication rate so as to determine whether the mobile terminal needs to stop supplying power to the OTG equipment or not, so that the influence of voltage and current fluctuation in the charging process on the communication process is eliminated, and the stability of the high-speed communication process can be ensured.
Description
Technical Field
The present invention relates to the field of mobile terminals, and in particular, to a communication control method and apparatus, and a mobile terminal.
Background
With the development of technology, mobile terminals such as smart phones, tablet computers or other portable products have become centers for personal information, and the mobile terminals are becoming more and more powerful in function, and OTG functions have become a basic requirement. OTG is an english abbreviation for On The Go, a technology developed and widely used in recent years. The OTG function refers to directly connecting the mobile terminal to external devices such as a usb disk, a card reader, and a camera for data exchange without a computer as a relay.
At present, after the OTG device is connected to the mobile terminal, the mobile terminal will automatically supply power to the OTG device. When the mobile terminal performs a key operation with the OTG device, for example, data exchange, there may be a large amount of data on the data line connecting the two, and thus it is necessary to maintain the stability of the current and voltage on the data line. However, in the process that the mobile terminal supplies power to the OTG device, a certain voltage drop exists in the data line due to the internal resistance of the material of the data line. Accordingly, the current on the data line also fluctuates. The voltage and current fluctuation generated in the charging process may interfere with the stability of data transmission between the mobile terminal and the OTG device, i.e. affect the stability of the communication process between the mobile terminal and the OTG device.
In view of this, how to solve the problem that current and voltage fluctuation in the charging process between the existing mobile terminal and the OTG device affects the stability of the communication process becomes an important issue for related technicians and researchers.
Disclosure of Invention
The embodiment of the application provides a communication control method, a device and a mobile terminal, which are used for solving the problem that current and voltage fluctuation influence the stability of a communication process in a charging process between the mobile terminal and OTG equipment.
According to a first aspect of the present application, an embodiment of the present application provides a communication control method for communication between a mobile terminal and an OTG device, the communication control method including: and acquiring the communication rate between the mobile terminal and the OTG equipment, and judging whether the communication rate is greater than a preset rate threshold. When the communication rate is judged to be greater than the preset rate threshold, a switch is controlled to be in an off state so as to stop the mobile terminal from supplying power to the OTG equipment. Wherein the switch is respectively connected with the mobile terminal and the OTG equipment. When the mobile terminal and the OTG equipment are in high-speed communication, the power supply of the mobile terminal to the OTG equipment is stopped by controlling the switch to be in an off state, so that the influence of voltage and current fluctuation in charging on a communication process is eliminated, and the stability of the high-speed communication process can be ensured.
Optionally, the switch includes a control terminal, and the control terminal is connected with a pin of a baseband chip of the mobile terminal. The on and off states of the switch are determined according to the potential state of the control terminal.
Optionally, in the step of when the communication rate is determined to be greater than the preset rate threshold, the method further includes: the potential state of the switch control end is obtained, and the potential state is stored as a first state.
Optionally, after the step of controlling a switch to be in an off state, a communication rate between the mobile terminal and the OTG device is obtained at intervals, and whether the communication rate is greater than a preset rate threshold is determined. And when the communication rate is judged to be smaller than or equal to a preset rate threshold, acquiring the first state, and setting a control end of the switch to be the first state.
Optionally, when the communication rate is determined to be less than or equal to a preset rate threshold, acquiring electric quantity of the OTG device, and determining whether the electric quantity of the OTG device is greater than a preset electric quantity threshold. And when the electric quantity of the OTG equipment is judged to be larger than the preset electric quantity threshold, controlling the switch to be in an off state.
According to a second aspect of the present application, an embodiment of the present application provides a communication control apparatus for communication between a mobile terminal and an OTG device. The communication control device includes: the first speed acquisition module is used for acquiring the communication speed between the mobile terminal and the OTG equipment; the first rate judging module is used for judging whether the communication rate is greater than a preset rate threshold; the first switch control module is used for controlling a switch to be in an off state when judging that the communication rate is greater than the preset rate threshold so as to stop the mobile terminal from supplying power to the OTG equipment; wherein the switch is respectively connected with the mobile terminal and the OTG equipment.
Optionally, the first potential obtaining module is configured to obtain a potential state of the control end; and the state storage module is used for storing the potential state as a first state.
Optionally, the second rate obtaining module is configured to obtain the communication rate at intervals after the switch is controlled to be in an off state; the second rate judging module is used for judging whether the communication rate is greater than the preset rate threshold; and the second potential acquisition module is used for acquiring the first state when the communication rate is judged to be smaller than or equal to the preset rate threshold.
Optionally, the potential setting module is configured to set the control terminal to the first state; the electric quantity acquisition module is used for acquiring the electric quantity of the OTG equipment when the communication rate is judged to be smaller than or equal to the preset rate threshold; the electric quantity judging module is used for judging whether the electric quantity of the OTG equipment is larger than a preset electric quantity threshold or not; and the second switch control module is used for controlling the switch to be in an off state when the electric quantity of the OTG equipment is judged to be larger than the preset electric quantity threshold.
According to a third aspect of the present application, an embodiment of the present application provides a mobile terminal, which includes a processor and a memory, where the processor is electrically connected to the memory, the memory is configured to store instructions and data, and the processor is configured to execute steps in the communication control method described above.
The embodiment of the application provides a communication control method, a device and a mobile terminal, wherein the communication control method is used for communication between the mobile terminal and OTG equipment. When the method is used for high-speed communication between the mobile terminal and the OTG equipment, whether the switch needs to be disconnected or not is controlled by judging the communication rate so as to determine whether the mobile terminal needs to stop supplying power to the OTG equipment or not, so that the influence of voltage and current fluctuation in the charging process on the communication process is eliminated, and the stability of the high-speed communication process can be ensured.
Drawings
Technical solutions and other advantageous effects of the present application will be made apparent from the following detailed description of specific embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a flow chart of a communication control method according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a communication control device according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Fig. 4 is a schematic diagram of a specific structure of a mobile terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that, the execution main body of the communication control method in the embodiment of the present application may be a mobile terminal device such as a smart phone, a tablet computer, and the like. Currently, many mobile terminals have OTG functions, and the adoption of OTG technology can enable devices to realize data exchange between the mobile terminal and the OTG device without a host.
Specifically, please refer to fig. 1 to 4, wherein: fig. 1 is a schematic flow chart of a communication control method provided in an embodiment of the present application; fig. 2 is a schematic structural diagram of a communication control device according to an embodiment of the present application; fig. 3 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application; fig. 4 is a schematic diagram of a specific structure of a mobile terminal according to an embodiment of the present application.
Referring first to fig. 1, as shown in the drawings, the communication control method provided in the embodiment of the present application may include the following steps:
in step S101, a communication rate between a mobile terminal (not shown in the figure) and an OTG device (not shown in the figure) is acquired. Specifically, a change in the amount of data per second in a communication buffer between the mobile terminal and the OTG device is detected, the change in the amount of data per second changing the communication rate between the mobile terminal and the OTG device.
In step S102, it is determined whether the communication rate is greater than a predetermined rate threshold. Specifically, the acquired communication rate is compared with a preset rate threshold and a judgment is made. When it is determined that the communication rate is greater than the preset rate threshold, step S103 is performed.
In step S103, a switch is controlled to be in an off state to stop the mobile terminal from supplying power to the OTG device. The switch is respectively connected with the mobile terminal and the OTG equipment. The switch comprises a control end which is connected to a pin of a baseband chip of the mobile terminal.
Specifically, the baseband chip is used to synthesize a baseband signal to be transmitted or decode a received baseband signal. The baseband chip is generally divided into five parts: CPU (Central Processing Unit) processor, channel encoder, digital signal processor, modem and interface module. The interface module may include a USB (Universal Serial Bus ) interface, among others.
The mobile terminal is connected with a USB plug at one end of the OTG data line through a USB interface of the mobile terminal, and the other end of the OTG data line is connected to OTG equipment. The mobile terminal USB interface and the OTG data line USB plug connected with the mobile terminal USB interface generally have 5 pins respectively: v for supplying power bus Pin, data for communication - (Data line negative electrode) pin, data + (number of)Data line positive) pin, a pin for supporting OTG function (i.e., ID pin), and a GND pin for ground.
In step S103, the control terminal of the switch may be connected to the ID pin of the USB interface of the mobile terminal. The on and off states of the switch can be determined by the potential state of the switch control terminal. For example, when the control terminal is in a low potential state, the switch is in an off state, and the mobile terminal prohibits power supply to the OTG device; when the control end is in a high potential state, the switch is in a communication state, and the mobile terminal supplies power to the OTG equipment.
After step S102, when it is determined that the communication rate is greater than the preset rate threshold, step S104 and step S105 may be performed simultaneously, that is, the potential state of the switch control terminal is obtained and stored as the first state. The two steps aim at storing a record of the potential state of the switch control terminal as a first state when it is determined that the communication rate is greater than a preset rate threshold.
In step S106, i.e. after the switch is turned off due to high-speed communication, the communication rate between the mobile terminal and the OTG device may be obtained at intervals, and then step S107 is performed, i.e. it is determined whether the communication rate is greater than a preset rate threshold. When the communication rate is judged to be greater than a preset rate threshold, maintaining the disconnection state of the switch; when it is determined that the communication rate is less than or equal to the preset rate threshold, step S108 is performed.
In step S108, the first state stored in step S105 is acquired, and the control terminal of the switch is set to the first state. The purpose of implementing step S108 is to: and after the high-speed communication between the mobile terminal and the OTG equipment is finished, the switch is restored to a state before the high-speed communication.
With continued reference to fig. 1, as shown in the drawing, the flow of the communication control method provided in the embodiment of the present application may further include the following steps:
in step S102, it is determined whether the communication rate is greater than a predetermined rate threshold. Specifically, the acquired communication rate is compared with a preset rate threshold and a judgment is made. When it is determined that the communication rate is equal to or less than the preset rate threshold, steps S110 to S112 are performed.
And after step S107, when it is determined that the communication rate is less than or equal to the preset rate threshold, performing steps S110 to S112.
In step S110, the power of the OTG device is acquired.
In step S111, it is determined whether the electric quantity of the OTG is less than a preset electric quantity threshold. When it is determined that the electric quantity of the OTG device is smaller than the preset electric quantity threshold, step S112 is executed, that is, the switch is controlled to be in a connected state, and at this time, the mobile terminal can start to supply power to the OTG device.
Specifically, the on or off state of the switch is not only related to the communication rate between the mobile terminal and the OTG device, but also controlled by the power of the OTG device itself. When the mobile terminal and the OTG equipment do not perform high-speed communication or the high-speed communication is finished, the connection and disconnection of the switch are determined by the electric quantity of the OTG equipment. For example, when the electric quantity of the OTG device is greater than or equal to a preset electric quantity threshold, the electric potential of the control end of the switch is a low electric potential, the switch is in an off state, and at this time, the mobile terminal does not supply power to the OTG device; when the electric quantity of the OTG equipment is smaller than a preset electric quantity threshold, the electric potential of the switch control end is high, the switch is in a communication state, and the mobile terminal can supply power to the OTG equipment.
As described above, in the embodiment of the present application, a switch is disposed between a mobile terminal and an OTG device, when high-speed communication is performed between the mobile terminal and the OTG device, and when it is determined that the communication rate is greater than the preset rate threshold, the switch is controlled to be in an off state to stop the mobile terminal from supplying power to the OTG device, thereby eliminating the influence of voltage and current fluctuation on the communication process during the charging process, and further ensuring the stability of the high-speed communication process. Meanwhile, when the mobile terminal and the OTG equipment do not perform high-speed communication or after the high-speed communication is finished, the electric quantity of the OTG equipment is acquired and judged, and when the electric quantity of the OTG equipment is judged to be smaller than a preset electric quantity threshold, the switch is switched to be in a communication state, so that the mobile terminal supplies power for the OTG equipment.
The embodiment of the application also provides a communication control device based on the communication control method, please refer to fig. 2, which is a schematic structural diagram of the communication control device provided in the embodiment of the application.
The communication control apparatus 200 may include: a first rate acquisition module 201, a first rate determination module 202, a first switch control module 203, a first potential acquisition module 204, and a state storage module 205.
The first rate obtaining module 201 obtains a communication rate between a mobile terminal (not shown in the figure) and an OTG device (not shown in the figure), the first rate judging module 202 judges whether the communication rate is greater than a preset rate threshold, and when judging that the communication rate is greater than the preset rate threshold, the first switch control module 203 controls a switch arranged between the mobile terminal and the OTG device to be in an off state so as to stop the mobile terminal from supplying power to the OTG device. Meanwhile, the first potential obtaining module 204 obtains the potential state of the control terminal of the switch before the switch is turned off, and the state storage module 205 stores the potential state as the first state.
Optionally, the communication control device 200 further includes: a second rate acquisition module 206, a second rate determination module 207, a second potential acquisition module 208, and a potential setting module 209.
After the switch is turned off due to high-speed communication between the mobile terminal and the OTG device, the second rate obtaining module 206 obtains the communication rate at intervals, and the second rate judging module 207 judges whether the communication rate is still greater than a preset rate threshold. When the communication rate is determined to be less than or equal to the preset rate threshold, the second potential obtaining module 208 obtains the first state, and sets the potential state of the switch control end to the first state through the potential setting module 209, that is, after the high-speed communication between the mobile terminal and the OTG device is finished, the switch is restored to the state before disconnection.
Optionally, the communication control device 200 further includes: a power acquisition module 210, a power determination module 211, and a second switch control module 212.
When the first rate determining module 202 determines that high-speed communication is not performed between the mobile terminal and the OTG device, or when the second rate determining module 207 determines that high-speed communication between the mobile terminal and the OTG device is finished, that is, the communication rate is less than or equal to the preset rate threshold, the power obtaining module 210 obtains the power of the OTG device, and the power determining module 211 determines whether the power of the OTG device is less than the preset power threshold. When the electric quantity of the OTG device is determined to be less than the preset electric quantity threshold, the second switch control module 212 controls the switch to be in a connected state, and at this time, the mobile terminal can start to supply power to the OTG device.
As described above, in the embodiment of the present application, a switch is disposed between the mobile terminal and the OTG device, when the first rate determining module 202 determines that the communication rate is greater than the preset rate threshold during high-speed communication between the mobile terminal and the OTG device, the first switch control module 203 controls the switch to be in an off state to stop the mobile terminal from supplying power to the OTG device, thereby eliminating the influence of voltage and current fluctuation in the charging process on the communication process, and further ensuring the stability of the high-speed communication process. Meanwhile, when the mobile terminal and the OTG device do not perform high-speed communication or after the high-speed communication has ended, the power acquisition module 210 acquires the power of the OTG device, and when the power judgment module 211 judges that the power of the OTG device is less than the preset power threshold, the switch is switched to the connected state, so as to realize that the mobile terminal supplies power to the OTG device.
The embodiment of the application further provides a mobile terminal 300, please refer to fig. 3, which is a schematic structural diagram of the mobile terminal 300 provided in the embodiment of the application.
As shown in the figure, the mobile terminal 300 includes a processor 301 and a memory 302, wherein the processor 301 is electrically connected to the memory 302.
The processor 301 is a control center of the mobile terminal 300, connects various parts of the entire mobile terminal 300 using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or loading application programs stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the mobile terminal 300.
In this embodiment, the mobile terminal 300 is provided with a plurality of storage partitions, where the plurality of storage partitions include a system partition and a target partition, the processor 301 in the mobile terminal 300 loads instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 executes the application programs stored in the memory 302, so as to implement various functions:
acquiring a communication rate between the mobile terminal 300 and the OTG device;
judging whether the communication rate is greater than a preset rate threshold; and
when the communication rate is determined to be greater than the preset rate threshold, controlling a switch to be in an off state so as to stop the mobile terminal 600 from supplying power to the OTG device; wherein the switch is respectively connected with the mobile terminal and the OTG equipment.
Referring to fig. 4, a specific structure diagram of a mobile terminal 400 according to an embodiment of the present application is provided, and the mobile terminal 400 may be used to implement the communication control method provided in the foregoing embodiment. The mobile terminal 400 may be a cell phone or tablet. The mobile terminal 400 includes the following components:
the RF circuit 410 is configured to receive and transmit electromagnetic waves, and to perform mutual conversion between the electromagnetic waves and the electrical signals, thereby communicating with a communication network or other devices. RF circuitry 410 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. The RF circuitry 410 may communicate with various networks such as the internet, intranets, wireless networks, or other devices via wireless networks. The wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. The wireless network may use various communication standards, protocols, and technologies including, but not limited to, global system for mobile communications (Global System for Mobile Communication, GSM), enhanced mobile communications technology (Enhanced Data GSM Environment, EDGE), wideband code division multiple access technology (Wideband Code Division Multiple Access, WCDMA), code division multiple access technology (Code Division Access, CDMA), time division multiple access technology (Time Division Multiple Access, TDMA), wireless fidelity technology (Wireless Fidelity, wi-Fi) (e.g., institute of electrical and electronics engineers standards IEEE 802.11a,IEEE 802.11b,IEEE802.11g and/or IEEE802.11 n), internet telephony (Voice over Internet Protocol, voIP), worldwide interoperability for microwave access (Worldwide Interoperability for Microwave Access, wi-Max), other protocols for mail, instant messaging, and short messaging, as well as any other suitable communication protocols, even including those not currently developed.
The memory 420 may be used to store software programs and modules, such as program instructions/modules corresponding to the communication control method in the above embodiments, and the processor 480 executes the software programs and modules stored in the memory 420 to perform various functional applications and data processing, i.e., to implement the functions of the communication control method. Memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 420 may further include memory located remotely from processor 480, which may be connected to mobile terminal 400 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 430 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 430 may include a touch-sensitive surface 431 and other input devices 432. The touch-sensitive surface 431, also referred to as a touch display screen or touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch-sensitive surface 431 or thereabout using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection device according to a predetermined program. Alternatively, the touch-sensitive surface 431 may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth 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 detection device and converts it into touch point coordinates, which are then sent to the processor 480, and can receive commands from the processor 480 and execute them. In addition, the touch-sensitive surface 431 may be implemented in various types of resistive, capacitive, infrared, surface acoustic wave, and the like. In addition to the touch-sensitive surface 431, the input unit 430 may also comprise other input devices 432. In particular, other input devices 432 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 440 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the mobile terminal 400, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 440 may include a display panel 441, and optionally, the display panel 441 may be configured in the form of an LCD (Liquid Crystal Display ), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 431 may overlay the display panel 441, and when the touch-sensitive surface 431 detects a touch operation thereon or thereabout, the touch-sensitive surface 431 is transferred to the processor 480 to determine the type of touch event, and the processor 480 then provides a corresponding visual output on the display panel 441 according to the type of touch event. Although in fig. 4 the touch-sensitive surface 431 and the display panel 441 are implemented as two separate components for input and output functions, in some embodiments the touch-sensitive surface 431 may be integrated with the display panel 441 for input and output functions.
The mobile terminal 400 may also include at least one sensor 450, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 441 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 441 and/or the backlight when the mobile terminal 400 moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the mobile terminal 400 are not described in detail herein.
The mobile terminal 400 may facilitate user email, web browsing, streaming media access, etc. via a transmission module 470 (e.g., wi-Fi module) that provides wireless broadband internet access to the user. Although fig. 4 shows the transmission module 470, it is understood that it does not belong to the essential constitution of the mobile terminal 400, and can be omitted entirely as required within the scope of not changing the essence of the invention.
The processor 480 is a control center of the mobile terminal 400, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the mobile terminal 400 and processes data by running or executing software programs and/or modules stored in the memory 420 and invoking data stored in the memory 420, thereby performing overall monitoring of the handset. Optionally, processor 480 may include one or more processing cores; in some embodiments, the processor 480 may integrate an application processor that primarily processes operating systems, user interfaces, applications, and the like, with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 480.
The mobile terminal 400 also includes a power supply 460 (e.g., a battery) for powering the various components, which in some embodiments may be logically connected to the processor 480 by a power management system to perform functions such as managing charging, discharging, and power consumption by the power management system. The power supply 460 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the mobile terminal 400 may further include a camera (e.g., front camera, rear camera), a bluetooth module, etc., which will not be described herein. In particular, in this embodiment, the display unit of the mobile terminal is a touch screen display, the mobile terminal further includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for:
acquiring a communication rate between the mobile terminal and the OTG equipment;
judging whether the communication rate is greater than a preset rate threshold; and
when the communication rate is judged to be greater than the preset rate threshold, a switch is controlled to be in an off state so as to stop the mobile terminal from supplying power to the OTG equipment; wherein the switch is connected to the mobile terminal 400 and the OTG device, respectively.
In the implementation, each module may be implemented as an independent entity, or may be combined arbitrarily, and implemented as the same entity or several entities, and the implementation of each module may be referred to the foregoing method embodiment, which is not described herein again.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions or by controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, the present embodiment provides a storage medium (not shown in the figures) in which a plurality of instructions are stored, which can be loaded by a processor to perform the steps in any of the communication control methods provided in the present embodiment.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps in any one of the communication control methods provided in the embodiments of the present application may be executed due to the instructions stored in the storage medium, so that the beneficial effects that any one of the communication control methods provided in the embodiments of the present application may be achieved, which are detailed in the previous embodiments and are not described herein. The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
According to the communication control method, the device and the mobile terminal, when high-speed communication is carried out between the mobile terminal and the OTG equipment, whether the switch needs to be disconnected is controlled by judging the communication rate, so that whether the mobile terminal is required to stop supplying power to the OTG equipment is determined, the influence of voltage and current fluctuation in the charging process on the communication process is eliminated, and the stability of the high-speed communication process can be guaranteed.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
The foregoing describes in detail a communication control method, a device and a mobile terminal provided by the embodiments of the present application, and specific examples are applied to describe the principles and implementations of the present application, where the description of the foregoing embodiments is only for helping to understand the technical solution and core ideas of the present application; those of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims (6)
1. A communication control method for communication between a mobile terminal and an OTG device, the method comprising:
acquiring a communication rate between the mobile terminal and the OTG equipment;
judging whether the communication rate is greater than a preset rate threshold; and
when the communication rate is judged to be larger than the preset rate threshold, acquiring the potential state of the control end; and
storing the potential state of the control terminal as a first state;
controlling a switch to be in an off state so as to stop the mobile terminal from supplying power to the OTG equipment; the switch is respectively connected with the mobile terminal and the OTG equipment, the switch comprises a control end, the control end is connected with an ID pin of a USB interface of the mobile terminal, and the on-off state of the switch is determined according to the potential state of the control end;
acquiring the communication rate at intervals;
judging whether the communication rate is greater than the preset rate threshold;
when the communication rate is judged to be smaller than or equal to the preset rate threshold, the first state is obtained; and
setting the control end to be in the first state.
2. The communication control method according to claim 1, characterized in that the method further comprises:
when the communication rate is judged to be smaller than or equal to the preset rate threshold, acquiring the electric quantity of the OTG equipment;
judging whether the electric quantity of the OTG equipment is smaller than a preset electric quantity threshold or not;
and when the electric quantity of the OTG equipment is judged to be smaller than the preset electric quantity threshold, controlling the switch to be in a communication state.
3. A communication control apparatus for communication between a mobile terminal and an OTG device, the apparatus comprising:
a first rate acquisition module, configured to acquire a communication rate between the mobile terminal and the OTG device;
the first rate judging module is used for judging whether the communication rate is greater than a preset rate threshold; and
when the communication rate is judged to be greater than the preset rate threshold, a first potential acquisition module is used for acquiring a potential state of a control end; and
the state storage module is used for storing the potential state of the control end as a first state;
the first switch control module is used for controlling a switch to be in an off state so as to stop the mobile terminal from supplying power to the OTG equipment; the switch is respectively connected with the mobile terminal and the OTG equipment, the switch comprises a control end, the control end is connected with an ID pin of a USB interface of the mobile terminal, and the on-off state of the switch is determined according to the potential state of the control end;
the second rate acquisition module is used for acquiring the communication rate at intervals after the switch is controlled to be in an off state;
the second rate judging module is used for judging whether the communication rate is greater than the preset rate threshold;
the second potential acquisition module is used for acquiring the first state when the communication rate is judged to be smaller than or equal to the preset rate threshold; and
and the potential setting module is used for setting the control end to be in the first state.
4. A communication control device according to claim 3, characterized in that the device further comprises:
the electric quantity acquisition module is used for acquiring the electric quantity of the OTG equipment when the communication rate is judged to be smaller than or equal to the preset rate threshold;
the electric quantity judging module is used for judging whether the electric quantity of the OTG equipment is smaller than a preset electric quantity threshold or not; and
and the second switch control module is used for controlling the switch to be in a communication state when the electric quantity of the OTG equipment is judged to be smaller than the preset electric quantity threshold.
5. A mobile terminal comprising a processor and a memory, the processor being electrically connected to the memory, the memory being for storing instructions and data, the processor being for performing the steps in the communication control method of any of claims 1-2.
6. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the communication control method of any one of claims 1 to 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011293285.4A CN112491562B (en) | 2020-11-18 | 2020-11-18 | Communication control method and device and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011293285.4A CN112491562B (en) | 2020-11-18 | 2020-11-18 | Communication control method and device and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112491562A CN112491562A (en) | 2021-03-12 |
CN112491562B true CN112491562B (en) | 2023-05-23 |
Family
ID=74931705
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011293285.4A Active CN112491562B (en) | 2020-11-18 | 2020-11-18 | Communication control method and device and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112491562B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017030387A1 (en) * | 2015-08-18 | 2017-02-23 | 엘지전자 주식회사 | Charging device, method for controlling charging device, and mobile terminal connected to same |
CN106877103A (en) * | 2017-01-03 | 2017-06-20 | 努比亚技术有限公司 | A kind of method and adapter for realizing circuit switching |
CN111880635A (en) * | 2020-07-24 | 2020-11-03 | 青岛海信移动通信技术股份有限公司 | Electronic equipment and power supply control method and power supply control system thereof |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102004057756B4 (en) * | 2004-11-30 | 2009-08-06 | Advanced Micro Devices Inc., Sunnyvale | USB control device with OTG control unit |
CN106325463B (en) * | 2016-08-16 | 2020-12-15 | Tcl移动通信科技(宁波)有限公司 | Power-saving control system and method for USB peripheral |
CN106786960B (en) * | 2017-01-13 | 2019-10-25 | Oppo广东移动通信有限公司 | Charge control method, device and terminal |
CN107153456A (en) * | 2017-06-20 | 2017-09-12 | 深圳市泰衡诺科技有限公司上海分公司 | OTG connections control method, OTG connection control devices and electronic equipment |
CN107565650A (en) * | 2017-09-30 | 2018-01-09 | 深圳传音通讯有限公司 | Design of Compatibility method and circuit |
CN108964789B (en) * | 2018-10-16 | 2019-12-31 | Oppo(重庆)智能科技有限公司 | Radio frequency interference processing method and device, storage medium and electronic equipment |
-
2020
- 2020-11-18 CN CN202011293285.4A patent/CN112491562B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017030387A1 (en) * | 2015-08-18 | 2017-02-23 | 엘지전자 주식회사 | Charging device, method for controlling charging device, and mobile terminal connected to same |
CN106877103A (en) * | 2017-01-03 | 2017-06-20 | 努比亚技术有限公司 | A kind of method and adapter for realizing circuit switching |
CN111880635A (en) * | 2020-07-24 | 2020-11-03 | 青岛海信移动通信技术股份有限公司 | Electronic equipment and power supply control method and power supply control system thereof |
Also Published As
Publication number | Publication date |
---|---|
CN112491562A (en) | 2021-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106786962B (en) | Charging control method and device and terminal | |
WO2020077510A1 (en) | Method for adjusting parameter of audio service and terminal | |
US11138041B2 (en) | Method for automatically releasing resource occupied by process in background of terminal, storage medium and terminal | |
CN109714476B (en) | Data processing method and device, mobile terminal and storage medium | |
CN111008090B (en) | Battery electric quantity control method and device, storage medium and terminal equipment | |
CN111432387B (en) | Many-to-many switching module, multi-machine wireless communication system and communication method thereof | |
CN111026457B (en) | Hardware configuration method and device, storage medium and terminal equipment | |
CN110489177B (en) | Application control method and device, storage medium and terminal equipment | |
CN111885591A (en) | Network connection method, device, storage medium and terminal | |
CN111404242A (en) | Charging method, charging device, storage medium and mobile terminal | |
CN112491562B (en) | Communication control method and device and mobile terminal | |
CN112261634B (en) | Bluetooth transmission control method and device, terminal equipment and storage medium | |
CN110995324B (en) | Bluetooth communication method, device, storage medium and terminal equipment | |
CN112486350B (en) | Detection method and device for touch screen of mobile terminal, storage medium and mobile terminal | |
CN112542867B (en) | Mobile terminal power supply control method and device, terminal equipment and storage medium | |
CN112286849A (en) | Wireless charging base data switching method and system, storage medium and terminal equipment | |
CN112367428A (en) | Electric quantity display method and system, storage medium and mobile terminal | |
CN111273774A (en) | Terminal device display screen control method and system, storage medium and terminal device | |
CN110913022A (en) | Method, device and system for downloading network file of mobile terminal and storage medium | |
CN112243269B (en) | Method and device for downloading data and mobile terminal | |
CN111338452B (en) | Method, system, storage medium and mobile terminal for simulating acceleration charging of U disk | |
CN109995441B (en) | Communication information processing method, device and storage medium | |
CN110891304B (en) | gPS power consumption control method for mobile terminal | |
CN112202464B (en) | Identification card detection method and device, storage medium and mobile terminal | |
CN111163509B (en) | Power saving display method and device, storage medium and mobile terminal |
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 |