CN112256610B - Connection control method, system, storage medium and mobile terminal - Google Patents

Connection control method, system, storage medium and mobile terminal Download PDF

Info

Publication number
CN112256610B
CN112256610B CN202011120339.7A CN202011120339A CN112256610B CN 112256610 B CN112256610 B CN 112256610B CN 202011120339 A CN202011120339 A CN 202011120339A CN 112256610 B CN112256610 B CN 112256610B
Authority
CN
China
Prior art keywords
mobile terminal
otg
current value
output current
connection control
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
Application number
CN202011120339.7A
Other languages
Chinese (zh)
Other versions
CN112256610A (en
Inventor
俞斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Communication Ningbo Ltd
Original Assignee
TCL Communication Ningbo Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by TCL Communication Ningbo Ltd filed Critical TCL Communication Ningbo Ltd
Priority to CN202011120339.7A priority Critical patent/CN112256610B/en
Publication of CN112256610A publication Critical patent/CN112256610A/en
Application granted granted Critical
Publication of CN112256610B publication Critical patent/CN112256610B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/266Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a connection control method, a system, a storage medium and a mobile terminal. This application carries out current detection to OTG slave unit through starting the OTG function, successively acquires the output current value of the mobile terminal power supply unit that the mobile terminal corresponds when OTG slave unit does not supply power and supplies power to set up mobile terminal's drive current and be the difference of twice output current value, thereby realize the developments and set up drive current, in order to avoid causing the electric quantity extravagant and the phenomenon that generates heat.

Description

Connection control method, system, storage medium and mobile terminal
Technical Field
The present application relates to the field of mobile communications technologies, and in particular, to a connection control method, system, storage medium, and mobile terminal.
Background
The On-The-go (OTG) technology developed in recent years is a Universal Serial Bus (Universal Serial Bus) in mobile terminalsUSB) interface, thereby making the mobile terminal can boost the battery voltage and then supply power to the connected equipment. For example, the USB flash disk is connected to the mobile terminal through the USB interface, and the mobile terminal supplies power to the USB flash disk, so that the content of the USB flash disk can be read and written; even the mobile hard disk can be connected to the mobile terminal through the USB interface, and the mobile terminal supplies power to the mobile hard disk, so that the content of the mobile hard disk can be read and written. When the mobile terminal serves as the OTG master device to provide connection for the OTG slave devices such as the usb disk and the mouse, the mobile terminal is the OTG master device, and needs to provide a power supply for driving the OTG slave devices to operate. In the prior art, when a mobile terminal is directly connected to an OTG slave device as an OTG master device, considering that the number of the OTG slave devices is large and the number of the OTG slave devices is large, the mobile terminal cannot identify which OTG slave device is, and then the mobile terminal directly sets a fixed driving current for the OTG slave device, where the driving current is generally 500 mA. In practical use, since the driving current is fixed, the device can be used when a general OTG device is connected, but a part of current may be wasted, for example, the driving current of some OTG slave device only needs 350mA, and the extra 150mA may be wasted, and even a heat generation problem may occur.
Therefore, it is desirable to provide a connection control method, system, storage medium and mobile terminal to solve the above problems.
Disclosure of Invention
The application provides a connection control method, a connection control system, a storage medium and a mobile terminal, and solves the problems that when the mobile terminal is used as an OTG master device to provide a power supply for driving an OTG slave device to work, the driving current cannot be correspondingly adjusted according to different slave devices, so that electric quantity is wasted and the device generates heat.
According to a first aspect of the present application, there is provided a connection control method applied to a mobile terminal, the method including: when detecting that the OTG slave equipment is connected, starting an OTG function; stopping providing drive current to the OTG slave; acquiring a first output current value of a power supply unit of the mobile terminal; turning on a drive current to the OTG slave; acquiring a second output current value of a power supply unit of the mobile terminal; and setting the value of the driving current as the difference value of the second output current value and the first output current value.
Further, in the step of stopping supplying the driving current to the OTG slave device, the method includes: stopping providing drive current to the OTG slave; and delaying a first preset time.
Further, in the step of obtaining the first output current value of the power supply unit of the mobile terminal, the method includes: acquiring voltage values at two ends of a test resistor, wherein the test resistor is arranged at the output end of the power supply unit; and calculating a first output current value, IBAT1=(U1-U2) R, wherein IBAT1Representing a first output current value, U1And U2Represents the voltage value at two ends of the resistor and U1Greater than U2And R represents the resistance of the resistor.
Further, in the step of turning on the supply of the driving current to the OTG slave device, the method further includes: turning on a drive current to the OTG slave; and delaying for a second preset time.
Further, in the step of obtaining a second output current value of a power supply unit of the mobile terminal, the method includes: acquiring voltage values at two ends of a test resistor, wherein the test resistor is arranged at the output end of the power supply unit; and calculating a second output current value, IBAT2=(U1-U2) R, wherein IBAT2Represents a second output current value, U1And U2Represents the voltage value at two ends of the resistor and U1Greater than U2And R represents the resistance of the resistor.
According to a second aspect of the present application, there is provided a connection control system applied to a mobile terminal, the system comprising: the starting module is used for starting the OTG function when detecting that the OTG slave equipment is connected; a stopping module for stopping the supply of the driving current to the OTG slave device; the first acquisition module is used for acquiring a first output current value of a power supply unit of the mobile terminal; the starting module is used for starting to provide driving current for the OTG slave equipment; the second acquisition module is used for acquiring a second output current value of a power supply unit of the mobile terminal; and the setting module is used for setting the value of the driving current as the difference value of the second output current value and the first output current value.
Further, the stopping module includes: a stopping unit for stopping supplying the driving current to the OTG slave device; and the first delay unit is used for delaying a first preset time.
Further, the opening module includes: a starting unit for starting to provide a driving current to the OTG slave device; and the second delay unit is used for delaying a second preset time.
According to a third aspect of the present application, there is provided a storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform the above-described connection control method.
According to a fourth aspect of the present application, there is provided a mobile terminal comprising a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used for storing instructions and data, and the processor is used for executing the steps of the connection control method.
The application provides a connection control method, a system, a storage medium and a mobile terminal. The beneficial effect of this application lies in: through starting the OTG function, carry out current detection to OTG slave unit, successively acquire the output current value of the mobile terminal power supply unit that corresponds when the mobile terminal does not supply power and supplies power to OTG slave unit to the drive current that sets up mobile terminal is the difference of twice output current value, thereby realizes the developments and sets up drive current, in order to avoid causing the extravagant and the phenomenon that generates heat of electric quantity.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart illustrating steps of a connection control method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating a specific step of step S12 shown in fig. 1.
Fig. 3 is a flowchart illustrating a specific step of step S13 shown in fig. 1.
Fig. 4 is a flowchart illustrating a specific step of step S14 shown in fig. 1.
Fig. 5 is a flowchart illustrating a specific step of step S15 shown in fig. 1.
Fig. 6 is a schematic structural diagram of a connection control system according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of the stop module shown in fig. 6.
FIG. 8 is a schematic structural diagram of the opening module shown in FIG. 6
Fig. 9 is a schematic structural diagram of a mobile terminal provided in an embodiment of the present application.
Fig. 10 is a schematic structural diagram of a mobile terminal provided in 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 is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Specifically, referring to fig. 1, an embodiment of the present application provides a connection control method applied to a mobile terminal, which includes the following steps.
And step S11, when detecting that the OTG slave device is connected, starting the OTG function.
In the embodiment of the application, when the mobile terminal detects that the mobile terminal is connected with a device, the mobile terminal serves as an OTG master device to supply power to an OTG slave device. The OTG slave device can comprise a U disk, a hard disk, a mouse, a keyboard, a mobile terminal and the like. When the mobile terminal detects that the mobile terminal is connected with the OTG slave device, the OTG function is not started, and then the mobile terminal takes fixed current (such as 500mA) as driving current and is not powered by the OTG. The OTG function can be set by a user in the setting in advance, and whether the OTG function is automatically started when the OTG function is detected to be connected with the OTG slave equipment or not is detected.
And step S12, stopping supplying the drive current to the OTG slave device.
Referring to fig. 2, step S12 includes steps S21 to S22.
And step S21, stopping supplying the drive current to the OTG slave device.
In step S22, a first predetermined time is delayed.
In the embodiment of the application, the first preset time is delayed to fully eliminate the influence of the residual current, so that the subsequent measurement result is more accurate. The first preset time may be 100mA, but is not limited thereto. If the first predetermined time is too long, the measurement time is too long. If the first predetermined time is too short, part of the residual current affects the measurement result.
With continued reference to fig. 1.
Step S13, obtaining a first output current value of a power supply unit of the mobile terminal.
Referring to fig. 3, step S13 includes steps S31 to S32.
Step S31, obtaining a voltage value across the test resistor.
In step S32, a first output current value is calculated.
In this embodiment, the power supply unit of the mobile terminal may be a battery, the output end of the power supply unit is provided with a test resistor, a voltage difference is calculated by obtaining voltage values at two ends of the test resistor, and a first output current value is calculated by using ohm's law, where the formula is IBAT1=(U1-U2) R, wherein IBAT1Representing a first output current value, I1And I2Represents the current value across the resistor, and I1Is greater than I2And R represents the resistance value of the test resistor.
With continued reference to fig. 1.
And step S14, starting to provide driving current for the OTG slave device.
Referring to fig. 4, step S14 includes steps S41 to S42.
And step S41, starting to provide driving current for the OTG slave device.
In step S42, a second predetermined time is delayed.
In the embodiment of the application, the second preset time is delayed to fully eliminate the influence of the instantaneous current, so that the subsequent measurement result is more accurate. The first preset time may be 100mA, but is not limited thereto. If the first preset time is too long, the power consumption during the measurement is too large. If the first preset time is too short, the instantaneous current is too large, and the measurement result is inaccurate.
With continued reference to fig. 1.
And step S15, acquiring a second output current value of the power supply unit of the mobile terminal.
Referring to fig. 5, step S15 includes steps S51 to S52.
Step S51, obtaining a voltage value across the test resistor.
In step S52, a second output current value is calculated.
In this embodiment, the power supply unit of the mobile terminal may be a battery, the output end of the power supply unit is provided with a test resistor, a voltage difference is calculated by obtaining voltage values at two ends of the test resistor, and a second output current value is calculated by using ohm's law, where the formula is IBAT2=(U1-U2) R, wherein IBAT2Representing a second output current value, I1And I2Represents the current value across the resistor, and I1Is greater than I2And R represents the resistance value of the test resistor.
With continued reference to fig. 1.
Step S16, setting the value of the driving current as the difference between the second output current value and the first output current value.
In the embodiment of the application, the value of the driving current is set according to the current required by the OTG slave equipment, so that the mobile terminal is ensured to output the proper driving current, the electric quantity is saved for the mobile terminal, and the phenomenon that the OTG slave equipment generates heat due to overlarge current is avoided.
Referring to fig. 6, in one embodiment of the present application, a connection control system is provided. The connection control system comprises a starting module 601, a stopping module 602, a first obtaining module 603, a starting module 604, a second obtaining module 605 and a setting module 606.
The starting module 601 is configured to start an OTG function when detecting that the OTG slave device is connected.
In the embodiment of the application, when the mobile terminal detects that the mobile terminal is connected with a device, the mobile terminal serves as an OTG master device to supply power to an OTG slave device. The OTG slave device can comprise a U disk, a hard disk, a mouse, a keyboard, a mobile terminal and the like. When the mobile terminal detects that the mobile terminal is connected with the OTG slave device, the OTG function is not started, and then the mobile terminal takes fixed current (such as 500mA) as driving current and is not powered by the OTG. The OTG function can be set by a user in the setting in advance, and whether the OTG function is automatically started when the OTG function is detected to be connected with the OTG slave equipment or not is detected.
The stopping module 602 is configured to stop providing the driving current to the OTG slave device.
Referring to fig. 7, the stop module 602 includes a stop unit 701 and a first delay unit 702.
The stopping unit 701 is used for stopping supplying the driving current to the OTG slave device.
The first delay unit 702 is used for delaying a first preset time.
In the embodiment of the application, the first preset time is delayed to fully eliminate the influence of the residual current, so that the subsequent measurement result is more accurate. The first preset time may be 100mA, but is not limited thereto. If the first predetermined time is too long, the measurement time is too long. If the first predetermined time is too short, part of the residual current affects the measurement result.
With continued reference to fig. 6.
The first obtaining module 603 is configured to obtain a first output current value of a power supply unit of the mobile terminal.
Specifically, the voltage values at two ends of the test resistor are obtained, and then the first output current value is calculated.
In this embodiment, the power supply unit of the mobile terminal may be a battery, the output end of the power supply unit is provided with a test resistor, a voltage difference is calculated by obtaining voltage values at two ends of the test resistor, and a first output current value is calculated by using ohm's law, where the formula is IBAT1=(U1-U2) R, wherein IBAT1Representing a first output current value, I1And I2Represents the current value across the resistor, and I1Is greater than I2And R represents the resistance value of the test resistor.
The enabling module 604 is configured to enable the provision of the driving current to the OTG slave device.
Referring to fig. 8, the enabling module 604 includes an enabling unit 801 and a second delay unit 802.
The enabling unit 801 is used to enable the supply of the drive current to the OTG slave device.
The second delay unit 802 is used for delaying a second preset time.
In the embodiment of the application, the second preset time is delayed to fully eliminate the influence of the instantaneous current, so that the subsequent measurement result is more accurate. The first preset time may be 100mA, but is not limited thereto. If the first preset time is too long, the power consumption during the measurement is too large. If the first preset time is too short, the instantaneous current is too large, and the measurement result is inaccurate.
With continued reference to fig. 6.
The second obtaining module 605 is configured to obtain a second output current value of the power supply unit of the mobile terminal.
Specifically, the voltage values at the two ends of the test resistor are obtained, and then the second output current value is calculated.
In this embodiment, the power supply unit of the mobile terminal may be a battery, the output end of the power supply unit is provided with a test resistor, a voltage difference is calculated by obtaining voltage values at two ends of the test resistor, and a second output current value is calculated by using ohm's law, where the formula is IBAT2=(U1-U2) R, wherein IBAT2Representing a second output current value, I1And I2Representing the current value across the resistorAnd I is1Is greater than I2And R represents the resistance value of the test resistor.
The setting module 606 is configured to set the value of the driving current to be a difference between the second output current value and the first output current value.
In the embodiment of the application, the value of the driving current is set according to the current required by the OTG slave equipment, so that the mobile terminal is ensured to output the proper driving current, the electric quantity is saved for the mobile terminal, and the phenomenon that the OTG slave equipment generates heat due to overlarge current is avoided.
Referring to fig. 9, an embodiment of the present application further provides a mobile terminal 900, where the mobile terminal 900 may be a device such as a mobile phone, a tablet, and a computer. As shown in fig. 9, mobile terminal 900 includes a processor 901, a memory 902. The processor 901 is electrically connected to the memory 902.
The processor 901 is a control center of the mobile terminal 900, 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 running or loading an application program stored in the memory 902 and calling data stored in the memory 902, thereby performing overall monitoring of the mobile terminal.
In this embodiment, the mobile terminal 900 is provided with a plurality of memory partitions, where the plurality of memory partitions includes a system partition and a target partition, and the processor 901 in the mobile terminal 900 loads instructions corresponding to processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 runs the application programs stored in the memory 902, so as to implement various functions:
when detecting that the OTG slave equipment is connected, starting an OTG function;
stopping providing drive current to the OTG slave;
acquiring a first output current value of a power supply unit of the mobile terminal;
turning on a drive current to the OTG slave;
acquiring a second output current value of a power supply unit of the mobile terminal; and
setting the value of the driving current as the difference value of the second output current value and the first output current value.
Referring to fig. 10, fig. 10 is a block diagram illustrating a specific structure of a mobile terminal 1000 according to an embodiment of the present application, where the mobile terminal 1000 may be used to implement the connection control method provided in the foregoing embodiment. The mobile terminal 1000 may be a mobile phone or a tablet. The mobile terminal 1000 includes the following components.
The RF circuit 1010 is used for receiving and transmitting electromagnetic waves, so as to perform interconversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. RF circuitry 1010 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 so forth. The RF circuit 1010 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise 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 Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (e.g., IEEE802.11a, IEEE802.11 b, IEEE 802.2.access, and/or IEEE802.11 n), Voice over Internet Protocol (VoIP), world wide Internet Microwave Access (Microwave for Wireless Communication), other suitable protocols for short message service (Max), and any other suitable protocols, and may even include those protocols that have not yet been developed.
The memory 1020 can be used for storing software programs and modules, such as program instructions/modules corresponding to the connection control method in the above-mentioned embodiments, and the processor 1080 executes various functional applications and data processing by running the software programs and modules stored in the memory 1020, that is, the functions of the connection control method are realized. The memory 1020 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 1020 may further include memory located remotely from processor 1080, which may be connected to mobile terminal 1000 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 1030 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, input unit 1030 may include touch-sensitive surface 1031, as well as other input devices 1032. The touch-sensitive surface 1031, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (such as operations by a user on or near the touch-sensitive surface 1031 using any suitable object or attachment, such as a finger, a stylus, etc.) on or near the touch-sensitive surface 1031 and drive the corresponding connection device according to a preset program. Optionally, the touch sensitive surface 1031 may comprise two parts, a touch detection means 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 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch-sensitive surface 1031 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 1030 may also include other input devices 1032 in addition to the touch-sensitive surface 1031. In particular, other input devices 1032 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 track ball, a mouse, a joystick, and the like.
The display unit 1040 may be used to display information input by or provided to a user and various graphical user interfaces of the mobile terminal 1000, which may be comprised of graphics, text, icons, video, and any combination thereof. The Display unit 1040 may include a Display panel 1041, and optionally, the Display panel 1041 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 1031 may overlay the display panel 1041, and when a touch operation is detected on or near the touch-sensitive surface 1031, the touch operation is transmitted to the processor 1080 for determining the type of the touch event, and the processor 1080 then provides a corresponding visual output on the display panel 1041 according to the type of the touch event. Although in fig. 10 touch-sensitive surface 1031 and display panel 1041 are implemented as two separate components for input and output functions, in some embodiments touch-sensitive surface 1031 may be integrated with display panel 1041 for input and output functions.
The mobile terminal 1000 can also include at least one sensor 1050, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 1041 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 1041 and/or a backlight when the mobile terminal 1000 moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the 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 gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured in the mobile terminal 1000, detailed descriptions thereof are omitted.
Audio circuitry 1060, speaker 1061, and microphone 1062 may provide an audio interface between a user and mobile terminal 1000. The audio circuit 1060 can transmit the electrical signal converted from the received audio data to the speaker 1061, and the electrical signal is converted into a sound signal by the speaker 1061 and output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, which is then processed by the audio data output processor 1080 and then transmitted to, for example, another terminal via the RF circuit 1010, or output to the memory 1020 for further processing. The audio circuit 1060 may also include an earbud jack to provide communication of peripheral headphones with the mobile terminal 1000.
The mobile terminal 1000, which can facilitate a user to send and receive e-mails, browse web pages, access streaming media, etc., provides the user with wireless broadband internet access through the transmission module 1070 (e.g., Wi-Fi module). Although fig. 10 shows the transmission module 1070, it is understood that it does not belong to the essential constitution of the mobile terminal 1000 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1080 is a control center of the mobile terminal 1000, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile terminal 1000 and processes data by operating or executing software programs and/or modules stored in the memory 1020 and calling data stored in the memory 1020, thereby integrally monitoring the mobile phone. Optionally, processor 1080 may include one or more processing cores; in some embodiments, processor 1080 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 1080.
Mobile terminal 1000 may also include a power supply 1090 (e.g., a battery) for powering various components, and in some embodiments may be logically coupled to processor 1080 via a power management system that may enable managing charging, discharging, and power consumption. Power supply 1090 may also include any component including one or more DC or AC power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the mobile terminal 1000 may further include a camera (e.g., a front camera, a rear camera), a bluetooth module, and the like, which are not described in detail herein. Specifically, 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, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
when detecting that the OTG slave equipment is connected, starting an OTG function;
stopping providing drive current to the OTG slave;
acquiring a first output current value of a power supply unit of the mobile terminal;
turning on a drive current to the OTG slave;
acquiring a second output current value of a power supply unit of the mobile terminal; and
and setting the value of the driving current as the difference value of the second output current value and the first output current value.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by instructions controlling associated hardware, and the instructions may be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, embodiments of the present application provide a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the connection control methods provided in the embodiments of the present application.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any connection control method provided in the embodiments of the present application, beneficial effects that can be achieved by any connection control method provided in the embodiments of the present application can be achieved, for details, see the foregoing embodiments, and are not described herein again. The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
The beneficial effect of this application lies in: through starting the OTG function, carry out current detection to OTG slave unit, successively acquire the output current value of the mobile terminal power supply unit that corresponds when the mobile terminal does not supply power and supplies power to OTG slave unit to the drive current that sets up mobile terminal is the difference of twice output current value, thereby realizes the developments and sets up drive current, in order to avoid causing the extravagant and the phenomenon that generates heat of electric quantity.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The foregoing describes in detail a connection control method, a system, a storage medium, and a mobile terminal provided in an embodiment of the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the foregoing embodiment is only used to help understand the technical solution and the core idea of the present application; those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications or substitutions do not depart from the spirit and scope of the present disclosure as defined by the appended claims.

