This application claims State Intellectual Property Office is committed on January 18th, 2019, application No. is 201910047190.5,Apply for the Chinese patent application of entitled " a kind of electronic equipment and its charging method " and is committed to state on April 26th, 2019Department of Intellectual Property, family, application No. is the 201910346383.0, Chinese patent applications of application entitled " terminal and processing method "Priority, entire contents are hereby incorporated by reference in the application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application exemplary embodiment clearer, below in conjunction with the applicationThe technical solution in the application exemplary embodiment is clearly and completely described in attached drawing in exemplary embodiment, showsSo, described exemplary embodiment is only some embodiments of the present application, instead of all the embodiments.
Based on exemplary embodiment shown in the application, those of ordinary skill in the art are not making creative workUnder the premise of every other embodiment obtained, shall fall in the protection scope of this application.Although in addition, content disclosed hereinIt is introduced according to exemplary one or several examples, it should be appreciated that can be with regard to the various aspects of these disclosures or singleSolely constitute a complete technical solution.
It should be appreciated that specification and claims and term " first " in above-mentioned attached drawing in the application, " second "," third " etc. is to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that in this wayThe data used are interchangeable under appropriate circumstances, for example, can according to the embodiment of the present application illustrate or describe in provide those withOuter sequence is implemented.
In addition, term " includes " and " having " and their any deformation, it is intended that covering but it is non-exclusive include,It for example, containing a series of product of components or those of equipment is not necessarily limited to be clearly listed component, but may include not havingOther components being clearly listed or intrinsic for these products or equipment.
Term " unit " used herein refers to hardware that is any known or developing later, software, firmware, artificialThe combination of intelligence, fuzzy logic or hardware or/and software code, is able to carry out function relevant to the element.
The hardware configuration block diagram of terminal 100 in accoding to exemplary embodiment is illustrated in Fig. 1.As shown in Figure 1, eventuallyEnd 100 include: radio frequency (radio frequency, RF) circuit 110, memory 120, input unit 130, display unit 140,Sensor 150, voicefrequency circuit 160, Wireless Fidelity (Wireless Fidelity, Wi-Fi) module 170, processor 180, bluetoothThe components such as module 181 and power supply 190.
RF circuit 110 can be used for receive and send messages or communication process in signal send and receive, can receive base stationThe processing of processor 180 is given after downlink data;Upstream data can be sent to base station.In general, RF circuit includes but is not limited toThe devices such as antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer.
Memory 120 can be used for storing software program and data.Processor 180 is stored in memory 120 by operationSoftware program or data, thereby executing the various functions of terminal 100 and data processing.Memory 120 may include high speed withMachine access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or itsHis volatile solid-state part.Memory 120 is stored with the operating system that terminal 100 is run.It is stored in the applicationDevice 120 can store an operating system and various application programs, can also store the code for executing the embodiment of the present application the method.
Input unit 130(such as touch screen) it can be used for receiving the number or character information of input, it generates and terminal 100User setting and the related signal input of function control.Specifically, input unit 130 may include setting terminal 100 justThe touch screen 131 in face collects the touch operation of user on it or nearby.Input unit 130 can receive use in the applicationThe touch operation at family, such as button is clicked, dragging scroll box etc..
Display unit 140 can be used for showing information input by user or the information and terminal 100 that are supplied to userThe graphic user interface (graphical user interface, GUI) of various menus.Display unit 140 may include that setting existsThe positive display screen 141 of terminal 100.Wherein, display screen 141 can be matched using forms such as liquid crystal display, light emitting diodesIt sets.Display unit 140 is displayed for various graphic user interfaces described herein.Touch screen 131 can be covered onOn display screen 141, touch screen 131 and display screen 141 can also be integrated and be realized the function that outputs and inputs of terminal 100,It can abbreviation touch display screen after integrated.Display unit 140 can show application program and corresponding operation step in the applicationSuddenly.
Terminal 100 can also include at least one sensor 150, such as acceleration transducer 155, optical sensor, movementSensor.Terminal 100 may also be configured with the other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and terminal 100.AudioElectric signal after the audio data received conversion can be transferred to loudspeaker 161, be converted to sound by loudspeaker 161 by circuit 160Sound signal output.Terminal 100 can also configure volume button, for adjusting the volume of voice signal.On the other hand, microphone 162The voice signal of collection is converted into electric signal, is converted to audio data after being received by voicefrequency circuit 160, then audio data is defeatedOut to RF circuit 110 to be sent to such as another terminal, or audio data exported to memory 120 further to locateReason.The voice of the available user of microphone 162 in the application.
Wi-Fi belongs to short range wireless transmission technology, and terminal 100 can help user to receive and dispatch electricity by Wi-Fi module 170Sub- mail, browsing webpage and access Streaming Media etc., it provides wireless broadband internet access for user.
Processor 180 is the control centre of terminal 100, utilizes each portion of various interfaces and the entire terminal of connectionPoint, by running or executing the software program being stored in memory 120, and the data that calling is stored in memory 120,Execute the various functions and processing data of terminal 100.In some embodiments, processor 180 may include one or more processingUnit;Processor 180 can also integrate application processor and baseband processor, wherein the main processing operation system of application processorSystem, user interface and application program etc., baseband processor mainly handles wireless communication.It is understood that above-mentioned Base-Band ProcessingDevice can not also be integrated into processor 180.Processor 180 can run operating system, application program, Yong Hujie in the applicationFace show and touch-control response and the embodiment of the present application described in processing method.In addition, processor 180 and input unit 130 andDisplay unit 140 couples.
Bluetooth module 181, for carrying out information friendship with other bluetooth equipments with bluetooth module by Bluetooth protocolMutually.For example, terminal 100 can be (such as intelligent by bluetooth module 181 and the wearable electronic for being likewise supplied with bluetooth moduleWrist-watch) bluetooth connection is established, to carry out data interaction.
Terminal 100 further includes the power supply 190(such as battery powered to all parts).Power supply can pass through power management systemIt unites logically contiguous with processor 180, to realize the functions such as management charging, electric discharge and power consumption by power-supply management system.EventuallyEnd 100 may also be configured with power knob, for functions such as the startup and shutdown of terminal and screen lockings.
Fig. 2 is the schematic diagram for showing the user interface in terminal (such as terminal 100 of Fig. 1).In some specific realitiesShi Zhong, user can open corresponding application program by touching the application icon in user interface, or by touching userFolder icon on interface can open corresponding file.
Fig. 3 (a) and Fig. 3 (b) is the structural schematic diagram for being respectively used to show the terminal back side and terminal front side.Fig. 4 (a) and figureIt 4(b) is the structural schematic diagram for being respectively used to show back splint battery front side and back splint cell backside.Fig. 5 (a) and Fig. 5 (b) is differenceFor showing the structural schematic diagram for having installed the front and back of terminal of back splint battery.
In conjunction with Fig. 3-5, in some specific implementations, the back side of terminal is equipped with the first thimble contact interface 300, back splint batteryIt is equipped with the second thimble contact interface 400, after terminal installs back splint battery, the first thimble contact interface 300 and the second ejector pin contactPoint interface 400 is electrically connected, so that the electricity of back splint battery can be transferred to terminal.
Specifically, the following table 1 provides a kind of interface definition of second thimble contact interface 400:
Table 1
| Pin number | Pin name | Function declaration |
| 1 | VBUS | Back splint battery is output to the power supply of terminal.5V specification. |
| 2 | HDQ | One line voltameter communication interface. |
| 3 | DET | Terminal detects back splint battery and loads and unloads, and on back splint battery circuit, passes through a resistance eutral grounding. |
| 4 | USB_D+ | Usb data signal. |
| 5 | GND | Power ground and signal ground share. |
| 6 | GND | Power ground and signal ground share. |
| 7 | USB_D- | Usb data signal. |
| 8 | EN | Terminal enables back splint battery and exports VBUS. |
| 9 | USB_ID | OTG function |
| 10 | VBUS | Back splint battery is output to the power supply of terminal.5V specification. |
It should be noted that terminal itself has a battery, it the use of the battery is terminal in the case where not installing back splint batteryHost supplying power, be referred to as " main battery " in the following description, correspondingly, in the following description by back splint electricityPond is referred to as " secondary cell ".
In optionally a kind of embodiment, terminal passes through the first thimble contact interface 300 at the back side and the secondary cell back sideThe second thimble contact interface 400 be connected.In specific implementation, auxiliary connection can be determined whether according to the level of DET pinBattery.
In one example, if detecting, rising edge jump occurs for the level of DET pin, can cause interrupt event, reallySurely secondary cell is connected.In another example, if detecting, failing edge jump occurs for the level of DET pin, can cause interruptionEvent determines connection secondary cell.
In one example, if detecting, DET pin is high level, it is determined that charger insertion.In another example,If detecting, DET pin is low level, it is determined that connection secondary cell.
In optional another embodiment, terminal is wirelessly attached with secondary cell, that is, is not neededThimble contact interface is set in terminal and secondary cell.Specifically, terminal can pass through electromagnetic induction, magnetic resonance, radio waveDeng being wirelessly attached with secondary cell.
In optionally a kind of embodiment, secondary cell includes following two for the mode that terminal provides electricity:
Mode one, charge mode: secondary cell directly provides electricity for the host in terminal, and simultaneously for the main battery in terminal intoRow charging.In mode one, as long as the electricity of main battery is less than, secondary cell while being powered for host will based on electricityIt charges in pond.
In specific implementation, the access that control secondary cell charges to main battery is opened, so that the secondary cell existsIt is that the main battery charges while being powered for the host.
Mode two, direct-furnish power mode: secondary cell directly provides electricity for the host in terminal, not to the main battery in terminalIt charges.In mode two, no matter the electricity of main battery be it is how many, secondary cell is only that host is powered, and is not main batteryIt charges.It in mode two, since secondary cell is only that host is powered, does not charge for main battery, therefore there is no electricityAmount loss, enables secondary cell to be for longer periods powered to host, extends the cruise duration of terminal.
In specific implementation, control secondary cell charge to main battery access shutdown so that secondary cell only based onMachine is powered, and is not charged for the main battery.
In optional another embodiment, secondary cell provides the mode of electricity for terminal further include:
Mode three, intelligent mode: powering mode is automatically selected according to the electricity of main battery;Specifically, when the electricity of main battery is lowWhen the first preset threshold, mode one i.e. charge mode is automatically switched to.
It should be noted that the first preset threshold can self-setting according to the demand of user.
In one example, the first preset threshold is set as 15%.When detecting the electricity of main battery lower than 15%, switchingTo charge mode, i.e., charge while being powered using secondary cell to host for main battery.
In above-mentioned example, during secondary cell is that main battery is charged, the electricity of main battery is gradually risen.CanIn a kind of embodiment of choosing, if the electricity of the main battery gradually rises from lower than first preset threshold to second defaultThreshold value then switches to the direct-furnish power mode from the charge mode, that is, controls the secondary cell and filled to the main batteryThe access shutdown of electricity, so that the secondary cell stops being that the main battery charges.
It should be noted that the second preset threshold can self-setting according to the demand of user.
In one example, the second preset threshold is set as 80%.For example, when the electricity of main battery gradually rises from 5%When up to 80%, secondary cell stops being that main battery charges.
In optional another embodiment, if the output voltage of the secondary cell is less than predeterminated voltage, institute is controlledIt states the access that main battery is powered to the host to open, so that the main battery is that the host is powered.
In present embodiment, during secondary cell is that host is powered or is that main battery is charged, secondary electricityThe electricity in pond is gradually reduced.When the electricity of secondary cell declines to a certain extent, output voltage decline will lead to;And work as secondary cellOutput voltage when dropping to predeterminated voltage, do not have the ability being powered for host.At this point, control the main battery toThe access that the host is powered is opened, and is powered using main battery for host.
Fig. 6 is the schematic diagram that double cell administration interface is shown for showing display unit 140.User can pass through such as Fig. 6Shown in interface selection charge mode or intelligent mode.In the present embodiment, the first preset threshold is 15%.In the present embodiment onlyProvide the display interface including above-mentioned mode one (charge mode) and mode three (intelligent mode).
In optionally a kind of embodiment of intelligent mode, when the electricity of main battery is increased to the second preset threshold, fromMode one automatically switches to mode two, i.e., automatically switches to direct-furnish power mode from charge mode.
Fig. 7 is the flow chart for showing the processing method of one embodiment of the invention offer.Specifically, the embodiment of the present inventionThe processing method of offer includes: at the terminal with one or more processors, memory, input unit and display unit:
Step 901 determines that secondary cell is inserted into.
Step 902 is inputted in response to receiving user, determines terminal powering mode locating at present.
If intelligent mode thens follow the steps 903, if charge mode, 907 are thened follow the steps.
Step 903 judges whether the electricity of main battery is lower than the first preset threshold, if so, 904 are thened follow the steps, if it is not,Then continue to judge the electricity of main battery.
The access that step 904, control secondary cell charge to main battery is opened, so that secondary cell is carried out for hostIt charges while power supply for main battery.
Step 905 judges whether the electricity of main battery is increased to the second preset threshold, if so, 906 are thened follow the steps, ifIt is no, then continue the electricity for judging main battery.
The access that step 906, control secondary cell charge to main battery disconnects, so that secondary cell is only that host carries outPower supply, does not charge for main battery.
The access that step 907, control secondary cell charge to main battery is opened, so that secondary cell is carried out for hostIt charges while power supply for main battery.
In a kind of specific implementation, the operating system of terminal is android system.Kernel layers pass through interruption or I/OMouthful level can detecte out the events such as whether secondary cell is inserted into, whether the electricity of major-minor battery and charger are inserted into.
In some specific implementations, kernel layers using main battery and secondary cell as individual facility registration to systemSys/class/power-supply catalogue in the following, and it is named, such as main battery is named as battery, willSecondary cell is named as motion-battery.
When electricity level, the charging and discharging state status(of main battery include charged state charging, discharge conditionDischarging, uncharged state not charging) etc. information when changing when changing, kernel layers can will becomeThe value of change is written under battery catalogue.
When electricity motion_level, the charging and discharging state motion_status(of secondary cell include charged stateCharging, discharge condition discharging, uncharged state not charging), insert state motion_present etc.When information changes, kernel layers can be written to the value of variation under motion-battery catalogue.
Battery catalogue and motion-battery catalogue are read by healthd module monitors, and is reported toBatteryService service.If BatteryService service receives main battery and/or the state of secondary cell changes,Then battery_changed broadcast is issued to upper level applications.Upper level applications can be from the battery_ receivedThe electricity of main battery, the electricity of charging and discharging state and secondary cell, charging and discharging state, insertion shape are parsed in changed broadcastThe information such as state.
Fig. 8 be for show another embodiment of the present invention provides processing method flow chart.Specifically, the present invention is implementedThe processing method that example provides includes: in the terminal with one or more processors, memory, input unit and display unitPlace:
Step 1001 determines connection secondary cell.
If step 1002 detects that the secondary cell is in discharge condition, when expecting available of the secondary cell is calculatedBetween.
In optionally a kind of embodiment, the trigger condition for calculating the estimated pot life of secondary cell is to be not inserted into chargingSecondary cell is inserted into the case where device.In present embodiment, secondary cell is that the host in terminal is powered and/or secondary cell isMain battery in terminal charges.
In a kind of optional embodiment, the trigger condition for calculating the estimated pot life of secondary cell is to install secondary electricityCharger is extracted in the case where pond.In present embodiment, secondary cell is that the host in terminal is powered and/or secondary cell isMain battery in terminal charges.
In some specific implementations, if parsing the insertion of secondary cell from the battery_changed broadcast receivedSituation motion_present is true, and secondary cell is in discharge condition, then calculates the estimated pot life of secondary cell.
In optionally a kind of embodiment, the estimated pot life of the secondary cell is calculated in step 1002, it is specific to wrapIt includes:
It can according to the remaining capacity of main battery, the remaining capacity of the secondary cell and the estimated of the main battery in the terminalThe estimated pot life of the secondary cell is calculated with the time.
In a kind of optional embodiment, by the interface of Android native system, such as BatteryStats classComputeBatteryTimeRemaining directly acquires the estimated pot life of main battery.
It is carried out below for the estimated pot life that the estimated pot life for how referring to main battery calculates secondary cell specificExplanation.
1.1 calculate the remaining capacity of main battery according to the residual power percentage X1% of main battery and the capacity Y1 of main batteryEQ1, specifically, EQ1=X1%*Y1;
1.2 calculate the remaining capacity EQ2 of secondary cell according to the residual power percentage X2% of secondary cell and the capacity Y2 of secondary cell,Specifically, EQ2=X2%*Y2;
1.3 according to the estimated pot life BT1 of the remaining capacity EQ1 of main battery, the remaining capacity EQ2 of secondary cell and main batteryCalculate the estimated pot life BT2 of secondary cell, specifically, BT2=BT1*EQ2/EQ1.Wherein it is possible to according to the primary system of AndroidThe interface of system directly acquires the estimated pot life BT1 of main battery.
In the specific implementation of above-mentioned steps 1.1 and 1.2, parsed from the battery_changed broadcast receivedThe electricity level of the main battery and level of secondary cell, respectively as residual power percentage X1% and the pair electricity of main batteryThe residual power percentage X2% in pond.
For example, it is assumed that the residual power percentage X1% of main battery is 80%, and the capacity Y1 of main battery is 4400mAh,The residual power percentage X2% of secondary cell is 60%, and the capacity Y2 of secondary cell is 3400mAh, can calculate the residue of main batteryElectricity EQ1 is 80%*4400mAh=3520mAh, and the remaining capacity EQ2 of secondary cell is 60%*3400mAh=2040mAh, passes through and isThe estimated pot life BT1 that system interface gets main battery is 48h, then the estimated pot life BT2 of secondary cell is 48h*2040mAh/3520mAh=27.8h, the i.e. estimated pot life of secondary cell are 27.8 hours.
In order to improve secondary cell estimated pot life accuracy, in a kind of optional embodiment, step 1002The middle estimated pot life that secondary cell is calculated according to the actual output current of secondary cell.Specifically:
The average current I of the secondary cell output in 2.1 counting statistics periodsaverage.Due to the transient current of secondary cell outputIt is bounce, the estimated pot life that will lead to calculating is also bounce, and cannot symbolize the feelings that user actually uses terminalCondition, therefore usually require to calculate the average current in a period of time.
In a kind of optional embodiment, above-mentioned measurement period be current time before fixed time period, such as 5 pointsClock, calculate current time before 5 minutes in secondary cell average current.
In optional another embodiment, above-mentioned measurement period is the period that electricity declines preset value, specificallyThe residual power percentage of the secondary cell drops to the period of current residual electricity percentage from preset value.
Difference in some specific implementations, between the current residual electricity percentage of the preset value and the secondary cellIt is fixed.
Such as above-mentioned difference is 1%, i.e., using the period of electricity decline 1% as above-mentioned measurement period.Assuming that secondary cell is worked asPreceding residual power percentage is 66%, then need according to the residual power percentage of secondary cell from 67% drop to 66% this section whenThe average current of interior secondary cell calculates the estimated pot life of current secondary cell.In this example, above-mentioned preset value is 67%.
Such as above-mentioned difference is 2%, i.e., using the period of electricity decline 2% as above-mentioned measurement period.Assuming that secondary cell is worked asPreceding residual power percentage is 50%, then need according to the residual power percentage of secondary cell from 52% drop to 50% this section whenThe average current of interior secondary cell calculates the estimated pot life of current secondary cell.In this example, above-mentioned preset value is 52%.
2.2 calculate the remaining capacity of secondary cell according to the residual power percentage X2% of secondary cell and the capacity Y2 of secondary cellEQ2, specifically, EQ2=X2%*Y2;
2.3 according to the average current I of secondary cellaverageAnd remaining capacity EQ2 calculates the estimated pot life BT2 of secondary cell,Specifically, BT2=EQ2/Iaverage。
For example, it is assumed that the average current I of secondary cell in measurement periodaverageIt is 80mA, the capacity Y2 of secondary cell is3400mAh, the residual power percentage X2% of secondary cell are 60%, and the remaining capacity EQ2 that can calculate secondary cell is 60%*3400mAh=2040mAh, then the estimated pot life BT2 of secondary cell is then 2040mAh/80mA=25.5h, i.e. secondary cellIt is expected that pot life is 25.5 hours.
In the above-described embodiment, since secondary electricity can not be counted in the first measurement period since meeting trigger conditionThe average current in pond, therefore the estimated of estimated pot life calculating secondary cell that can use main battery in first measurement period canUse the time.
In other words, in first measurement period, according to the remaining capacity of main battery in the terminal, the secondary cellThe estimated pot life of remaining capacity and the main battery calculates the estimated pot life of the secondary cell;Later, according to instituteThe remaining capacity for stating average current and the secondary cell calculates the estimated pot life of the secondary cell.
The estimated pot life of step 1003, the display secondary cell.
Fig. 9 is the user interface schematic diagram that the estimated pot life of major and minor battery is shown for showing display unit 140.?In the case that terminal is not inserted into charger, in order to enable user can be intuitive to see main battery and when expecting available of secondary cellBetween, in a kind of optional embodiment, the pre- of main battery and secondary cell is shown to user in user interface as shown in Figure 8Count pot life.
The embodiment of the present invention also provides a kind of computer storage medium, is stored with computer in the computer storage mediumProgram instruction, when described instruction is run on computers, so that the computer executes such as processing provided by the above embodimentMethod.
Due in the embodiment of the present invention terminal and computer storage medium can be applied to above-mentioned processing method,It can be obtained technical effect see also above method embodiment, and details are not described herein for the embodiment of the present invention.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead toThe relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journeyWhen being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk orThe various media that can store program code such as person's CD.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that theseIt is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the backUnder the premise of from the principle and substance of the present invention, many changes and modifications may be made, but these are changedProtection scope of the present invention is each fallen with modification.