CN109301911A - Charging method, mobile terminal and computer readable storage medium - Google Patents

Charging method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN109301911A
CN109301911A CN201811464233.1A CN201811464233A CN109301911A CN 109301911 A CN109301911 A CN 109301911A CN 201811464233 A CN201811464233 A CN 201811464233A CN 109301911 A CN109301911 A CN 109301911A
Authority
CN
China
Prior art keywords
type
interface
battery
mobile terminal
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.)
Pending
Application number
CN201811464233.1A
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201811464233.1A priority Critical patent/CN109301911A/en
Publication of CN109301911A publication Critical patent/CN109301911A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0013Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries acting upon several batteries simultaneously or sequentially

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a kind of charging methods, are applied to mobile terminal, and mobile terminal is equipped with the first type-c interface and the 2nd type-c interface;Charging method is the following steps are included: whether detection the first type-c interface or the 2nd type-c interface are in external power supply charged state;If it is determined that the first type-c interface is in external power supply charged state, then the first battery by the first type-c interface to mobile terminal charges, and detects whether the 2nd type-c interface is plugged with type-c wired earphone;If it is determined that the 2nd type-c interface is plugged with type-c wired earphone, then detect whether the switch on type-c wired earphone is opened;If it is determined that switch is opened, then the second battery by the 2nd type-c interface to type-c wired earphone charges.The invention also discloses a kind of mobile terminal and computer readable storage medium, the present invention, which is realized, connects external power supply in the first type-c interface, and when the 2nd type-c interface connection type-c wired earphone, the first battery and the second battery is carried out while being charged.

Description