Claims (10)

1. A connection control method is applied to a mobile terminal, and is characterized by comprising the following steps:
when detecting that the OTG slave equipment is connected, starting an OTG function;
stopping providing drive current to the OTG slave;
acquiring a first output current value of a power supply unit of the mobile terminal;
turning on a drive current to the OTG slave;
acquiring a second output current value of a power supply unit of the mobile terminal; and
setting the value of the driving current as the difference value of the second output current value and the first output current value.
2. The connection control method according to claim 1, wherein in the step of stopping supply of the driving current to the OTG slave device, comprising:
stopping providing drive current to the OTG slave; and
delaying for a first preset time.
3. The connection control method of claim 1, wherein the step of obtaining the first output current value of the power supply unit of the mobile terminal comprises:
acquiring voltage values at two ends of a test resistor, wherein the test resistor is arranged at the output end of the power supply unit; and
calculating a first output current value, IBAT1=(U1-U2) R, wherein IBAT1Representing a first output current value, U1And U2Represents the voltage value at two ends of the resistor and U1Greater than U2And R represents the resistance of the resistor.
4. The connection control method according to claim 1, wherein in the step of turning on the supply of the driving current to the OTG slave device, further comprising:
turning on a drive current to the OTG slave; and
delaying for a second preset time.
5. The connection control method of claim 1, wherein the step of obtaining the second output current value of the power supply unit of the mobile terminal comprises:
acquiring voltage values at two ends of a test resistor, wherein the test resistor is arranged at the output end of the power supply unit; and
calculating a second output current value, IBAT2=(U1-U2) R, wherein IBAT2Representing a second output current value, U1And U2Represents the voltage value at two ends of the resistor and U1Greater than U2And R represents the resistance of the resistor.
6. A connection control system applied to a mobile terminal, the system comprising:
the starting module is used for starting the OTG function when detecting that the OTG slave equipment is connected;
a stopping module for stopping the supply of the driving current to the OTG slave device;
the first acquisition module is used for acquiring a first output current value of a power supply unit of the mobile terminal;
the starting module is used for starting to provide driving current for the OTG slave equipment;
the second acquisition module is used for acquiring a second output current value of a power supply unit of the mobile terminal; and
and the setting module is used for setting the value of the driving current as the difference value of the second output current value and the first output current value.
7. The connection control system of claim 6, wherein the stop module comprises:
a stopping unit for stopping supplying the driving current to the OTG slave device; and
the first delay unit is used for delaying a first preset time.
8. The connection control system of claim 6, wherein the activation module comprises:
a starting unit for starting to provide a driving current to the OTG slave device; and
and the second delay unit is used for delaying a second preset time.
9. A storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform the connection control method of any one of claims 1 to 5.
10. A mobile terminal comprising a processor and a memory, the processor being electrically connected to the memory, the memory being configured to store instructions and data, the processor being configured to perform the steps of the connection control method according to any one of claims 1 to 5.
CN202011120339.7A 2020-10-19 2020-10-19 Connection control method, system, storage medium and mobile terminal Active CN112256610B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011120339.7A CN112256610B (en) 2020-10-19 2020-10-19 Connection control method, system, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011120339.7A CN112256610B (en) 2020-10-19 2020-10-19 Connection control method, system, storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN112256610A CN112256610A (en) 2021-01-22
CN112256610B true CN112256610B (en) 2022-05-06

Family

ID=74245026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011120339.7A Active CN112256610B (en) 2020-10-19 2020-10-19 Connection control method, system, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN112256610B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9223376B2 (en) * 2012-03-23 2015-12-29 Qualcomm Incorporated Managing electrical current in a portable computing device when two or more communications overlap in drawing power during a transmission
US9116679B2 (en) * 2013-03-14 2015-08-25 Western Digital Technologies, Inc. Storage device powered by a communications interface
CN105404600B (en) * 2015-10-23 2018-05-25 广东欧珀移动通信有限公司 Take into account the method and device of USB eye patterns performance and OTG functions
CN110022600B (en) * 2019-04-09 2022-05-06 惠州Tcl移动通信有限公司 Driving current adjusting method and device, storage medium and mobile terminal
CN111399618A (en) * 2020-03-18 2020-07-10 Tcl移动通信科技(宁波)有限公司 Output current adjusting method and device, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN112256610A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
EP3570404B1 (en) Power supply control method and apparatus, storage medium, and electronic device
CN111008090B (en) Battery electric quantity control method and device, storage medium and terminal equipment
CN112415367A (en) Drive chip abnormality detection method and device, electronic equipment and readable storage medium
CN111491292B (en) Internet access mode adjusting method and device, storage medium and mobile terminal
CN110489177B (en) Application control method and device, storage medium and terminal equipment
CN110022600B (en) Driving current adjusting method and device, storage medium and mobile terminal
CN111404242A (en) Charging method, charging device, storage medium and mobile terminal
CN112256610B (en) Connection control method, system, storage medium and mobile terminal
CN110995324B (en) Bluetooth communication method, device, storage medium and terminal equipment
CN111384754B (en) Charging method, charging device, storage medium and mobile terminal
CN112286849A (en) Wireless charging base data switching method and system, storage medium and terminal equipment
CN109672242B (en) Terminal charging control method and device and storage medium
US11259222B2 (en) Mobile terminal and method and system for switching and controlling call link of mobile terminal
CN112437421A (en) Bluetooth control method, device, storage medium and mobile terminal
CN112367428A (en) Electric quantity display method and system, storage medium and mobile terminal
CN111651299A (en) Wireless chip reset control method and device, storage medium and mobile terminal
CN111399618A (en) Output current adjusting method and device, mobile terminal and storage medium
CN111984107B (en) Method and device for processing power supply abnormity of terminal equipment
CN111262636B (en) Method and device for enhancing network data transmission speed, storage medium and mobile terminal
CN111988059B (en) Wireless data transmission method, device, storage medium and mobile terminal
CN111987764B (en) Discharge control method and device, storage medium and mobile terminal
CN109995441B (en) Communication information processing method, device and storage medium
CN112491562B (en) Communication control method and device and mobile terminal
CN112379857B (en) Audio data processing method and device, storage medium and mobile terminal
CN110972220B (en) Wireless communication method, device, storage medium and terminal 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