Charging method, mobile terminal and computer readable storage medium
Technical field
The present invention relates to mobile terminal charging field more particularly to a kind of charging methods, mobile terminal and computer-readable Storage medium.
Background technique
With the development of communication technology, the mobile terminal devices such as mobile phone become the necessary article of life, and user can use end End equipment online, viewing video, reading news etc..Mobile phone various aspects constantly improve, therefore many functions are also eliminated, wherein It is the most significantly exactly the earpiece holes of 3.5mm.
It is well known that the components of interior of mobile phone are nearly all that one radish, one hole, marshalling is compact, therefore does not have Excessive space.Along with current home-made cellphone all pursues frivolous and double-card dual-standby, would have to reach requirement at certain Aspect is reduced, therefore the earpiece holes of 3.5mm are just parted reluctantly with what one treasures.
Cancel after 3.5mm earpiece holes instead the technologies such as lightning, type-c, and 3.5mm earphone interface category In simulation output, earphone can be directly driven;Lightning, type-c then belong to numeral output, put capable solution by earphone or ear Code audio, and the sound quality of numeral output is naturally better than the sound quality of simulation output, so numeral output becomes inevitable.Cause This, many mobile phones eliminate earpiece holes, make earphone and charge to share a type-c interface.
However, existing type-c interface is only used for charging the phone or grafting type-c earphone, for listening Music, function are more single.
Summary of the invention
The main purpose of the present invention is to provide a kind of charging method, mobile terminal and computer readable storage medium, purports Solving the problems, such as mobile terminal charge function unification.
To achieve the above object, the present invention provides a kind of charging method, is applied to mobile terminal, sets on the mobile terminal There are the first type-c interface and the 2nd type-c interface;The charging method the following steps are included:
It detects the first type-c interface or whether the 2nd type-c interface is in external power supply charged state;
If it is determined that the first type-c interface is in external power supply charged state, then by the first type-c interface to institute The first battery charging of mobile terminal is stated, and detects whether the 2nd type-c interface is plugged with type-c wired earphone;
If it is determined that the 2nd type-c interface is plugged with type-c wired earphone, then the type-c wired earphone is detected On switch whether open;
If it is determined that the switch is opened, then the second electric power storage of the type-c wired earphone is given by the 2nd type-c interface Pond charging.
Optionally, whether the detection the first type-c interface or the 2nd type-c interface are in external power supply charging After the step of state, the charging method further include:
If it is determined that the first type-c interface or the 2nd type-c interface are not in external power supply charged state, then examine Survey the current electric quantity of first battery;
Compare the size between the current electric quantity and preset value;
If it is determined that the current electric quantity is less than the preset value, then the first type-c interface or the 2nd type-c are judged Whether interface is inserted into type-c wired earphone;
If it is determined that any of the first type-c interface or the 2nd type-c interface type-c interface are inserted with described Type-c wired earphone then controls the switch and opens, and controls second battery and charge to first battery.
Optionally, after the step of control second battery charges to first battery, the charging Method further include:
When receiving first music play instruction, the corresponding first music column of the first music play instruction are played Table.
Optionally, the step of size between current electric quantity and preset value includes:
If it is determined that the current electric quantity is greater than or equal to the preset value, then the first type-c interface or second are judged Whether any of type-c interface type-c interface is inserted with the type-c wired earphone;
If so, playing corresponding second music of second musical instruction when receiving the instruction of the second music List.
Optionally, described after the step of receiving the instruction of the second music, the charging method further include:
Judge whether the switch closes;
If so, executing the step of playing second musical instruction corresponding second music list.
Optionally, described to judge that the step of whether switch closes includes:
If it is not, then exporting the signal language that prompt turns off the switch;
When detecting that the switch is in close state, executes and play corresponding second music of second musical instruction The step of list.
It is optionally, described that the step of whether switch closes judged further include:
Judge whether first battery is in charged state;
If so, determining that the switch is opened;
If it is not, then determining that the switch is closed.
Optionally, the preset value is the 10% of the first battery total electricity.
In addition, to achieve the above object, the present invention also provides a kind of mobile terminal, the mobile terminal include: memory, Processor and it is stored in the charging procedure that can be run on the memory and on the processor, the charging procedure is described The step of processor realizes charging method described in any of the above embodiments when executing.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium Charging procedure is stored on storage medium, the charging procedure realizes charging side described in any of the above embodiments when being executed by processor The step of method.
The present invention is in the consistent first type-c interface of mobile terminal setting structure and the 2nd type-c interface, in type-c Second battery is set in wired earphone, and switch is set on type-c wired earphone, when detecting the first type-c interface When in external power supply charged state, control external power supply charges to the first battery of mobile power source, also, is determining second When type-c interface is inserted with type-c wired earphone, judge whether type-c wired earphone upper switch is opened, if so, control To the second battery charging of type-c wired earphone, external power supply, and second are connected in the first type-c interface to realize When type-c interface connects type-c wired earphone, the first battery and the second battery are carried out while being charged;Certainly, when When the not enough power supply of one battery, the second battery that type-c wired earphone can be used charges, and realizes diversification charging Mode.
Detailed description of the invention
Fig. 1 is a kind of each hardware structural diagram of mobile terminal of embodiment of the present invention;
Fig. 2 is a kind of communications network system frame diagram provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of charging method first embodiment of the present invention;
Fig. 4 is the flow diagram of charging method second embodiment of the present invention;
Fig. 5 is the flow diagram of charging method 3rd embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, mobile terminal described in the present invention may include such as mobile phone, Tablet computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), just Prompt formula media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer The fixed terminals such as equal mobile terminals, and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special Except element for moving purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
As shown in Figure 1, it is a kind of each hardware structural diagram of mobile terminal of embodiment of the present invention.The mobile terminal It may include: that RF (Radio Frequency, radio frequency) unit 101, Wi-Fi module 102, audio are defeated including the mobile terminal 100 Out unit 103, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, connect The components such as mouth unit 108, memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that in Fig. 1 100 structure of mobile terminal shown does not constitute the restriction to mobile terminal 100, and mobile terminal 100 may include than illustrating more More or less component perhaps combines certain components or different component layouts.
It is specifically introduced below with reference to all parts of the Fig. 1 to mobile terminal 100:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating Frequency unit 101 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
Wi-Fi belongs to short range wireless transmission technology, and mobile terminal 100 can help user to receive by Wi-Fi module 102 It sends e-mails, browse webpage and access streaming video etc., it provides wireless broadband internet access for user.Although figure 1 shows Wi-Fi module 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal 100, it completely can be with It omits within the scope of not changing the essence of the invention as needed.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or Wi-Fi module 102 it is received or The audio data that person stores in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 can also provide executed to mobile terminal 100 the relevant audio output of specific function (for example, call signal receive sound, Message sink sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or Wi-Fi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model. Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition) The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; Color sensor, fingerprint sensor, pressure sensor, iris sensor, the molecule sensor, gyro that can also configure as mobile phone The other sensors such as instrument, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal Family setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071 Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. It is one or more, specifically herein without limitation.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel 1061 be the function that outputs and inputs of realizing mobile terminal as two independent components, but in certain embodiments, it can The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal 100, utilizes various interfaces and the entire mobile terminal of connection Various pieces by running or execute the software program and/or module that are stored in memory 109, and are called and are stored in Data in reservoir 109 execute the various functions and processing data of mobile terminal 100, to carry out entirety to mobile terminal 100 Monitoring.Processor 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulation Demodulation processor, wherein the main processing operation system of application processor, user interface and application program etc., modulation /demodulation processing Device mainly handles wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
In addition, processor 110 is for calling the charging journey stored in memory 109 in mobile terminal shown in Fig. 1 Sequence, and execute following operation:
It detects the first type-c interface or whether the 2nd type-c interface is in external power supply charged state;
If it is determined that the first type-c interface is in external power supply charged state, then by the first type-c interface to institute The first battery charging of mobile terminal is stated, and detects whether the 2nd type-c interface is plugged with type-c wired earphone;
If it is determined that the 2nd type-c interface is plugged with type-c wired earphone, then the type-c wired earphone is detected On switch whether open;
If it is determined that the switch is opened, then the second electric power storage of the type-c wired earphone is given by the 2nd type-c interface Pond charging.
Further, processor 110 is for calling the charging procedure stored in memory 109, the also following operation of execution:
If it is determined that the first type-c interface or the 2nd type-c interface are not in external power supply charged state, then examine Survey the current electric quantity of first battery;
Compare the size between the current electric quantity and preset value;
If it is determined that the current electric quantity is less than the preset value, then the first type-c interface or the 2nd type-c are judged Whether interface is inserted into type-c wired earphone;
If it is determined that any of the first type-c interface or the 2nd type-c interface type-c interface are inserted with described Type-c wired earphone then controls the switch and opens, and controls second battery and charge to first battery.
Further, processor 110 is for calling the charging procedure stored in memory 109, the also following operation of execution:
When receiving first music play instruction, the corresponding first music column of the first music play instruction are played Table.
Further, processor 110 is for calling the charging procedure stored in memory 109, the also following operation of execution:
If it is determined that the current electric quantity is greater than or equal to the preset value, then the first type-c interface or second are judged Whether any of type-c interface type-c interface is inserted with the type-c wired earphone;
If so, playing corresponding second music of second musical instruction when receiving the instruction of the second music List.
Further, processor 110 is for calling the charging procedure stored in memory 109, the also following operation of execution:
Judge whether the switch closes;
If so, executing the step of playing second musical instruction corresponding second music list.
Further, processor 110 is for calling the charging procedure stored in memory 109, the also following operation of execution:
If it is not, then exporting the signal language that prompt turns off the switch;
When detecting that the switch is in close state, executes and play corresponding second music of second musical instruction The step of list.
Further, processor 110 is for calling the charging procedure stored in memory 109, the also following operation of execution:
Judge whether first battery is in charged state;
If so, determining that the switch is opened;
If it is not, then determining that the switch is closed.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Embodiment to facilitate the understanding of the present invention, the communications network system that mobile terminal of the invention is based below into Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system architecture diagram provided in an embodiment of the present invention, the communication network system System is the LTE system of universal mobile communications technology, which includes UE (User Equipment, the use of successively communication connection Family equipment) (the land Evolved UMTS Terrestrial Radio Access Network, evolved UMTS 201, E-UTRAN Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation 204。
Specifically, UE201 can be above-mentioned mobile terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 may include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way, Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers Such as the function of home location register (not shown) etc, and preserves some related service features, data rates etc. and use The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201 Address distribution and other functions, PCRF2036 are strategy and the charging control strategic decision-making of business data flow and IP bearing resource Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 may include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art should know the present invention is not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And the following new network system etc., herein without limitation.
Based on above-mentioned terminal hardware structure and communications network system, each embodiment of charging method of the present invention is proposed.
The present invention also provides a kind of charging methods, are applied to mobile terminal, and the mobile terminal is equipped with the first type-c and connects Mouth and the 2nd type-c interface;It is the flow diagram of charging method first embodiment of the present invention referring to Fig. 3, Fig. 3.
In the present embodiment, the alarm method the following steps are included:
Step S10, detects the first type-c interface or whether the 2nd type-c interface is in external power supply charging shape State.
In the present embodiment, detects the first type-c interface or whether the 2nd type-c interface is in external power supply charging shape State.The consistent first type-c interface of structure is offered on mobile terminal and the 2nd type-c interface, the two are used equally for outside Power source charges or grafting type-c wired earphone;Also, the type-c wired earphone of this case is built-in with battery, peripheral hardware There is switch.
Type-c interface, that is, USB Type-C, abbreviation USB-C are a kind of hardware interface rule of universal serial bus (USB) Model.The bright spot of new edition interface is more slim design, faster transmission speed (highest 10Gbps) and more intrepid electricity Power transmits (highest 100W).The feature of Type-C two-sided inserting interface maximum is to support the two-sided insertion of USB interface, is formally solved The global problem of " the eternal inaccurate plug of USB ", front and back sides are at will inserted.It simultaneously also must be more with its matching used USB data line It is carefully and lighter.
The type-c interface of the prior art realizes powerful function because of its principle, including can charge, energy high-speed transfer number According to, can also supplying power for outside, output power can do especially big, so can accomplish to decode external, avoid interference and interior of mobile phone Various restraining factors.
Therefore, this case uses the consistent first type-c interface of two structures, the 2nd type-c interface, based on above-mentioned The principle and advantage of type-c interface, so that being able to satisfy the storage to type-c wired earphone while charging to mobile terminal The charging of battery.
Step S20 then passes through the first type-c if it is determined that the first type-c interface is in external power supply charged state Interface charges to the first battery of the mobile terminal, and detects the 2nd type-c interface and whether be plugged with type-c and have Line earphone.
In the present embodiment, if it is determined that the first type-c interface is in external power supply charged state, then pass through the first type-c Interface charges to the first battery of the mobile terminal, and detects the 2nd type-c interface and whether be plugged with type-c and have Line earphone.
Certainly, if it is determined that the 2nd type-c interface is in external power supply charged state, then external power supply is controlled by second Type-c interface charges to the first battery of the mobile terminal.
Since the structure of the first type-c interface and the 2nd type-c interface is preferably completely the same, regardless of using Which type-c interface can charge to the first battery of the mobile terminal.Exist in the one of type-c interface of judgement When executing to the charging of the first battery, detect whether another type-c interface is plugged with type-c wired earphone.
Step S30 then detects the type-c if it is determined that the 2nd type-c interface is plugged with type-c wired earphone Whether the switch on wired earphone is opened;
In the present embodiment, detect whether the 2nd type-c interface is plugged with type-c wired earphone, if it is determined that institute It states the 2nd type-c interface and is plugged with type-c wired earphone, then whether the switch detected on the type-c wired earphone is beaten It opens.When a type-c interface execute to the first battery charge when, detect that another type-c interface is plugged with type- C wired earphone, it is necessary first to the switch on type-c wired earphone be judged, switch, which is opened to execute, type-c Second battery of line earphone charges.
Switch on type-c wired earphone can be opened or closed by manual operation, certainly, in connection mobile terminal When, mobile terminal can need to open the switch according to itself current electric quantity, in order to charge to mobile terminal.
Step S40, if it is determined that the switch is opened, then by the 2nd type-c interface to the type-c wired earphone The charging of second battery.
In the present embodiment, whether the switch detected on the type-c wired earphone is opened, if so, passing through second Type-c interface charges to the second battery of the type-c wired earphone.
After determining that switch is opened, illustrate that type-c wired earphone allows to charge, passes through external power supply connection first Type-c interface, and the 2nd type-c interface connects type-c wired earphone, passes through mobile terminal, the first type-c interface and the Cooperation between two type-c interfaces realizes external power supply to the charge function of the second battery of type-c wired earphone.
The present invention is in the consistent first type-c interface of mobile terminal setting structure and the 2nd type-c interface, in type-c Second battery is set in wired earphone, and switch is set on type-c wired earphone, when detecting the first type-c interface When in external power supply charged state, control external power supply charges to the first battery of mobile power source, also, is determining second When type-c interface is inserted with type-c wired earphone, judge whether type-c wired earphone upper switch is opened, if so, control To the second battery charging of type-c wired earphone, external power supply, and second are connected in the first type-c interface to realize When type-c interface connects type-c wired earphone, the first battery and the second battery are carried out while being charged;Certainly, when When the not enough power supply of one battery, the second battery that type-c wired earphone can be used charges, and realizes diversification charging Mode.
Based on first embodiment, the second embodiment of charging method of the present invention is proposed, referring to Fig. 4, in the present embodiment, step Suddenly S10 includes:
Step S11, if it is determined that the first type-c interface or the 2nd type-c interface are not in external power supply charging State then detects the current electric quantity of first battery;
Step S12, the size between the current electric quantity and preset value;
Step S13 then judges the first type-c interface or the if it is determined that the current electric quantity is less than the preset value Whether two type-c interfaces are inserted into type-c wired earphone;
Step S14, if it is determined that any of the first type-c interface or the 2nd type-c interface type-c interface are inserted Enter to have the type-c wired earphone, then control the switch and open, and controls second battery to first electric power storage Pond charging.
In the present embodiment, when the first type-c interface of judgement or the 2nd type-c interface are not in external power supply charging shape When state, the current electric quantity of first battery is detected;Also, the size between the current electric quantity and preset value;If Determine that the current electric quantity is less than the preset value, then judges whether the first type-c interface or the 2nd type-c interface are inserted Enter type-c wired earphone;If it is determined that any of the first type-c interface or the 2nd type-c interface type-c interface are inserted Enter to have the type-c wired earphone, then control the switch and open, and controls second battery to first electric power storage Pond charging.
The preset value of this case can be a preset range, such as the 10%-20% of the first accumulator electric-quantity, and this case is preset Value is preferably 10% electricity of the first battery, is determining that it is outer that the first type-c interface or the 2nd type-c interface are not in When portion's power source charges state, illustrating that the first type-c interface and the 2nd type-c interface are not connected has external power supply, can be Vacant state is also possible to be plugged with type-c wired earphone state.Obtain the current electric quantity of the first battery, also, to working as Preceding electricity and preset value are compared, for example, current electric quantity is 9%, illustrate the electricity of the first battery of mobile terminal at this time It is lower, it needs to carry out external power supply charging, the equipment that by chance can not currently charge, then, by detecting the first type-c Whether interface or the 2nd type-c interface are inserted into type-c wired earphone, if in the first type-c interface or the 2nd type-c interface Any one type-c interface illustrates to be connected with type-c wired earphone, then mobile terminal inserted with the type-c wired earphone It directly controls switch to open, the second battery of type-c wired earphone is discharged, to realize to mobile terminal First battery charges.
At this point, the second battery of type-c wired earphone can be used as mobile power source, mobile terminal is effectively realized The diversification of charging timely and effectively solves the problems, such as mobile terminal not enough power supply and influences use.
Further, after step S14, the charging method further include:
When receiving first music play instruction, the corresponding first music column of the first music play instruction are played Table.
In the present embodiment, it since the second battery of type-c wired earphone can be used as mobile power source, is moving It can be charged by the second battery of type-c wired earphone when the not enough power supply of the first battery of dynamic terminal, because This when user needs of short duration listen to music at this time, triggers first music play instruction, and mobile terminal is receiving first music broadcasting After instruction, it is capable of the broadcasting of the corresponding first music list of normal control first music play instruction, to realize user The music that several head like can be easily listened in the case where the not enough power supply of one battery.
Certainly, the electricity savings ability of the second battery saves ability unlike the electricity of the first battery, and therefore, second stores For the electricity of battery commonly used in the matter of great urgency of solution customer mobile terminal low battery, user can be according to self-demand, in low electricity Charge to mobile terminal by type-c wired earphone when amount, can also be listened in right amount with type-c wired earphone Music.
Based on second embodiment, the 3rd embodiment of charging method of the present invention is proposed, include: referring to Fig. 5, step S12
Step S121 then judges the first type-c if it is determined that the current electric quantity is greater than or equal to the preset value Whether any of interface or the 2nd type-c interface type-c interface are inserted with the type-c wired earphone;
Step S122, if so, it is corresponding to play second musical instruction when receiving the instruction of the second music Second music list.
In the present embodiment, size between the current electric quantity and preset value, if it is determined that the current electric quantity is greater than Or be equal to the preset value, then judge that any of the first type-c interface or the 2nd type-c interface type-c interface is It is no inserted with the type-c wired earphone;If so, playing second music when receiving the instruction of the second music Instruct corresponding second music list.
For example, current electric quantity is 50%, preset value 10% first determines whether first at this point, current electric quantity is greater than preset value Any of type-c interface or the 2nd type-c interface type-c interface whether inserted with the type-c wired earphone, if It is then to illustrate that any one type-c interface is plugged with type-c wired earphone, illustrates user it is intended that listening to music, because This, when receiving the instruction of the second music, mobile terminal control plays corresponding second music of second musical instruction List.
In the present embodiment, in the case where the electricity of mobile terminal is more sufficient, it is inserted into type-c wired earphone, it can be only It is listened to music by type-c wired earphone, also, detected to whether switch is opened, if mobile terminal discovery switch is beaten It opens, then mobile terminal control switch is closed, and avoids the first battery of mobile terminal that from storing to the second of type-c wired earphone Battery carries out reverse charge.
Further, after step s 122, further includes:
Judge whether the switch closes;
If so, executing the step of playing second musical instruction corresponding second music list.
In the present embodiment, in the case where the electricity of mobile terminal is more sufficient, it is inserted into type-c wired earphone, it can be only It is listened to music by type-c wired earphone, meanwhile, judge whether the switch on type-c wired earphone is opened, opening herein It closes generally by the opened closing of manual control, if opening, control switch is closed, and avoids the first battery meeting of mobile terminal Reverse charge is carried out to the second battery of type-c wired earphone;If closing, illustrate that the first battery of mobile terminal does not have Reverse charge is carried out to the second battery of type-c wired earphone, at this point, playing the corresponding second music column of the second musical instruction Table.
Further, described to judge whether the switch closes and include:
If it is not, then exporting the signal language that prompt turns off the switch;
When detecting that the switch is in close state, executes and play corresponding second music of second musical instruction The step of list.
In the present embodiment, in the case where the electricity of mobile terminal is more sufficient, it is inserted into type-c wired earphone, it can be only It is listened to music by type-c wired earphone, meanwhile, judge whether the switch on type-c wired earphone is opened, if it is not, then Illustrate switch be opening state, in order to avoid mobile terminal the first battery not to the second electric power storage of type-c wired earphone Pond carries out reverse charge, at this point, the signal language that turns off the switch of mobile terminal output prompt, prompts user to turn off the switch in time, with When family turns off the switch, out code is received, illustrates that user has been switched off switch, is referred at this point, executing and playing second music The step of enabling corresponding second music list.
Further, judge that the step of whether switch closes includes:
Judge whether first battery is in charged state;
If so, determining that the switch is opened;
If it is not, then determining that the switch is closed.
In the present embodiment, in the case where the electricity of mobile terminal is more sufficient, it is inserted into type-c wired earphone, judgement Whether the switch on type-c wired earphone closes, and can be judged by judging whether the first battery is in charged state, if It is then to determine that the switch is opened;If it is not, then determining that the switch is closed.
By being judged and being handled to whether switch closes, effectively avoid the first battery of mobile terminal to type-c Second battery of wired earphone carries out the problem of reverse charge.
Further, the preset value is the 10% of the first battery total electricity.
Certainly, preset value may be set to be 20% range of the electricity of the first battery, and this case is not limited to, in movement When the electricity of first battery of terminal is relatively low, as long as insertion type-c wired earphone, mobile terminal can be controlled directly System switch is opened, to realize charge function of the mobile terminal in low battery.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with charging procedure, following operation is realized when the charging procedure is executed by processor:
It detects the first type-c interface or whether the 2nd type-c interface is in external power supply charged state;
If it is determined that the first type-c interface is in external power supply charged state, then by the first type-c interface to institute The first battery charging of mobile terminal is stated, and detects whether the 2nd type-c interface is plugged with type-c wired earphone;
If it is determined that the 2nd type-c interface is plugged with type-c wired earphone, then the type-c wired earphone is detected On switch whether open;
If it is determined that the switch is opened, then the second electric power storage of the type-c wired earphone is given by the 2nd type-c interface Pond charging.
Further, following operation is also realized when the charging procedure is executed by processor:
If it is determined that the first type-c interface or the 2nd type-c interface are not in external power supply charged state, then examine Survey the current electric quantity of first battery;
Compare the size between the current electric quantity and preset value;
If it is determined that the current electric quantity is less than the preset value, then the first type-c interface or the 2nd type-c are judged Whether interface is inserted into type-c wired earphone;
If it is determined that any of the first type-c interface or the 2nd type-c interface type-c interface are inserted with described Type-c wired earphone then controls the switch and opens, and controls second battery and charge to first battery.
Further, following operation is also realized when the charging procedure is executed by processor:
When receiving first music play instruction, the corresponding first music column of the first music play instruction are played Table.
Further, following operation is also realized when the charging procedure is executed by processor:
If it is determined that the current electric quantity is greater than or equal to the preset value, then the first type-c interface or second are judged Whether any of type-c interface type-c interface is inserted with the type-c wired earphone;
If so, playing corresponding second music of second musical instruction when receiving the instruction of the second music List.
Further, following operation is also realized when the charging procedure is executed by processor:
Judge whether the switch closes;
If so, executing the step of playing second musical instruction corresponding second music list.
Further, following operation is also realized when the charging procedure is executed by processor:
If it is not, then exporting the signal language that prompt turns off the switch;
When detecting that the switch is in close state, executes and play corresponding second music of second musical instruction The step of list.
Further, following operation is also realized when the charging procedure is executed by processor:
Judge whether first battery is in charged state;
If so, determining that the switch is opened;
If it is not, then determining that the switch is closed.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the terminal that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or terminal institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or terminal.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile whole End, computer, server, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of charging method is applied to mobile terminal, which is characterized in that the mobile terminal is equipped with the first type-c interface With the 2nd type-c interface;The charging method the following steps are included:
It detects the first type-c interface or whether the 2nd type-c interface is in external power supply charged state;
If it is determined that the first type-c interface is in external power supply charged state, then the shifting is given by the first type-c interface The first battery charging of dynamic terminal, and detect whether the 2nd type-c interface is plugged with type-c wired earphone;
If it is determined that the 2nd type-c interface is plugged with type-c wired earphone, then detect on the type-c wired earphone Whether switch is opened;
If it is determined that the switch is opened, then the second battery by the 2nd type-c interface to the type-c wired earphone fills Electricity.
2. charging method as described in claim 1, which is characterized in that described to detect the first type-c interface or second Whether type-c interface was in after the step of external power supply charged state, further includes:
If it is determined that the first type-c interface or the 2nd type-c interface are not in external power supply charged state, then institute is detected State the current electric quantity of the first battery;
Compare the size between the current electric quantity and preset value;
If it is determined that the current electric quantity is less than the preset value, then the first type-c interface or the 2nd type-c interface are judged Whether type-c wired earphone is inserted into;
If it is determined that any of the first type-c interface or the 2nd type-c interface type-c interface are inserted with the type- C wired earphone then controls the switch and opens, and controls second battery and charge to first battery.
3. charging method as claimed in claim 2, which is characterized in that control second battery is stored to described first After the step of battery charges, the charging method further include:
When receiving first music play instruction, the corresponding first music list of the first music play instruction is played.
4. charging method as claimed in claim 2, which is characterized in that described between current electric quantity and preset value The step of size includes:
If it is determined that the current electric quantity is greater than or equal to the preset value, then the first type-c interface or second are judged Whether any of type-c interface type-c interface is inserted with the type-c wired earphone;
If so, playing corresponding second music list of second musical instruction when receiving the instruction of the second music.
5. charging method as claimed in claim 4, which is characterized in that described the step of receiving the instruction of the second music Later, the charging method further include:
Judge whether the switch closes;
If so, executing the step of playing second musical instruction corresponding second music list.
6. charging method as claimed in claim 5, which is characterized in that described to judge the step of whether switch closes packet It includes:
If it is not, then exporting the signal language that prompt turns off the switch;
When detecting that the switch is in close state, executes and play corresponding second music list of second musical instruction The step of.
7. charging method as claimed in claim 5, which is characterized in that described to judge that the step of whether switch closes also is wrapped It includes:
Judge whether first battery is in charged state;
If so, determining that the switch is opened;
If it is not, then determining that the switch is closed.
8. the charging method as described in any one of claim 2 to 7, which is characterized in that the preset value is the first battery The 10% of total electricity.
9. a kind of mobile terminal, which is characterized in that the mobile terminal includes: memory, processor and is stored in the storage On device and the charging procedure that can run on the processor, such as right is realized when the charging procedure is executed by the processor It is required that the step of charging method described in any one of 1 to 8.
10. a kind of computer readable storage medium, which is characterized in that be stored with charging journey on the computer readable storage medium Sequence is realized when the charging procedure is executed by processor such as the step of charging method described in any item of the claim 1 to 8.
CN201811464233.1A 2018-11-30 2018-11-30 Charging method, mobile terminal and computer readable storage medium Pending CN109301911A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811464233.1A CN109301911A (en) 2018-11-30 2018-11-30 Charging method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811464233.1A CN109301911A (en) 2018-11-30 2018-11-30 Charging method, mobile terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109301911A true CN109301911A (en) 2019-02-01

Family

ID=65142405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811464233.1A Pending CN109301911A (en) 2018-11-30 2018-11-30 Charging method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109301911A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112542867A (en) * 2020-11-26 2021-03-23 惠州Tcl移动通信有限公司 Mobile terminal power supply control method and device, terminal equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0621843A (en) * 1992-07-02 1994-01-28 Nec Corp Radio telephone system
JP2004215196A (en) * 2003-01-09 2004-07-29 Nec Corp Cellular phone terminal
JP2007151941A (en) * 2005-12-07 2007-06-21 Sharp Corp Terminal apparatus
CN101373901A (en) * 2007-08-24 2009-02-25 三星电子株式会社 Method and apparatus of controlling battery power, and portable device using the same
CN103841251A (en) * 2012-11-22 2014-06-04 福兴达科技实业(深圳)有限公司 Mobile terminal and method for using laser lamp through the mobile terminal
CN204030692U (en) * 2014-09-04 2014-12-17 南京墨尔悉安电子科技有限公司 A kind of power-supply management system of inland navigation craft electronic message terminal
US20150304757A1 (en) * 2014-04-17 2015-10-22 Lg Electronics Inc. Mobile terminal and method for controlling the same
US20150312666A1 (en) * 2014-04-23 2015-10-29 Lg Electronics Inc. Mobile terminal
CN105811515A (en) * 2016-04-29 2016-07-27 乐视控股(北京)有限公司 Method and system for charging universal serial bus Bluetooth headset through mobile terminal
CN105848028A (en) * 2016-03-21 2016-08-10 深圳市树源科技有限公司 Earphone for charging audio device and method for charging audio device
CN106249836A (en) * 2016-08-02 2016-12-21 乐视控股(北京)有限公司 A kind of terminal control method and terminal
CN108271093A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 The processing method and mobile terminal of a kind of access device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0621843A (en) * 1992-07-02 1994-01-28 Nec Corp Radio telephone system
JP2004215196A (en) * 2003-01-09 2004-07-29 Nec Corp Cellular phone terminal
JP2007151941A (en) * 2005-12-07 2007-06-21 Sharp Corp Terminal apparatus
CN101373901A (en) * 2007-08-24 2009-02-25 三星电子株式会社 Method and apparatus of controlling battery power, and portable device using the same
CN103841251A (en) * 2012-11-22 2014-06-04 福兴达科技实业(深圳)有限公司 Mobile terminal and method for using laser lamp through the mobile terminal
US20150304757A1 (en) * 2014-04-17 2015-10-22 Lg Electronics Inc. Mobile terminal and method for controlling the same
US20150312666A1 (en) * 2014-04-23 2015-10-29 Lg Electronics Inc. Mobile terminal
CN204030692U (en) * 2014-09-04 2014-12-17 南京墨尔悉安电子科技有限公司 A kind of power-supply management system of inland navigation craft electronic message terminal
CN105848028A (en) * 2016-03-21 2016-08-10 深圳市树源科技有限公司 Earphone for charging audio device and method for charging audio device
CN105811515A (en) * 2016-04-29 2016-07-27 乐视控股(北京)有限公司 Method and system for charging universal serial bus Bluetooth headset through mobile terminal
CN106249836A (en) * 2016-08-02 2016-12-21 乐视控股(北京)有限公司 A kind of terminal control method and terminal
CN108271093A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 The processing method and mobile terminal of a kind of access device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112542867A (en) * 2020-11-26 2021-03-23 惠州Tcl移动通信有限公司 Mobile terminal power supply control method and device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108536481A (en) A kind of application program launching method, mobile terminal and computer storage media
CN108391190B (en) A kind of noise-reduction method, earphone and computer readable storage medium
CN108418948A (en) A kind of based reminding method, mobile terminal and computer storage media
CN108196750A (en) The method, apparatus and computer readable storage medium of screen interface sectional drawing
CN109445745A (en) Audio stream processing method, device, mobile terminal and storage medium
CN109947248A (en) Vibration control method, mobile terminal and computer readable storage medium
CN108512991A (en) A kind of based reminding method, mobile terminal and computer readable storage medium
CN109660973A (en) Bluetooth control method, mobile terminal and storage medium
CN109088997A (en) A kind of gaming audio control method, terminal and computer readable storage medium
CN108762631A (en) A kind of method for controlling mobile terminal, mobile terminal and computer readable storage medium
CN108322609A (en) A kind of notification information regulation and control method, equipment and computer readable storage medium
CN108093117A (en) A kind of dual-screen mobile terminal control method and dual-screen mobile terminal
CN108197554A (en) A kind of camera starts method, mobile terminal and computer readable storage medium
CN109842725A (en) A kind of method for controlling volume of mobile terminal, mobile terminal and storage medium
CN109375894A (en) Earpiece volume based reminding method, device, mobile terminal and readable storage medium storing program for executing
CN110290261A (en) Information processing method, electronic equipment and computer readable storage medium
CN109618048A (en) Game is anti-to bother method, apparatus, mobile terminal and readable storage medium storing program for executing
CN108650399A (en) A kind of volume adjusting method, mobile terminal and computer readable storage medium
CN109005288A (en) Call processing method, double-sided screen terminal and computer readable storage medium
CN108776600A (en) Application program pretrigger method, mobile terminal and computer readable storage medium
CN110086925A (en) A kind of application processing method and mobile terminal
CN109309762A (en) Message treatment method, device, mobile terminal and storage medium
CN108881542A (en) Mobile terminal call method, mobile terminal and computer readable storage medium
CN108566456A (en) Image pickup method, mobile terminal and computer readable storage medium
CN108228301A (en) The method, apparatus and computer readable storage medium of the long sectional drawing of screen interface

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