WO2023065931A1 - 一种电子设备的充电方法及电子设备 - Google Patents
一种电子设备的充电方法及电子设备 Download PDFInfo
- Publication number
- WO2023065931A1 WO2023065931A1 PCT/CN2022/119964 CN2022119964W WO2023065931A1 WO 2023065931 A1 WO2023065931 A1 WO 2023065931A1 CN 2022119964 W CN2022119964 W CN 2022119964W WO 2023065931 A1 WO2023065931 A1 WO 2023065931A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- charging
- protocols
- records
- protocol
- identification
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 90
- 230000015654 memory Effects 0.000 claims description 37
- 238000007619 statistical method Methods 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 20
- 238000007726 management method Methods 0.000 description 25
- 230000006854 communication Effects 0.000 description 22
- 238000004891 communication Methods 0.000 description 21
- 230000008569 process Effects 0.000 description 20
- 238000013461 design Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 10
- 238000010295 mobile communication Methods 0.000 description 10
- 238000012545 processing Methods 0.000 description 10
- 230000005611 electricity Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 229920001621 AMOLED Polymers 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 4
- 238000005070 sampling Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 244000240602 cacao Species 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H01—ELECTRIC ELEMENTS
- H01M—PROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
- H01M10/00—Secondary cells; Manufacture thereof
- H01M10/42—Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
- H01M10/44—Methods for charging or discharging
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J50/00—Circuit arrangements or systems for wireless supply or distribution of electric power
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J50/00—Circuit arrangements or systems for wireless supply or distribution of electric power
- H02J50/10—Circuit arrangements or systems for wireless supply or distribution of electric power using inductive coupling
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
Definitions
- the present application relates to the field of terminal technologies, and in particular to a method for charging an electronic device and the electronic device.
- the charging identification process is that the electronic device detects the support of the charging protocol power of the charging device from high to low. If it is detected that a certain charging protocol is supported, the charging identification process of the charging protocol is started.
- charging identification is a hardware communication process. When the charging equipment is old or damaged, or the workmanship is not up to standard, there will be charging protocol support, but the charging identification fails. It may take several minutes for charging identification but cannot enter charging state, continuous loss of power during charge identification.
- the present application provides a method for charging an electronic device and the electronic device, which are used to improve the actual charging efficiency of the electronic device.
- the present application provides a method for charging an electronic device.
- the method can be executed by the electronic device provided in this application.
- the electronic device can be a portable terminal containing a built-in battery, such as a mobile phone, a tablet computer, etc., and the electronic device has a charging device adapted to it.
- the corresponding charging device can be a charger.
- the device can also be a vehicle, and the corresponding charging device can be a charging pile.
- the method includes:
- the at least two first records are records that the electronic equipment and the charging equipment have performed charging identification for P types of charging protocols, and the P types of charging protocols are the electronic equipment and the charging equipment Commonly supported charging protocols;
- the Q types of charging protocols meet the preset charging identification conditions, P and Q are positive integers, and P is greater than or equal to Q ;
- At least two first records are first obtained. Since the at least two first records are records that the electronic device and the charging device have performed charging identification for P types of charging protocols, it can represent that P types of charging protocols have performed charging.
- the actual result of the identification so that according to the at least two first records, it is possible to determine the Q charging protocols that meet the preset charging identification conditions, so that on the basis of the Q charging protocols that meet the preset charging identification conditions, then from Select a charging protocol from the Q charging protocols until a target charging protocol that is successfully identified for charging with the electronic device is selected, and charge the electronic device according to the target charging protocol, so that a suitable charging protocol can be matched more quickly.
- the charging protocol improves the actual charging efficiency of electronic devices.
- the present application provides a method for charging an electronic device.
- Q types of charging protocols can be determined from the P types of charging protocols in various ways, specifically as follows:
- the Q types of charging protocols are determined according to statistical analysis indicators of charging identification of the P types of charging protocols in the at least two first records.
- the at least two first records can be comprehensively considered, and the overall situation of the charging identification that has been performed can be comprehensively considered through specific indicators. , thus making the Q charging protocol more reasonable.
- the second method can be implemented in the following ways:
- the number of successful charging identifications is determined to determine the first protocol set; and ⁇ or according to the P types of charging protocols in the Determine the second protocol set according to the number of charge identification failures in the at least two first records; determine the Q charging protocols according to the first protocol set and/or the second protocol set.
- the Q types of charging protocols are determined according to the identification success rate of charging identification of the P types of charging protocols in the at least two first records.
- the number of charging recognition successes in the at least two time periods and/or the charging protocol whose recognition success rate does not decrease gradually is used as the third protocol set; and ⁇ Or use the charging protocol whose identification failure times and/or identification failure rate do not increase in the P types of charging protocols in the at least two time periods as the fourth protocol set; according to the third protocol set and ⁇ Or the fourth protocol set, determining the Q charging protocols.
- the present application provides a method for charging an electronic device, how to determine the selection order of charging protocols among the Q kinds of charging protocols, there are many ways to implement, specifically:
- the at least two second records are records that the electronic device and the charging device have performed charging identification for the P types of charging protocols, and the at least two second records may be at least two According to the generation order of the at least two second records corresponding to the second record of successful charging identification of Q kinds of charging protocols, determine the selection order of charging protocols selected from the Q kinds of charging protocols.
- the second record is essentially the same as the first record, and the second record may refer to the first record for the generation method and the like.
- the at least two second records may be the at least two first records, or may not be the at least two first records, such as records of different generation times or different charging protocols from the at least two first records.
- the generation sequence of the at least two second records corresponding to the successful charging identification according to the Q charging protocol can reflect the order of successful charging identification , thereby increasing the efficiency of selecting a charging protocol from the Q kinds of charging protocols.
- the second type is the first type:
- the at least two second records are records that the electronic device and the charging device have performed charging identification for the P type of charging protocol; according to the Q type of charging protocol in the Statistical analysis indicators of charging identification in at least two second records and/or charging efficiency indicators of the Q charging protocols determine the selection order of charging protocols selected from the Q charging protocols.
- the implementation method of determining the selection order can be as follows:
- the selection order is determined.
- the Q types of charging protocols are listed in the order of the number of successful identifications or identification success rates of the charging identification in the at least two second records from large to small, or the Q types of charging protocols are The order of the number of identification failures or identification failure rates of the charging identification in the at least two second records from small to large is taken as the selection order.
- the order of charging efficiency indicators of the Q types of charging protocols from large to small is used as the selection order.
- the charging efficiency index of any charging protocol is the rated charging power of the charging protocol, or is determined according to the rated charging power of the charging protocol and the hardware efficiency of the charging protocol, or is determined according to the charging protocol in the at least two determined from the average charging current recorded in the second record.
- the order of the charging efficiency indicators of the protocol is from large to small, so that the charging protocol that meets the statistical analysis indicators and ⁇ or charging efficiency indicators can be preferentially selected, so that the charging device can preferentially perform the charging identification process that meets the statistical analysis indicators and ⁇ or charging efficiency indicators. Increases the actual charging efficiency of electronic devices.
- the embodiment of the present application further provides an electronic device.
- the electronic device includes a charging interface, at least one processor, and a memory; the charging interface is used to connect a power supply device; the memory is used to store one or more computer programs; when one or more computers stored in the memory When the program is executed by the at least one processor, the electronic device can implement the method of the first aspect and any possible design of the first aspect.
- the embodiment of the present application further provides a computer-readable storage medium, the computer-readable storage medium includes a computer program, and when the computer program runs on the electronic device, the electronic device executes the first method of the embodiment of the present application.
- the computer-readable storage medium includes a computer program, and when the computer program runs on the electronic device, the electronic device executes the first method of the embodiment of the present application.
- a computer program product in the embodiments of the present application includes instructions, and when the computer program product is run on the electronic device, the electronic device executes the first aspect and the first aspect of the embodiment of the present application Any possible design method.
- FIG. 1 is an example of an application scenario provided by an embodiment of the present application
- FIG. 2 is a schematic structural diagram of a mobile phone 100 provided in an embodiment of the present application.
- FIG. 3 is a schematic flowchart of a charging method for a mobile phone 100 provided in an embodiment of the present application
- FIG. 4 is a schematic flowchart of a method for charging an electronic device provided in an embodiment of the present application
- FIG. 5 is a schematic flowchart of another charging method for a mobile phone 100 provided in an embodiment of the present application.
- FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- the embodiment of this application involves two electronic devices, that is, a charged device and a power supply device, wherein the charged device may be a mobile phone, an ipad, a notebook computer and other electronic devices, and the power supply device (or called a charging device, an external power supply, etc., this The embodiment of the application does not limit the name) to the charged device to provide power for the charged device.
- the charged device can also be a vehicle, and the power supply device can be a charging pile.
- the device to be charged is referred to as an electronic device, and the power supply device is referred to as a charging device.
- the charging device involved in the embodiments of the present application is connected to the electronic device, and can provide electric energy in the charging device to the electronic device.
- the charging device may be a power adapter or other devices, and any device capable of charging electronic devices may be applicable to the solutions provided in the embodiments of the present application.
- the technical solutions provided in this application can be applied in wired charging scenarios, and can also be applied in wireless charging scenarios.
- the wireless charging scenario the transmitter coil is installed in the charging device, and the receiver coil is installed in the electronic device, and the electric energy is transmitted through the magnetic field coupling between the transmitter coil and the receiver coil, so that the charging device can transmit electrical energy to the electronic device .
- the electronic device and the charging device are connected through a wired method (for example, through a power cord).
- references to "one embodiment” or “some embodiments” or the like in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
- appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
- the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
- the application in the wired charging scenario is used as an example for illustration.
- the implementation principle is similar to that in the wired charging scenario.
- this scenario includes an electronic device 100 (taking a mobile phone as an example) and a charging device 200 (taking a mobile phone charger as an example).
- the charging device 200 is connected to an external power source (such as household electricity).
- the electronic device 100 and the charging device 200 are connected by wire as an example.
- the electronic device 100 may also be connected to the charging device 200 by wireless.
- the charging device 200 obtains power from household electricity, and then provides the power to the electronic device 100 .
- this scenario includes an electronic device 100 (taking a mobile phone as an example) and a charging device 200 (taking a charging treasure as an example).
- the power bank provides the stored power to the mobile phone.
- the electronic device may be a device that provides voice and/or data connectivity to the user, for example, may include a handheld device with a wireless connection function, or a terminal device connected to a wireless modem.
- the terminal device can communicate with the core network via a radio access network (radio access network, RAN), and exchange voice and/or data with the RAN.
- radio access network radio access network
- the terminal equipment may include user equipment (user equipment, UE), wireless terminal equipment, mobile terminal equipment, subscriber unit (subscriber unit), subscriber station (subscriber station), mobile station (mobile station), mobile station (mobile), remote Station (remote station), access point (access point, AP), remote terminal device (remote terminal), access terminal device (access terminal), user terminal device (user terminal), user agent (user agent), or user Equipment (user device), etc.
- Examples include mobile phones (or “cellular" phones), mobile computers, tablets, personal digital assistants (PDAs), media players, smart TVs, wearable devices (such as smart watches, smart helmets) or smart bracelets, etc.), routers, set-top boxes, speakers, mobile phones, tablets, etc., and a combination of the above two or more.
- the electronic device may also be an in-vehicle system, such as an electric vehicle.
- the electronic device 100 in the scenario shown in FIG. 1 , a graphical user interface (graphical user interface, GUI) for such an electronic device, and embodiments for using such an electronic device are introduced below.
- the electronic device 100 may be a portable terminal including a built-in battery, such as a mobile phone, a tablet computer, etc., or a terminal not including a built-in battery, which is not limited in this embodiment of the present application.
- Exemplary embodiments of the aforementioned electronic device 100 include, but are not limited to, portable electronic devices running iOS, Android, Microsoft or other operating systems.
- the aforementioned portable electronic device may also be other portable electronic devices, such as a digital camera. It should also be understood that, in some other embodiments of the present application, the above-mentioned electronic device 100 may not be a portable electronic device, but a desktop computer or the like.
- the electronic device 100 can support various applications. For example, one or more of the following applications: a camera application, an instant messaging application, a photo management application, and the like. Among them, there may be many kinds of instant message sending and receiving applications. Such as WeChat, Tencent chat software (QQ), WhatsApp Messenger, Line, photo sharing (instagram), Kakao Talk, DingTalk, etc. Users can send information such as text, voice, pictures, video files, and other various files to other contacts through instant messaging applications; or users can implement video or audio calls with other contacts through instant messaging applications.
- a camera application an instant messaging application
- instagram photo sharing
- Kakao Talk Kakao Talk
- DingTalk etc.
- Users can send information such as text, voice, pictures, video files, and other various files to other contacts through instant messaging applications; or users can implement video or audio calls with other contacts through instant messaging applications.
- the electronic device 100 is a mobile phone 100 as an example, and the mobile phone has a built-in battery as an example for description.
- FIG. 2 shows a schematic structural diagram of the mobile phone 100 .
- the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and user An identification module (subscriber identification module, SIM) card interface 195 and the like.
- the sensor module 180 may include a fingerprint sensor 180H and a touch sensor 180K.
- the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- application processor application processor, AP
- modem processor graphics processing unit
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller memory
- video codec digital signal processor
- DSP digital signal processor
- baseband processor baseband processor
- neural network processor neural-network processing unit, NPU
- the controller may be the nerve center and command center of the mobile phone 100 .
- the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the memory in processor 110 is a cache memory.
- the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
- the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a mini (mini) USB interface, a micro (micro) USB interface, a USB Type C (USB Type C) interface, etc.
- the USB interface 130 can be used to connect a power adapter to charge the mobile phone 100, and can also be used to transmit data between the mobile phone 100 and peripheral devices.
- a charging device such as a power adapter
- the mobile phone 100 can transmit electric energy with the power adapter through the USB interface 130 .
- the configuration signal line (configuration channel, cc) in the USB interface 130 (such as USB type-c interface) of the mobile phone 100 will detect the current sent by the power adapter, and realize the current transmission between the mobile phone 100 and the power adapter.
- the mobile phone 100 is connected to the power adapter through the USB interface 130 as an example. In practical applications, the mobile phone 100 can also be connected to the power adapter in other ways.
- the magnetic field coupling between the transmitting coil and the receiving coil in the power adapter transmits electric energy, or in the wired charging scenario, connects to the power adapter through other types of charging interface to transmit electric energy. Therefore, the embodiment of the present application does not limit the connection mode between the mobile phone 100 and the power adapter.
- the power transmission between the mobile phone 100 and the power adapter can be realized through the USB interface 130; In this way, the power transmission between the mobile phone 100 and the power adapter can be transmitted through Bluetooth.
- the power transmission process between the mobile phone 100 and the power adapter includes the process of the mobile phone 100 identifying the power supply capability of the power adapter, and the specific content will be introduced later.
- the power adapter and the mobile phone 100 can support the same protocol, such as charging protocol (power delivery protocol, PDP), super fast charging protocol (super charging protocol, SCP), fast charging protocol (fast charging protocol, FCP) and so on. Electricity protocols can also be divided into private charging protocols and public charging protocols. Private charging protocols such as SCP and public charging protocols such as (universal fast charging specification, UFCS) integrate fast charging technical specifications and battery charging specification revision 1.2 (battery charging specification revision 1.2, BC1.2).
- the following uses the application scenario shown in (a) of FIG. 1 as an example to introduce the charging process of the mobile phone 100 .
- the power adapter is connected to an external power source (such as household appliances, etc.), obtains electric energy from the external power supply (such as household appliances, etc.), and then inputs the obtained electric energy to the mobile phone 100 through the USB interface 130 (such as inputting into the mobile phone 100 charging management module 140).
- the charging management module 140 is used to manage the charging process. For example, the charging management module 140 is used to decide whether to provide the power received from the USB interface 130 to the power management module 141 or to the battery 142 .
- the power management module 141 receives the electric energy input by the battery 142 and/or the charging management module 140, and serves as the processor 110, the internal memory 121, the external memory through the external memory interface 120, the display screen 194, the camera 193, and the peripherals such as the wireless communication module 160 parts powered. For example, when the mobile phone 100 is not connected to the power adapter, the power management module 141 receives the power input from the battery 142 to supply power to various components. When the mobile phone 100 is connected to the power adapter and charged, the power management module 141 receives the electric energy input by the charging management module 140 to supply power for each component.
- the power management module 141 can also Receive the electric energy input by the battery 142 to supply power for each component. It should be noted that the power management module 141 can supply power to each component in a sequential order, for example, supply power to the processor 110 first, and then supply power to other components. When the power management module 141 supplies power to the processor 110 and the processor 110 is started, Notify the power management module 141 which parts of other components are powered, or which components are not powered, and so on.
- the charging process can be as follows:
- the power adapter After the power adapter receives the power from the external power source, it inputs the power to the charging management module 140 through the USB interface 130 .
- the charging management module 140 stores electricity for the battery 142 on the one hand, and provides input power for the power management module 141 on the other hand; or, the charging management module 140 only stores electricity for the battery 142, and the power management module 141 obtains power from the battery 142 for each component (such as processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc.) power supply.
- the power management module 141 can be connected to the processor 110, and the processor 110 can determine which components to supply power through the power management module 141.
- the display screen 194 needs power supply, but the wireless communication module 160 does not need power supply, so the power management module 141 supplies power to the display screen 194, but not to the wireless communication module 160. The details will be introduced later.
- the power management module 141 can provide a json configuration interface, and the json configuration interface can configure policy switches of different products.
- the policy switch can be a clear switch for historical data, which is to avoid the situation that the charging protocol cannot be recognized due to a certain version of software error.
- the mobile phone 100 when the mobile phone 100 is not connected to the power adapter, the mobile phone 100 can use the electric energy stored in the battery 142 to provide power for various devices.
- the wireless communication function of the mobile phone 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160 and so on.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in handset 100 can be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
- Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
- the antenna may be used in conjunction with a tuning switch.
- the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the mobile phone 100 .
- the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
- the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
- the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
- at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
- at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
- the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system, etc. applied on the mobile phone 100 (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
- the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
- the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
- the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology.
- the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
- GSM global system for mobile communications
- GPRS general packet radio service
- code division multiple access code division multiple access
- CDMA broadband Code division multiple access
- WCDMA wideband code division multiple access
- time division code division multiple access time-division code division multiple access
- LTE long term evolution
- BT GNSS
- WLAN NFC
- the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- Beidou navigation satellite system beidou navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite based augmentation systems
- the mobile phone 100 realizes the display function through the GPU, the display screen 194, and the application processor.
- the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
- Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos and the like.
- the display screen 194 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
- the mobile phone 100 may include N display screens 194 , where N is a positive integer greater than 1.
- Camera 193 is used to capture still images or video.
- the camera 193 may include at least one front camera and/or at least one rear camera.
- the internal memory 121 may be used to store computer-executable program codes including instructions.
- the processor 110 executes various functional applications and data processing of the mobile phone 100 by executing instructions stored in the internal memory 121 .
- the internal memory 121 may include an area for storing programs and an area for storing data.
- the storage program area can store the operating system and software codes of at least one application program (such as camera application, WeChat application, etc.).
- the data storage area can store data (such as images, videos, etc.) generated during the use of the mobile phone 100 .
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
- the internal memory 121 may store software modules/codes of the power-on control method provided by the embodiment of the present application, and when the processor 110 runs the software modules/codes, corresponding process steps are executed.
- the internal memory 121 can also store values such as preset voltage, preset current, and preset power.
- the external memory interface 120 can be used to connect an external memory card, such as a micro (secure digital, SD) card, so as to expand the storage capacity of the mobile phone 100 .
- the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
- the software modules/codes of the power-on control method provided in the embodiment of the present application can also be stored in an external memory, and the processor 110 can run the software modules/codes through the external memory interface 120 to execute corresponding process steps.
- Values such as preset voltage, preset current, and preset power in the mobile phone 100 can also be stored in an external memory.
- the mobile phone 100 can realize the audio function through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, voice calls, etc.
- the fingerprint sensor 180H is used to collect fingerprints.
- the mobile phone 100 can use the collected fingerprint features to realize fingerprint unlocking, access to the application lock, take pictures with the fingerprint, answer calls with the fingerprint, and the like.
- Touch sensor 180K also known as "touch panel”.
- the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
- the touch sensor 180K is used to detect a touch operation on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- Visual output related to the touch operation can be provided through the display screen 194 .
- the touch sensor 180K may also be disposed on the surface of the mobile phone 100 , which is different from the position of the display screen 194 .
- the sensor module 180 may also include other sensors, such as pressure sensors, gyroscope sensors, air pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity light sensors, temperature sensors, ambient light sensors, bone conduction sensors, etc. Examples are not limited to this.
- the keys 190 include a power key, a volume key and the like.
- the key 190 can be a mechanical key or a touch key.
- the mobile phone 100 can receive key input and generate key signal input related to user settings and function control of the mobile phone 100 .
- the boot instruction, confirmation instruction, etc. can be input through the security check 190 .
- the motor 191 can generate a vibrating reminder.
- the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
- touch operations applied to different applications may correspond to different vibration feedback effects.
- the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
- the SIM card interface 195 is used for connecting a SIM card.
- the SIM card can be connected and separated from the mobile phone 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
- the structure shown in FIG. 2 does not constitute a specific limitation on the mobile phone 100 .
- the mobile phone 100 may include more or fewer components than those shown in FIG. 2 , or combine certain components, or separate certain components, or arrange different components.
- the components shown in FIG. 2 can be implemented in hardware, software, or a combination of software and hardware.
- Step 301 The mobile phone 100 is connected to the power adapter.
- Step 302 The mobile phone 100 performs charging identification of the charging protocol.
- the charging identification process (also called the protocol handshake process) refers to the process of mutually confirming the charging protocol between the mobile phone 100 and the power adapter.
- the mobile phone 100 and the power adapter can jointly support multiple charging protocols.
- the charging state can only be entered after the protocol successfully identifies the charging.
- the charging identification process can specifically be that when the mobile phone 100 obtains the charging protocol handshake packet from the power adapter, determine the charging protocol that matches the charging protocol handshake packet in the charging protocol stored in the mobile phone, and the mobile phone 100 according to the charging protocol that matches the charging protocol handshake packet, To answer, the mobile phone 100 sends a specific message to the power adapter or reads the identification of the power adapter.
- the mobile phone 100 may also directly select a charging protocol to send a specific message corresponding to the charging protocol to the power adapter or read the identification of the power adapter.
- step 303 is executed.
- Step 303 The mobile phone 100 enters the charging state.
- Step 304 The mobile phone 100 is fully charged or is normally disconnected from the power adapter.
- the mobile phone 100 performs charging identification by constantly switching charging protocols, and of course, it can eventually successfully identify a certain charging protocol.
- the charging protocol is supported but the charging identification fails.
- the mobile phone 100 cannot enter the charging state before the charging identification is successful, and power will continue to be lost during the charging identification period. Therefore, how to quickly match the electronic device to a suitable charging protocol and how to reduce the power loss of the terminal device during charging identification is very important.
- FIG. 4 it is a schematic flowchart of a method for charging an electronic device provided in an embodiment of the present application. This method can be applied to the electronic device shown in Figure 1 above or with a functional structure similar to that of Figure 1, that is, the method can be executed by various hardware parts in the electronic device combined with corresponding software programs, and can be executed according to the following steps:
- Step 401 Obtain at least two first records.
- Step 402 Determine Q types of charging protocols from the P types of charging protocols according to the at least two first records.
- Step 403 Select a charging protocol from the Q kinds of charging protocols, and identify the charging of the electronic device according to the selected charging protocol, until the target charging protocol that is successfully identified with the charging of the electronic device is selected, and according to the target A charging protocol charges the electronic device.
- the at least two first records are records that the electronic device and the charging device have performed charging identification for P types of charging protocols.
- the at least two first records can be records of all charging identifications recorded continuously within a period of time, or they can be A record of partial charge identification over a period of time.
- the P charging protocol is a charging protocol supported by both the electronic device and the charging device.
- S charging protocols stored in the electronic device (that is, the charging protocols supported by the electronic device), and S is greater than or equal to P, then the P charging protocols can be obtained in the following way: Take the mobile phone 100 and the power adapter as an example, the power adapter and the mobile phone 100 After the connection, if the mobile phone 100 and the power adapter successfully identify any charging protocol in the S charging protocols, record the identification of the power adapter, record the charging protocol with successful charging identification, and mark the charging protocol with successful charging identification It is a charging protocol supported by both electronic equipment and charging equipment.
- the charging protocols in the S charging protocols all go through the above process. After obtaining the charging protocol supported by the electronic equipment and charging equipment in the S charging protocols, P types of charging protocols can be obtained. Part of the charging protocols can also be selected as P types of charging protocols.
- the first record may record the success or failure result of the primary charging identification of the first charging protocol (the result of the successful identification of the first charging protocol charging may be called legal record, the result of the failure of charging identification of the first charging protocol can be called an illegal record), and the charging identification duration of this charging protocol identification and the average charging current after charging identification can also be recorded.
- the first charging protocol is the P type Any charging protocol in the charging protocol.
- the success or failure of the charging identification can be defined as follows: the success of the charging identification is the status of receiving the connected notification during the charging identification process and having a continuous current within the preset duration; If there is an abnormal state of disconnection notification, or an abnormal state of no current after repeated connection, record the charging recognition as failure.
- charging identification success or failure is only an example. In some embodiments, other determination methods for charging identification success or failure can also be set. For example, the determination can be made according to the charging current and charging voltage. If the charging identification of any charging protocol is started, if the charging current of the charging protocol is still less than the charging current threshold after a preset period of time, it is determined that the charging identification of the charging protocol fails, otherwise, the charging identification of the charging protocol is determined If it succeeds, it is the same as judging according to the charging voltage.
- the method of generating the first record may be as follows: after the electronic device performs charging identification, the charging driver software of the electronic device sends notification information to the charging application (such as native service), and the charging device generates the first record according to the notification information.
- the charging application such as native service
- the identification and the result of charging identification can be generated in the following manner: for example, a hash value is generated by the product serial number (serial number, SN) and the supplier identification (vendor id, VID) of the charging device as the identification of the charging device.
- the maximum number of at least two first records, or the number of first records of each charging protocol can be limited to a fixed capacity, or a minimum number threshold can be defined, and only the first records with a fixed capacity are maintained at most, for example, a fixed capacity
- the capacity can be set to 100, then only the latest 100 first records in chronological order can be saved in the charging device, if there is a newly generated first record, then the earliest first record can be deleted and the newly generated first record can be added One record, so that the number of the first record is maintained at 100, and if the minimum number threshold is 10, then when the number of the first record stored in the electronic device is less than 10, it may not be acquired, until the number of the first record is greater than or When it is equal to 10, get it again, as at least two first records.
- the P types of charging protocols are charging protocols supported by both the electronic device and the charging device.
- the charging protocol supported by the electronic device and the charging protocol supported by the charging device may be the same, or may be different.
- the P type of charging protocol is a charging protocol supported by both the electronic device and the charging device.
- the Q type of charging protocol satisfies the preset charging identification conditions, P and Q are positive integers, and P is greater than or equal to Q, and it can also be limited that P is greater than Q, then when applied in step 402, it can ensure that the Q type of charging
- the charging protocol is screened out in the protocol, and when applied in step 403, it can be executed within a smaller range of charging protocols, which improves the efficiency of selecting the target charging protocol.
- the selected charging protocol is the target charging protocol, and the electronic device can be charged according to the target charging protocol.
- step 402 there may be multiple implementations for determining Q charging protocols from the P charging protocols, and these implementations may be applied to step 402, specifically as follows:
- P types of charging protocols are 10 charging protocols
- at least two first records are 500 first records, 200 of which are randomly selected
- 200 first records include 7 kinds of charging with successful charging identification protocol, then Q is 7, and the 7 charging protocols that are successfully identified are the Q charging protocols.
- the first record can also be selected according to the set step size.
- Article 11, Article 21...The first record of Article 491, these 49 records include 5 charging protocols with successful charging recognition, then Q is 5, and these 5 charging protocols with successful charging recognition are Q charging protocols .
- the second type is the first type:
- the Q types of charging protocols are determined according to statistical analysis indicators of charging identification of the P types of charging protocols in the at least two first records.
- Step (1-1) Determine a first set of protocols according to the number of successful charging identifications of the P types of charging protocols in the at least two first records. and / or
- Step (1-1) and step (1-2) can determine the corresponding protocol set by setting a threshold, for example, in step (1-1), the charging protocol whose number of successful identifications is greater than the threshold of successful times can be used as the first protocol set, or Select the top Q charging protocols as the first protocol set in the order of the number of successful identifications from large to small; correspondingly, in step (1-2), the charging protocol whose number of identification failures is less than the threshold of the number of failures can also be used as the second protocol set , or select the first Q charging protocols as the second protocol set in ascending order of identification failure times.
- the failure times threshold is 1.
- Step (1-1) and step (1-2) can be executed either or both. If step (1-1) and step (1-2) are executed one by one, then only the result obtained by the execution of the one
- the protocol set determines the Q kinds of charging protocols, such as only executing step (1-1), then according to the first protocol set, the Q kinds of charging protocols are determined, and the first protocol set can be used as the Q kinds of charging protocols; correspondingly , if both step (1-1) and step (1-2) are executed, the Q kinds of charging protocols can be determined according to the first protocol set and the second protocol set, such as combining the first protocol set and the second protocol set The intersection is used as the Q charging protocol.
- step (1-1) and step (1-2) are not the same.
- the number of successful identifications of the charging protocol may not be high.
- the P types of charging protocols are charging protocol A, charging protocol B and charging protocol C, and at least two first records are 500 first records, among which, the number of times of successful identification of charging protocol A is 181, and the number of times of identification failure is 19 times, charging protocol B has 160 times of successful identification, 8 times of identification failure, 120 times of successful identification of charging protocol C, and 12 times of identification failure.
- charging protocol A and charging protocol B are selected; if two charging protocols are selected according to the number of identification failures, then charging protocol B and charging protocol C are selected.
- the Q types of charging protocols are determined according to the identification success rates of charging identifications of the P types of charging protocols in the at least two first records.
- Q types of charging protocols can be determined by setting thresholds.
- the charging protocols whose identification success rate is greater than the success rate threshold can be used as the Q types of charging protocols.
- Statistical analysis indicators may consider period division, and when the at least two first records include first records in at least two periods, it may be as described in the following steps:
- Step (3-1) Among the P types of charging protocols, the charging protocols whose number of charging recognition successes and/or recognition success rates do not decrease gradually in the at least two time periods are taken as a third protocol set. and / or
- Step (3-3) According to the third protocol set and/or the fourth protocol set, determine the Q kinds of charging protocols.
- the at least two time periods can be at least two first records, or the first records selected from at least two first records of more than two time periods, and at least two time periods can be set to be greater than the number of time period thresholds , such as investigating the number of successful identifications of charging identification within 3 time periods.
- Step (3-1) and step (3-2) can choose one to carry out, also can all carry out, because also comprise multiple schemes in step (3-1) or step (3-2), also can press step (3 -1) or a certain scheme in step (3-2) is executed, if step (3-1) and step (3-2) choose one to execute, then only according to the protocol set obtained by choosing one to execute to determine the described Q kinds of charging protocols, for example, only one of the schemes in step (3-1) is executed, then the charging protocols in the P kinds of charging protocols that do not decrease the number of successful charging identifications in the at least two time periods are used as Q kinds of charging protocols; correspondingly, if both steps (3-1) and steps (3-2) are executed, the Q kinds of charging protocols can be determined according to the third protocol set and the fourth protocol set, such as the third protocol The intersection of the set and the fourth protocol set is used as the Q kinds of charging protocols.
- the charging protocol Since only one charging protocol can be selected for charging identification at one time, if the selected charging protocol successfully identifies the charging of the electronic device, then the charging protocol is the target charging protocol; otherwise, continue to select the next charging protocol for charging identification , so the order in which charging protocols are selected is crucial to whether the target charging protocol can be quickly selected.
- the charging method of the electronic device provided in the embodiment of the present application, there are many ways to realize how to determine the selection order of the charging protocols among the Q kinds of charging protocols. These ways can be applied to step 403, and the details can be as follows:
- the at least two second records are records that the electronic device and the charging device have performed charging identification for the P types of charging protocols, and the at least two second records may be at least two According to the generation order of the at least two second records corresponding to the second record of successful charging identification of Q kinds of charging protocols, determine the selection order of charging protocols selected from the Q kinds of charging protocols.
- Q kinds of charging protocols are: charging protocol A, charging protocol B and charging protocol C, and at least two second records are arranged according to the order of generation (early generated first): B, success; A, failure; C , success; A, success; then the generation sequence of the at least two second records corresponding to the successful charging identification of the Q charging protocols is charging protocol B, charging protocol C, and charging protocol A.
- the second record corresponding to the successful charging identification of Q kinds of charging protocols can be in the reverse order of the generation order of the at least two second records, as the charging protocol selected from the Q kinds of charging protocols
- the selection order of charging protocols selected from the Q kinds of charging protocols is charging protocol A, charging protocol B, and charging protocol C, that is, the charging protocol whose time is approaching and whose charging identification is successful is preferentially selected.
- the second type is the first type:
- the at least two second records are records that the electronic device and the charging device have performed charging identification for the P type of charging protocol; according to the Q type of charging protocol in the Statistical analysis indicators of charging identification in at least two second records and/or charging efficiency indicators of the Q charging protocols determine the selection order of charging protocols selected from the Q charging protocols.
- the second record is essentially the same as the first record, and the first record can be referred to for the generation method of the second record.
- the at least two second records may be the at least two first records, or may not be the at least two first records, such as records of different generation times or different charging protocols from the at least two first records.
- the charging efficiency index of any charging protocol is the rated charging power of the charging protocol, or is determined according to the rated charging power of the charging protocol and the hardware efficiency of the charging protocol, or is determined according to the charging protocol in the charging protocol. determined by the average charging current recorded in the at least two second records.
- the hardware charging channels used by different charging protocols are not necessarily the same, after the charging device charges the electronic device, the actual charging power may not be the rated charging power, and the ratio of the actual charging power to the rated charging power is the hardware efficiency.
- determining the selection order can be as follows:
- the second weight value is used to determine the comprehensive scoring value of the charging protocol; and the selection order is determined according to the comprehensive scoring values of the Q kinds of charging protocols.
- the statistical analysis index is the recognition success rate of the charging protocol in at least two second records
- the charging efficiency index is the rated charging power
- the first weight value is 0.6.
- the second weight value is 0.4
- the first scoring value is the identification success rate of the charging protocol in at least two second records multiplied by 100, such as the second charging protocol is any one of the Q charging protocols, the second charging protocol
- the recognition success rate in at least two second records is 0.90, then the first score value is 90, and the second score value is the ratio of the rated charging power of the second charging protocol to the highest charging power in the Q charging protocol multiplied 100.
- the Q charging protocols can be selected according to the selection order of the comprehensive scoring values from large to small.
- the above example is only used as an example to describe the method (1). After selecting different statistical analysis indicators, charging efficiency indicators and scoring mechanisms, the comprehensive scoring value can be calculated according to the corresponding method, and the selection sequence can be determined.
- the order of recognition success rates from large to small in the at least two second records is substantially the same as the order of corresponding recognition failure rates from small to large;
- the essence of the protocol is that the descending order of identification success times in the at least two second records is not the same as the descending order of corresponding identification failure times.
- the order of the charging efficiency indicators of the Q charging protocols from large to small is taken as the selection order.
- the order of the average charging currents of the Q charging protocols from large to small may be used as the selection order.
- the charging protocol with abnormal charging identification is excluded, and some abnormal situations that cannot be charged or frequently cut off are reduced. Therefore, in the process of selecting the charging protocol, the rapid selection of the charging protocol between the charging device and the electronic device is realized, and a suitable charging protocol can be matched more quickly, thereby improving user experience.
- the implementation of determining Q charging protocols from the P charging protocols described above, and the implementation of determining the sequence of charging protocols selected from the Q charging protocols, can all be applied to the charging process of the charging device.
- the mobile phone 100 and the steps ( 1-1) to step (1-3) as an example, when steps (1-1) to (1-3) are applied to the mobile phone 100, taking the charging protocol selected according to the number of successful identifications as an example, the charging method of the mobile phone 100 The process can be shown in Figure 5, specifically as follows:
- Step 501 The mobile phone 100 is connected to the power adapter.
- Step 502 The mobile phone 100 obtains the identification of the power adapter.
- Step 503 Determine whether the number of first records of successful charging identification of the first charging protocol stored in the mobile phone 100 is greater than a success times threshold.
- the first charging protocol is any one of the P charging protocols, if yes, execute step 504 , otherwise, update the first charging protocol, and execute step 503 again.
- Step 504 The mobile phone 100 enters the charging identification of the first charging protocol.
- Step 505 The mobile phone 100 generates a first record of charging identification of the first charging protocol.
- Step 506 Determine whether the mobile phone 100 has successfully identified the charging of the first charging protocol, if yes, execute step 507 , otherwise, update the first charging protocol, and return to step 503 .
- Step 507 The mobile phone 100 enters the charging state.
- Step 508 The mobile phone 100 is fully charged or is normally disconnected from the power adapter.
- the method provided in the embodiments of the present application is introduced from the perspective of the electronic device (the mobile phone 100 ) as the execution subject.
- the electronic device may include a hardware structure and/or a software module, and realize the above-mentioned functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above-mentioned functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
- an electronic device which may include: a charging interface 601, one or more processors 602, and one or more memories 603; or multiple communication bus 604 connections.
- one or more computer programs may be stored in the memory 603 and configured to be executed by the one or more processors 602, the one or more computer programs include instructions, and the instructions are executed by the one or more processors When 602 is executed, all or part of the steps described in the foregoing method embodiments shown in FIGS. 3 to 5 may be implemented.
- the processor 602 may be a central processing unit (central processing unit, CPU), or a specific application integrated circuit (application-specific integrated circuit, ASIC), may be one or more integrated circuits for controlling program execution, may be Baseband chips, and so on.
- the number of the memory 603 may be one or more, and the memory 603 may be a read-only memory (read-only memory, ROM), a random access memory (random access memory, RAM), or a disk memory, and the like.
- the electronic equipment shown in Figure 6 can be mobile phones, ipads, laptops, smart TVs, wearable devices (such as smart watches, smart helmets or smart bracelets, etc.) and vehicles, etc.
- the charging device can be Charging pile.
- the electronic device shown in FIG. 6 is a mobile phone, its structure can be referred to in FIG. 2 .
- An embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes a computer program, and when the computer program is run on an electronic device, the electronic device can execute the above-mentioned steps including the above-mentioned Fig. 3-Fig. All or part of the steps described in the method embodiment shown in 5.
- the embodiment of the present application also provides a computer program product including instructions.
- the computer program product When the computer program product is run on the electronic device, the electronic device can execute the method including the method shown in the above-mentioned Fig. 3 to Fig. 5 All or part of the steps described in the example.
- all or part of them may be implemented by software, hardware, firmware or any combination thereof.
- software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
- the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
- the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state hard disk), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Computer Networks & Wireless Communication (AREA)
- Manufacturing & Machinery (AREA)
- Chemical & Material Sciences (AREA)
- Chemical Kinetics & Catalysis (AREA)
- Electrochemistry (AREA)
- General Chemical & Material Sciences (AREA)
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
Abstract
本发明公开了一种电子设备的充电方法及电子设备。其中方法为:获取至少两条第一记录,所述至少两条第一记录为电子设备与充电设备对P种充电协议已执行充电识别的记录,所述P种充电协议为所述电子设备与所述充电设备共同支持的充电协议;根据所述至少两条第一记录,从所述P种充电协议中确定Q种充电协议,所述Q种充电协议满足预设充电识别条件,P,Q为正整数,且P大于或等于Q;从所述Q种充电协议中选取充电协议,根据选取到的充电协议对所述电子设备充电识别,直至选取到与所述电子设备充电识别成功的目标充电协议,并根据所述目标充电协议对所述电子设备充电。
Description
相关申请的交叉引用
本申请要求在2021年10月20日提交中国专利局、申请号为202111222294.9、申请名称为“一种电子设备的充电方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及终端技术领域,尤其涉及一种电子设备的充电方法及电子设备。
充电识别过程为电子设备对充电设备的充电协议功率从高到低进行支持检测,若检测到支持某种充电协议,则开始进行该充电协议的充电识别过程。然而,充电识别为硬件通信过程,在充电设备老旧或损坏、或工艺不达标的情况下,会存在充电协议支持,但充电识别不通过的情况,可能进行数分钟的充电识别但无法进入充电状态,在充电识别期间持续损失功率。
因此,电子设备能否迅速匹配到合适的充电协议至关重要,如何提升电子设备的实际充电效率,是一个亟待解决的问题。
发明内容
本申请提供一种电子设备的充电方法及电子设备,用于提升电子设备的实际充电效率。
第一方面,本申请提供一种电子设备的充电方法。该方法可以由本申请提供的电子设备执行。该电子设备可以是包含内置电池的便捷式终端,诸如手机、平板电脑等,该电子设备有与其适配的充电设备,如该电子设备为手机时,对应的充电设备可以为充电器,该电子设备也可以为车辆,那么对应的充电设备可以为充电桩。该方法包括:
获取至少两条第一记录,所述至少两条第一记录为电子设备与充电设备对P种充电协议已执行充电识别的记录,所述P种充电协议为所述电子设备与所述充电设备共同支持的充电协议;
根据所述至少两条第一记录,从所述P种充电协议中确定Q种充电协议,所述Q种充电协议满足预设充电识别条件,P,Q为正整数,且P大于或等于Q;
从所述Q种充电协议中选取充电协议,根据选取到的充电协议对所述电子设备充电识别,直至选取到与所述电子设备充电识别成功的目标充电协议,并根据所述目标充电协议对所述电子设备充电。
上述方式下,首先获取到至少两条第一记录,由于所述至少两条第一记录为电子设备与充电设备对P种充电协议已执行充电识别的记录,可以表征P种充电协议已执行充电识别的实际结果,从而可以根据所述至少两条第一记录,确定出满足预设充电识别条件的Q种充电协议,从而在满足预设充电识别条件的Q种充电协议的基础上,再从所述Q条充电协议中选取充电协议,直至选取到与所述电子设备充电识别成功的目标充电协议,并根据 所述目标充电协议对所述电子设备充电,进而可以更迅速地匹配到合适的充电协议,提升了电子设备的实际充电效率。
本申请提供一种电子设备的充电方法中,可以按照多种方式,根据所述至少两条第一记录,从所述P种充电协议中确定Q种充电协议,具体来说可以如下:
在一种可能的设计中,第一种方式:
抽样选取至少两条第一记录中第一记录集合,将第一记录集合中充电识别成功的充电协议,作为Q种充电协议。
上述方式下,通过抽样选取至少两条第一记录中第一记录集合,可以将其中少量的随机分散的第一记录集合,反映出至少两条第一记录的整体情况,从而增加了从所述P种充电协议中确定Q种充电协议的效率。
在一种可能的设计中,第二种方式:
根据所述P种充电协议在所述至少两条第一记录中充电识别的统计分析指标,确定所述Q种充电协议。
上述方式下,根据所述P种充电协议在所述至少两条第一记录中充电识别的统计分析指标,可以综合考虑至少两条第一记录,通过具体指标综合考量已执行充电识别的整体情形,从而使得Q种充电协议更加合理。
其中,第二种方式具体可以按照以下几种方式执行:
在一种可能的设计中,根据所述P种充电协议在所述至少两条第一记录中充电识别的识别成功次数,确定第一协议集合;和\或根据所述P种充电协议在所述至少两条第一记录中充电识别的识别失败次数,确定第二协议集合;根据所述第一协议集合和\或所述第二协议集合,确定所述Q种充电协议。
在一种可能的设计中,根据所述P种充电协议在所述至少两条第一记录中充电识别的识别成功率,确定所述Q种充电协议。
在一种可能的设计中,将所述P种充电协议中在所述至少两个时段内充电识别的识别成功次数和\或识别成功率不递减的充电协议,作为第三协议集合;和\或将所述P种充电协议中在所述至少两个时段内充电识别的识别失败次数和\或识别失败率不递增的充电协议,作为第四协议集合;根据所述第三协议集合和\或所述第四协议集合,确定所述Q种充电协议。
上述三种可能的设计中,通过综合考虑P种充电协议在已执行充电识别的至少两条第一记录中的识别成功次数和\或识别失败次数,或者是充电识别的识别成功率,或者是在所述至少两个时段内充电识别成功或失败的变化趋势,预先筛选出一部分预设充电识别条件的充电协议,从而可以增加充电协议选取时的充电识别成功率。
需要说明的是,上述从所述P种充电协议中确定Q种充电协议的方式仅作为示例,还可以有多种其他方式,上述提及的方式并不作为对本申请的限定。
本申请提供一种电子设备的充电方法中,如何确定Q种充电协议中充电协议的选取顺序的实现方式有多种,具体来说:
第一种:
获取至少两条第二记录,所述至少两条第二记录为所述电子设备与所述充电设备对所述P种充电协议已执行充电识别的记录,至少两条第二记录可以为至少两条第一记录,根据Q种充电协议对应充电识别成功的第二记录在所述至少两条第二记录的生成顺序,确定 从所述Q种充电协议中选取充电协议的选取顺序。
需要说明的是,第二记录与第一记录的实质相同,第二记录的生成方式等可以参照第一记录。至少两条第二记录可以是至少两条第一记录,也可以不是至少两条第一记录,如与至少两条第一记录的不同生成时间或不同充电协议的记录。
上述方式下,通过抽样选取至少两条第二记录,可以根据Q种充电协议对应充电识别成功的第二记录在所述至少两条第二记录的生成顺序,从而反映出充电识别成功的先后顺序,从而增加了从所述Q种充电协议中选取充电协议的效率。
第二种:
获取至少两条第二记录,所述至少两条第二记录为所述电子设备与所述充电设备对所述P种充电协议已执行充电识别的记录;根据所述Q种充电协议在所述至少两条第二记录中充电识别的统计分析指标和\或所述Q种充电协议的充电效率指标,确定从所述Q种充电协议中选取充电协议的选取顺序。
上述方式下,通过综合考虑所述至少两条第二记录中充电识别的统计分析指标和\或所述Q种充电协议的充电效率指标,从而可以优先选取符合统计分析指标和\或充电效率指标的充电协议。
具体来说,第二种方式中,确定选取顺序的实现方式可以如下:
在一种可能的设计中,针对所述Q种充电协议中任一种充电协议,根据该充电协议的统计分析指标对应的第一评分值和第一权重值,以及该充电协议的充电效率指标对应的第二评分值和第二权重值,确定该充电协议的综合评分值;根据所述Q种充电协议的综合评分值,确定所述选取顺序。
在一种可能的设计中,将所述Q种充电协议在所述至少两条第二记录中充电识别的识别成功次数或识别成功率从大到小的顺序,或者所述Q种充电协议在所述至少两条第二记录中充电识别的识别失败次数或识别失败率从小到大的顺序,作为所述选取顺序。
在一种可能的设计中,将所述Q种充电协议的充电效率指标从大到小的顺序,作为所述选取顺序。
其中,任一充电协议的充电效率指标为该充电协议的额定充电功率,或者是根据该充电协议的额定充电功率与该充电协议的硬件效率确定的,或者是根据该充电协议在所述至少两条第二记录中记录的平均充电电流确定的。
上述三种可能的设计中,通过综合考虑统计分析指标及其权重值,以及充电效率指标及其权重值,或者考虑充电识别成功或失败的统计分析结果,或者是直接考虑为所述Q种充电协议的充电效率指标从大到小的顺序,从而可以优先选取符合统计分析指标和\或充电效率指标的充电协议,使得充电设备优先进行符合统计分析指标和\或充电效率指标的充电识别过程,增加了电子设备的实际充电效率。
第二方面,本申请实施例还提供一种电子设备。该电子设备包括充电接口、至少一个处理器和存储器;所述充电接口,用于连接供电设备;所述存储器,用于存储一个或多个计算机程序;当所述存储器存储的一个或多个计算机程序被所述至少一个处理器执行时,使得所述电子设备能够实现上述第一方面及其第一方面任一可能设计的方法。
第三方面,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得所述电子设备执行本申请实施例第一方面及其第一方面任一可能设计的方法。
第四方面,本申请实施例的中一种计算机程序产品,包括指令,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行本申请实施例第一方面及其第一方面任一可能设计的方法。
图1为本申请实施例提供的应用场景的示例;
图2为本申请实施例提供的一种手机100的结构示意图;
图3为本申请实施例提供的一种手机100的充电方法的流程示意图;
图4为本申请实施例提供的一种电子设备的充电方法的流程示意图;
图5为本申请实施例提供的另一种手机100的充电方法的流程示意图;
图6为本申请实施例提供的电子设备的结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
本申请实施例涉及两个电子设备,即被充电设备和供电设备,其中被充电设备比如可以是手机、ipad、笔记本电脑等电子设备,供电设备(或者称为充电设备、外部电源等等,本申请实施例对此名称不作限定)与被充电设备连接,为被充电设备供电,在一些场景下,被充电设备还可以为车辆,而供电设备可以为充电桩。为了方便描述下文中将被充电设备称为电子设备,供电设备称为充电设备。
本申请实施例涉及的充电设备,与电子设备连接,可以将充电设备中的电能提供给电子设备。充电设备可以是电源适配器或其他设备,凡是具有对电子设备进行充电功能的设备都可以适用于本申请实施例提供的方案。
需要说明的是,本申请提供的技术方案可以应用在有线充电场景,也可以应用在无线充电场景。在无线充电场景下,充电设备中设置了发射端线圈,电子设备中设置了接收端线圈,通过发射端线圈与接收端线圈之间的磁场耦合作用传输电能,可以实现充电设备向电子设备传输电能。有线充电场景下,电子设备和充电设备通过有线方式(比如通过电源线)连接。
需要说明的是,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“以是一般表示前后关联对象是一种“或”的关系。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同 之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
下文中以应用在有线充电场景为例进行说明,当然在无线充电场景下,其实现原理和在有线充电场景下的实现原理类似。
参见图1所示,为本申请实施例提供的两种应用场景的示例。如图1的(a)所示,该场景中包括电子设备100(以手机为例)和充电设备200(以手机的充电器)为例。该场景中,电子设备100与充电设备200连接之后,充电设备200与外部的电源(比如家用电)连接,充电设备200从家用电获取电能,然后将电能提供给电子设备100。
应理解,图1的(a)中,以电子设备100和充电设备200通过有线的方式连接为例,实际上,电子设备100还可以通过无线的方式与充电设备200连接。充电设备200从家用电获取电能,然后将电能提供给电子设备100。
如图1的(b)所示,该场景中包括电子设备100(以手机为例)和充电设备200(以充电宝为例)为例。该场景中,手机与充电宝连接之后,充电宝将存储的电能提供给手机。
本申请实施例的技术方案可以适用于上述两种应用场景,或者其他的应用场景,本申请实施例不作限定。
本申请实施例中,电子设备可以是指向用户提供语音和/或数据连通性的设备,例如可以包括具有无线连接功能的手持式设备、或连接到无线调制解调器的终端设备。该终端设备可以经无线接入网(radio access network,RAN)与核心网进行通信,与RAN交换语音和/或数据。该终端设备可以包括用户设备(user equipment,UE)、无线终端设备、移动终端设备、订户单元(subscriber unit)、订户站(subscriber station)、移动站(mobile station)、移动台(mobile)、远程站(remote station)、接入点(access point,AP)、远程终端设备(remote terminal)、接入终端设备(access terminal)、用户终端设备(user terminal)、用户代理(user agent)、或用户装备(user device)等。例如,可以包括移动电话(或称为“蜂窝”电话)、移动电脑、平板电脑、个人数字助理(personal digital assistant,PDA)、媒体播放器、智能电视、穿戴式设备(例如智能手表、智能头盔或智能手环等)、路由器,机顶盒,音箱,手机,平板等,以及上述两项或两项以上的组合等。电子设备还可以是车载系统,比如电动车等。
以下介绍图1所示的场景中的电子设备100、用于这样的电子设备的图形用户界面(graphical user interface,GUI)、和用于使用这样的电子设备的实施例。在本申请一些实施例中,电子设备100可以是包含内置电池的便捷式终端,诸如手机、平板电脑等,也可以是不包含内置电池的终端,本申请实施例不作限定。上述电子设备100的示例性实施例包括但不限于搭载iOS、Android、Microsoft或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,例如数码相机。还应当理解的是,在本申请其他一些实施例中,上述电子设备100也可以不是便携式电子设备,而是台式计算机等。
通常情况下,电子设备100可以支持多种应用。比如以下应用中的一个或多个:相机应用、即时消息收发应用、照片管理应用等。其中,即时消息收发应用可以有多种。比如微信、腾讯聊天软件(QQ)、WhatsApp Messenger、连我(Line)、照片分享(instagram)、Kakao Talk、钉钉等。用户通过即时消息收发应用,可以将文字、语音、图片、视频文件 以及其他各种文件等信息发送给其他联系人;或者,用户可以通过即时消息收发应用实现与其他联系人的视频或音频通话。
下文以电子设备100是手机100为例,且以手机具有内置电池为例进行说明,图2示出了手机100的结构示意图。
手机100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括指纹传感器180H、触摸传感器180K。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是手机100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
USB接口130是符合USB标准规范的接口,具体可以是迷你(mini)USB接口,微型(micro)USB接口,USB类型C(USB Type C)接口等。USB接口130可以用于连接电源适配器为手机100充电,也可以用于手机100与外围设备之间传输数据。当手机100通过USB接口130与充电设备(比如电源适配器)连接时,手机100可以通过USB接口130与电源适配器传输电能。具体而言,手机100的USB接口130(比如USB type-c接口)中的配置信号线(configuration channel,cc)会检测电源适配器发送的电流,实现手机100和电源适配器之间的电流传输。
需要说明的是,图1中以手机100通过USB接口130与电源适配器连接为例,在实际应用中,手机100还可以通过其它方式与电源适配器连接,比如,在无线充电场景下,手机100通过发射端线圈与电源适配器中的接收端线圈之间的磁场耦合作用传输电能,或者有线充电场景下,通过其它类型充电接口与电源适配器连接传输电能。因此,本申请实施例不限定手机100与电源适配器之间的连接方式。
应理解,当手机100通过USB接口130与电源适配器连接时,手机100与电源适配器之间的电能传输可以通过USB接口130实现;当手机100使用无线充电的方式进行充电,比如手机100通过蓝牙连接的方式与电源适配器无线连接,这样的话,手机100与电源适配器之间的电能传输可以通过蓝牙传输。手机100与电源适配器之间的电能传输过程包括手机100识别电源适配器的供电能力等过程,具体内容在后文介绍。其中,电源适配器和 手机100可以支持相同的协议,比如充电协议(power delivery protocol,PDP)、超级快充协议(super charging protocol,SCP)、快速充电协议(fast charging protocol,FCP)等。电协议还可以分为私有充电协议和公有充电协议。私有充电协议如SCP,公有充电协议如(universal fast charging specification,UFCS)融合快速充电技术规范和电池充电规范1.2版本(battery charging specification revision 1.2,BC1.2)。
下面以图1的(a)所示的应用场景为例,介绍手机100的充电过程。
电源适配器与外部的电源(比如家用电等)连接,从外部的电源(比如家用电等)处获取电能,然后将获取的电能通过USB接口130输入到手机100(比如输入到手机100中的充电管理模块140)。充电管理模块140用于管理充电过程。比如,充电管理模块140用于决定将从USB接口130接收的电能提供给电源管理模块141还是提供给电池142。电源管理模块141接收电池142和/或充电管理模块140输入的电能,为处理器110,内部存储器121,通过外部存储器接口120为外部存储器,显示屏194,摄像头193,和无线通信模块160等外围部件供电。比如,当手机100未与电源适配器连接时,电源管理模块141接收电池142输入的电能,为各个部件供电。当手机100与电源适配器连接并进行充电时,电源管理模块141接收充电管理模块140输入的电能,为各个部件供电,当然,当手机100与电源适配器连接并进行充电时,电源管理模块141也可以接收电池142输入的电能,为各个部件供电。需要说明的是,电源管理模块141为各个部件供电可以有先后顺序,比如先为处理器110供电,然后为其它部件供电,当电源管理模块141为处理器110供电,处理器110启动之后,可以通知电源管理模块141为其它部件中的哪些部分供电,或者不为哪些部件供电等。
因此,手机100通过电源适配器与外部的电源(比如家用电)连接后,充电的过程可以如下:
电源适配器接收外部的电源的电能后,通过USB接口130将电能输入给充电管理模块140。充电管理模块140一方面为电池142蓄电,另一方面为电源管理模块141提供输入电能;或者,充电管理模块140仅为电池142蓄电,电源管理模块141再从电池142获取电能为各个部件(比如处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等)供电。
需要说明的是,电源管理模块141可以和处理器110连接,处理器110可以通过电源管理模块141决定为哪些部件供电,比如,手机100以较低功耗的工作模式开机时,处理器110确定显示屏194需要供电,无线通信模块160不需要供电,则电源管理模块141为显示屏194供电,不为无线通信模块160供电,具体内容将在后文介绍。
电源管理模块141可以提供json配置接口,json配置接口可配置不同产品的策略开关,举例来说,策略开关可以为历史数据清空开关,这是避免出现某版本软件错误导致充电协议无法识别的情况。
应理解,当手机100未连接电源适配器时,手机100可以通过电池142中储存的电能来为各个器件供电。
手机100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160等实现。天线1和天线2用于发射和接收电磁波信号。手机100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使 用。
移动通信模块150可以提供应用在手机100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在手机100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,手机100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
手机100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机100可以包括N个显示屏194,N为大于1的正整数。
摄像头193用于捕获静态图像或视频。摄像头193可以包括至少一个前置摄像头和/或至少一个后置摄像头。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。 处理器110通过运行存储在内部存储器121中的指令,从而执行手机100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,以及至少一个应用程序(比如相机应用,微信应用等)的软件代码等。存储数据区可存储手机100使用过程中所产生的数据(比如图像、视频等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。具体地,内部存储器121可以存储本申请实施例提供的开机控制方法的软件模块/代码,当处理器110运行所述软件模块/代码时,执行相应的流程步骤。内部存储器121还可以存储预设电压、预设电流、预设功率等取值。
外部存储器接口120可以用于连接外部存储卡,例如微型(micro)数字安全(secure digital,SD)卡,实现扩展手机100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
当然,本申请实施例提供的开机控制方法的软件模块/代码也可以存储在外部存储器中,处理器110可以通过外部存储器接口120运行所述软件模块/代码,执行相应的流程步骤。手机100中的预设电压、预设电流、预设功率等取值也可以存储在外部存储器中。
手机100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音、语音通话等。
指纹传感器180H用于采集指纹。手机100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于手机100的表面,与显示屏194所处的位置不同。
当然,传感器模块180还可以包括其它传感器,比如压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,温度传感器,环境光传感器,骨传导传感器等,本申请实施例对此不限定。
按键190包括开机键,音量键等。按键190可以是机械按键,也可以是触摸式按键。手机100可以接收按键输入,产生与手机100的用户设置以及功能控制有关的键信号输入。本申请实施例中的开机指令、确认指令等可以通过安检190来输入。当然也可以通过显示屏194来输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机100的接触和分离。
可以理解的是,图2所示的结构并不构成对手机100的具体限定。在本申请另一些实施例中,手机100可以包括比图2示更多或更少的部件,或者组合某些部件,或者拆分某 些部件,或者不同的部件布置。图2示的部件可以以硬件,软件或软件和硬件的组合实现。
电子设备的充电方法
下面介绍手机100的充电流程,如图3所示,具体充电流程如下:
步骤301:手机100与电源适配器连接。
步骤302:手机100进行充电协议的充电识别。
充电识别过程(也可以称为协议握手过程)指手机100与电源适配器之间相互确认充电协议的过程,手机100与电源适配器可以共同支持多种充电协议,手机100与电源适配器在其中一种充电协议进行充电识别成功后,才能进入充电状态。充电识别过程具体可以为手机100获取来自电源适配器的充电协议握手包时,确定手机中存储的充电协议中与充电协议握手包匹配的充电协议,手机100根据与充电协议握手包匹配的充电协议,进行应答,手机100向电源适配器发送特定消息或读取电源适配器的标识,若收到电源适配器的回复消息或读取到的电源适配器的标识为符合手机100侧的预期值,则说明充电识别成功,手机100也可以直接选取充电协议向电源适配器发送该充电协议对应的特定消息或读取电源适配器的标识。
待手机100进行充电协议的充电识别成功后,执行步骤303。
步骤303:手机100进入充电状态。
步骤304:手机100充电完成或与电源适配器正常断开。
其中,图3示出的流程对于其他电子设备也同样适用。
对于多种充电协议,手机100通过不断地切换充电协议去进行充电识别,固然可以最终对某个充电协议也充电识别成功。然而,出于电源适配器老旧等原因,可能出现充电协议支持但充电识别不通过的情况。而在充电识别成功之前手机100并不能进入充电状态,在充电识别期间会持续损失功率。因此,如何让电子设备迅速匹配到合适的充电协议,以及如何减少终端设备在充电识别期间的损失功率,是至关重要的。
为了使得电子设备迅速地匹配到合适的充电协议,需要对充电协议做更加合理、精准的选取。参见图4,为本申请实施例提供的电子设备的充电方法的流程示意图。该方法可以应用于上述图1所示的或者与图1功能结构类似的电子设备上,即该方法可由电子设备中的各个硬件部分结合相应的软件程序来执行,可以按照以下步骤执行:
步骤401:获取至少两条第一记录。
步骤402:根据所述至少两条第一记录,从所述P种充电协议中确定Q种充电协议。
步骤403:从所述Q种充电协议中选取充电协议,根据选取到的充电协议对所述电子设备充电识别,直至选取到与所述电子设备充电识别成功的目标充电协议,并根据所述目标充电协议对所述电子设备充电。
所述至少两条第一记录为电子设备与充电设备对P种充电协议已执行充电识别的记录,至少两条第一记录既可以是一个时段内连续记录的所有充电识别的记录,也可以是一个时段内的部分充电识别的记录。
P种充电协议为电子设备与充电设备共同支持的充电协议。电子设备中存储有S个充电协议(即电子设备支持的充电协议),S大于或等于P,那么P种充电协议可以按照以下方式获得:以手机100与电源适配器为例,电源适配器与手机100连接后,若手机100与电源适配器对S个充电协议中的任一充电协议进行充电识别成功,则记录电源适配器的标识,以及记录该充电识别成功的充电协议,标记该充电识别成功的充电协议为电子设备与 充电设备共同支持的充电协议,S个充电协议中的充电协议都进行上述过程,得到S个充电协议中电子设备与充电设备共同支持的充电协议,便能得到P种充电协议,也可以从中选取部分充电协议作为P种充电协议。
针对任一所述至少两条第一记录中第一记录,该第一记录中可以记录对第一充电协议一次充电识别的成功或失败结果(对第一充电协议充电识别成功的结果可以称为合法记录,对第一充电协议充电识别失败的结果可以称为非法记录),也可以记录该次充电协议识别的充电识别时长以及充电识别后的平均充电电流,第一充电协议为所述P种充电协议中任一种充电协议。其中,充电识别的成功或失败可以按以下定义:充电识别成功为充电识别过程中收到已连接通知并在预设时长内有持续电流的状态;充电识别过程中出现收到已连接通知但无已断开通知的异常状态,或反复连接后无电流的异常状态,则记录该次充电识别为失败。需要说明的是,上述充电识别成功或失败的定义仅作为示例,在一些实施例中,还可以设置充电识别成功或失败的其他判定方式,举例来说,可以根据充电电流和充电电压进行判定,如对任一充电协议开始充电识别起,若在预设时长后,对该充电协议的充电电流仍小于充电电流阈值,则确定对该充电协议充电识别失败,反之则确定对该充电协议充电识别成功,根据充电电压的判定同理。
第一记录生成方式可以为:在电子设备执行了充电识别后,电子设备的充电驱动软件向充电应用(如native服务)发送通知信息,充电设备根据通知信息生成第一记录。电子设备中可以只有一个充电设备的充电识别的记录,也可以有多个充电设备的充电识别的记录,可以用通过不同的充电设备的标识来区分不同的充电设备的充电识别的记录,充电设备的标识以及充电识别的结果。其中,充电设备的标识可以按照以下方式生成:如通过充电设备的产品序列码(serial number,SN)与供应商身份标识(vendor id,VID)生成哈希值,作为充电设备的标识。
另外,至少两条第一记录的最大数量,或者每种充电协议的第一记录数量可以限定为固定容量,也可以限定最低数量阈值,最多只维持固定容量的第一记录,举例来说,固定容量可以设置为100条,那么充电设备中可以只保存时间顺序上最新的100条第一记录,若又有新生成的第一记录,那么可以将最早的第一记录删除,添加新生成的第一记录,从而使得第一记录维持100条的数量,再如最低数量阈值为10,那么在电子设备中存储的第一记录的数量小于10时,可以不获取,待第一记录的数量大于或等于10时再获取,作为至少两条第一记录。
所述P种充电协议为所述电子设备与所述充电设备共同支持的充电协议。电子设备支持的充电协议和充电设备支持的充电协议有相同的,也可能有不同的,P种充电协议是既被电子设备支持又被充电设备支持的充电协议。
所述Q种充电协议满足预设充电识别条件,P,Q为正整数,且P大于或等于Q,也可以限定P大于Q,那么当在步骤402中应用时,便可以确保从Q种充电协议中筛选掉了充电协议,在步骤403中应用时,可以在更小的充电协议的范围内执行,提升了选取出目标充电协议的效率。
需要说明的是,从Q种充电协议中选取充电协议时,每次只能选取一个充电协议,并根据选取到的这个充电协议对电子设备进行充电识别,当选取到的充电协议对电子设备进行充电识别成功时,说明选取到的充电协议就是目标充电协议,便可以根据目标充电协议对电子设备充电。
本申请实施例提供的电子设备的充电方法中,从所述P种充电协议中确定Q种充电协议的实现方式可以有多种,这些实现方式可以应用于步骤402,具体可以如下:
第一种:
抽样选取至少两条第一记录中第一记录集合,将第一记录集合中充电识别成功的充电协议,作为Q种充电协议。
举例来说,P种充电协议为10种充电协议,至少两条第一记录为500条第一记录,随机选取其中200条第一记录,200条第一记录中包括7种充电识别成功的充电协议,那么Q为7,这7种充电识别成功的充电协议便是Q种充电协议。再如,为了选取第一记录集合更加均匀,还可以按设定步长来选取第一记录,举例来说,可以按照时间由近及远的顺序,选取步长为10,选取第1条、第11条、第21条…第491条第一记录,这49条记录中包括5种充电识别成功的充电协议,那么Q为5,这5种充电识别成功的充电协议便是Q种充电协议。
第二种:
根据所述P种充电协议在所述至少两条第一记录中充电识别的统计分析指标,确定所述Q种充电协议。
至于根据哪些统计分析指标,以及如何确定所述Q种充电协议,可以基于需求灵活设置,具体来说可以如下:
第(1)种方式:
步骤(1-1):根据所述P种充电协议在所述至少两条第一记录中充电识别的识别成功次数,确定第一协议集合。和\或
步骤(1-2):根据所述P种充电协议在所述至少两条第一记录中充电识别的识别失败次数,确定第二协议集合。
步骤(1-3):根据所述第一协议集合和\或所述第二协议集合,确定所述Q种充电协议。
步骤(1-1)以及步骤(1-2)可以通过设置阈值来确定相应协议集合,比如步骤(1-1)中可以将识别成功次数大于成功次数阈值的充电协议作为第一协议集合,或者按识别成功次数从大到小的顺序选前面Q种充电协议作为第一协议集合;相应地,步骤(1-2)中也可以将识别失败次数小于失败次数阈值的充电协议作为第二协议集合,或者按识别失败次数从小到大的顺序选前面Q种充电协议作为第二协议集合,可选的,失败次数阈值为1。
步骤(1-1)和步骤(1-2)可以择一执行,也可以均执行,若步骤(1-1)和步骤(1-2)择一执行,那么便仅根据择一执行得到的协议集合确定所述Q种充电协议,比如只执行步骤(1-1),那么便根据第一协议集合,确定所述Q种充电协议,可以将第一协议集合作为Q种充电协议;相应地,若步骤(1-1)和步骤(1-2)均执行,可以根据第一协议集合和第二协议集合,确定所述Q种充电协议,如将第一协议集合和第二协议集合的交集,作为所述Q种充电协议。
值得一提的是,步骤(1-1)和步骤(1-2)的实质并不相同,对于识别失败次数少的充电协议,该充电协议的识别成功次数未必就高。举例来说,P种充电协议为充电协议A、充电协议B和充电协议C,至少两条第一记录为500条第一记录,其中,充电协议A的识别成功次数181次,识别失败次数19次,充电协议B的识别成功次数160次,识别失败次数8次,充电协议C的识别成功次数120次,识别失败次数12次。
若按识别成功次数选2个充电协议,则是充电协议A和充电协议B;若按识别失败次数选2个充电协议,则是充电协议B和充电协议C。
第(2)种方式:
根据所述P种充电协议在所述至少两条第一记录中充电识别的识别成功率,确定所述Q种充电协议。
上述步骤可以通过设置阈值来确定Q种充电协议,比如上述步骤中可以将识别成功率大于成功率阈值的充电协议作为Q种充电协议。
需要说明的是,由于充电协议的成功率和失败率之和为1,因此按照识别成功率和识别失败率确定所述Q种充电协议的步骤实质上一致。
第(3)种方式:
统计分析指标可以考虑时段划分,所述至少两条第一记录可以包括在至少两个时段内的第一记录时,可以如以下步骤所述:
步骤(3-1):将所述P种充电协议中在所述至少两个时段内充电识别的识别成功次数和\或识别成功率不递减的充电协议,作为第三协议集合。和\或
步骤(3-2):将所述P种充电协议中在所述至少两个时段内充电识别的识别失败次数和\或识别失败率不递增的充电协议,作为第四协议集合。
步骤(3-3):根据所述第三协议集合和\或所述第四协议集合,确定所述Q种充电协议。
需要说明的是,至少两个时段可以为至少两条第一记录,也可以为至少两条第一记录中选取的两个时段以上的第一记录,至少两个时段可以设置大于时段个数阈值,如考察在3个时段内充电识别的识别成功次数。
步骤(3-1)和步骤(3-2)可以择一执行,也可以均执行,由于步骤(3-1)或步骤(3-2)中也包括多种方案,也可以按步骤(3-1)或步骤(3-2)中的某一种方案执行,若步骤(3-1)和步骤(3-2)择一执行,那么便仅根据择一执行得到的协议集合确定所述Q种充电协议,比如只执行步骤(3-1)中的一种方案,那么将所述P种充电协议中在所述至少两个时段内充电识别的识别成功次数不递减的充电协议,作为Q种充电协议;相应地,若步骤(3-1)和步骤(3-2)均执行,可以根据第三协议集合和第四协议集合,确定所述Q种充电协议,如将第三协议集合和第四协议集合的交集,作为所述Q种充电协议。
由于一次性只能选取一个充电协议进行充电识别,若选取到的充电协议对所述电子设备充电识别成功,那该充电协议便是目标充电协议,否则,按照继续选取下一充电协议进行充电识别,因此选取充电协议的顺序对于能否迅速选取到目标充电协议至关重要。本申请实施例提供的电子设备的充电方法中,如何确定Q种充电协议中充电协议的选取顺序的实现方式有多种,这些实现方式可以应用于步骤403,具体可以如下:
第一种:
获取至少两条第二记录,所述至少两条第二记录为所述电子设备与所述充电设备对所述P种充电协议已执行充电识别的记录,至少两条第二记录可以为至少两条第一记录,根据Q种充电协议对应充电识别成功的第二记录在所述至少两条第二记录的生成顺序,确定从所述Q种充电协议中选取充电协议的选取顺序。
举例来说,Q种充电协议为:充电协议A、充电协议B和充电协议C,至少两条第二记录按照生成顺序(先生成的在前)排列为:B,成功;A,失败;C,成功;A,成功;那么Q种充电协议对应充电识别成功的第二记录在所述至少两条第二记录的生成顺序便是充电协议B、充电协议C、充电协议A。
当上述方式应用于步骤403时,可以将Q种充电协议对应充电识别成功的第二记录在所述至少两条第二记录的生成顺序的逆序,作为从所述Q种充电协议中选取充电协议的选取顺序,那么上述例子中,从所述Q种充电协议中选取充电协议的选取顺序便是充电协议A、充电协议B、充电协议C,即优先选取时间临近且充电识别成功的充电协议。
第二种:
获取至少两条第二记录,所述至少两条第二记录为所述电子设备与所述充电设备对所述P种充电协议已执行充电识别的记录;根据所述Q种充电协议在所述至少两条第二记录中充电识别的统计分析指标和\或所述Q种充电协议的充电效率指标,确定从所述Q种充电协议中选取充电协议的选取顺序。
第二记录与第一记录的实质相同,第二记录的生成方式等可以参照第一记录。至少两条第二记录可以是至少两条第一记录,也可以不是至少两条第一记录,如与至少两条第一记录的不同生成时间或不同充电协议的记录。
需要说明的是,任一充电协议的充电效率指标为该充电协议的额定充电功率,或者是根据该充电协议的额定充电功率与该充电协议的硬件效率确定的,或者是根据该充电协议在所述至少两条第二记录中记录的平均充电电流确定的。
其中,由于不同充电协议使用的硬件充电通道不一定相同,在充电设备对电子设备充电后,实际充电功率可能并不是额定充电功率,而实际充电功率与额定充电功率的比值便是硬件效率。
具体来说,确定选取顺序的实现方式可以如下:
第(1)种方式:
针对所述Q种充电协议中任一种充电协议,根据该充电协议的统计分析指标对应的第一评分值和第一权重值,以及该充电协议的充电效率指标对应的第二评分值和第二权重值,确定该充电协议的综合评分值;根据所述Q种充电协议的综合评分值,确定所述选取顺序。
第(1)种方式可以应用于步骤403,举例来说,统计分析指标为充电协议在至少两条第二记录中的识别成功率,充电效率指标为额定充电功率,第一权重值为0.6,第二权重值为0.4;第一评分值为充电协议在至少两条第二记录中的识别成功率乘100,如第二充电协议为Q种充电协议中任一种充电协议,第二充电协议在至少两条第二记录中的识别成功率为0.90,那么第一评分值便是90,第二评分值是第二充电协议的额定充电功率与Q种充电协议中最高额度充电功率的比值乘100,如Q种充电协议的额度充电功率包括25W、20W、15W,第二充电协议的额定充电功率为15W,那么第二评分值便是60,所以第二充电协议的综合评分值为78。在计算出Q种充电协议的综合评分值后,可以按照综合评分值从大到小的选取顺序选取Q种充电协议。
上述例子仅作为示例描述第(1)种方式,在选取不同的统计分析指标、充电效率指标以及评分机制后,均可以按照相应方式计算综合评分值,并确定选取顺序。
第(2)种方式:
将所述Q种充电协议在所述至少两条第二记录中充电识别的识别成功次数或识别成功率从大到小的顺序,或者所述Q种充电协议在所述至少两条第二记录中充电识别的识别失败次数或识别失败率从小到大的顺序,作为所述选取顺序。
值得一提的是,所述Q种充电协议在所述至少两条第二记录中识别成功率从大到小的顺序与相应识别失败率从小到大的顺序实质相同;而所述Q种充电协议在所述至少两条第 二记录中识别成功次数从大到小的顺序与相应识别失败次数从小到大的顺序的实质并不相同。
第(3)种方式:
将所述Q种充电协议的充电效率指标从大到小的顺序,作为所述选取顺序。
举例来说,可以将Q种充电协议的平均充电电流从大到小的顺序,作为所述选取顺序。
本申请实施例中,通过对充电设备的充电识别记录,分析各充电协议的历史充电识别情况,对充电识别异常的充电协议进行排除,减少了一部分无法充电或频繁断充的异常情形。从而在选取充电协议的过程中,实现了充电设备与电子设备之间充电协议的快速选择,可以更迅速地匹配到合适的充电协议,提升了用户体验。
上述从所述P种充电协议中确定Q种充电协议的实现方式,以及确定从Q种充电协议中选取充电协议顺序的实现方式,均可应用于充电设备的充电流程,以手机100以及步骤(1-1)~步骤(1-3)为例,当步骤(1-1)~步骤(1-3)应用于手机100时,以按识别成功次数选取充电协议为例,手机100的充电方法的流程可以如图5所示,具体如下:
步骤501:手机100与电源适配器连接。
步骤502:手机100获取电源适配器的标识。
步骤503:确定手机100中保存的第一充电协议充电识别成功的第一记录个数是否大于成功次数阈值。
第一充电协议为P种充电协议中任一种充电协议,若是,执行步骤504,否则,更新第一充电协议,并重新执行步骤503。
步骤504:手机100进入第一充电协议的充电识别。
步骤505:手机100生成第一充电协议的充电识别的第一记录。
步骤506:确定手机100对第一充电协议的充电识别是否成功,若是,执行步骤507,否则,更新第一充电协议,并返回步骤503。
步骤507:手机100进入充电状态。
步骤508:手机100充电完成或与电源适配器正常断开。
需要说明的是,本申请的各个实施方式可以任意进行组合,以实现不同的技术效果。上述本申请提供的实施例中,从电子设备(手机100)作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,电子设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。
下面结合附图介绍本申请实施例提供的装置,以实现本申请上述方法实施例。
如图6所示,本申请另外一些实施例公开了一种电子设备,该电子设备可以包括:充电接口601,一个或多个处理器602,一个或多个存储器603;上述各器件可以通过一个或多个通信总线604连接。其中,一个或多个计算机程序可以被存储在上述存储器603中并被配置为被该一个或多个处理器602执行,该一个或多个计算机程序包括指令,该指令被一个或多个处理器602执行时,可以实现前述的图3~图5所示的方法实施例中记载的全部或部分步骤。
其中,处理器602可以是中央处理器(central processing unit,CPU),或特定应用集 成电路(application-specific integrated circuit,ASIC),可以是一个或多个用于控制程序执行的集成电路,可以是基带芯片,等等。存储器603的数量可以是一个或多个,存储器603可以是只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)或磁盘存储器,等等。
图6所示的电子设备可以是手机、ipad、笔记本电脑、智能电视、穿戴式设备(例如智能手表、智能头盔或智能手环等)和车辆等,当电子设备是车辆时,充电设备可以是充电桩。当图6所示的电子设备是手机时,其结构可以参见图2。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得所述电子设备可以执行包括如前述的图3~图5所示的方法实施例中记载的全部或部分步骤。
本申请实施例还提供一种包含计算机程序产品,包括指令,当所述计算机程序产品在电子设备上运行时,使得所述电子设备可以执行包括如前述的图3~图5所示的方法实施例中记载的全部或部分步骤。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
为了解释的目的,前面的描述是通过参考具体实施例来进行描述的。然而,上面的示例性的讨论并非意图是详尽的,也并非意图要将本申请限制到所公开的精确形式。根据以上教导内容,很多修改形式和变型形式都是可能的。选择和描述实施例是为了充分阐明本申请的原理及其实际应用,以由此使得本领域的其他技术人员能够充分利用具有适合于所构想的特定用途的各种修改的本申请以及各种实施例。
Claims (14)
- 一种电子设备的充电方法,其特征在于,包括:获取至少两条第一记录,所述至少两条第一记录为电子设备与充电设备对P种充电协议已执行充电识别的记录,所述P种充电协议为所述电子设备与所述充电设备共同支持的充电协议;根据所述至少两条第一记录,从所述P种充电协议中确定Q种充电协议,所述Q种充电协议满足预设充电识别条件,P,Q为正整数,且P大于或等于Q;从所述Q种充电协议中选取充电协议,根据选取到的充电协议对所述电子设备充电识别,直至选取到与所述电子设备充电识别成功的目标充电协议,并根据所述目标充电协议对所述电子设备充电。
- 如权利要求1所述的方法,其特征在于,所述根据所述至少两条第一记录,从所述P种充电协议中确定Q种充电协议,包括:根据所述P种充电协议在所述至少两条第一记录中充电识别的统计分析指标,确定所述Q种充电协议。
- 如权利要求2所述的方法,其特征在于,所述根据所述P种充电协议在所述至少两条第一记录中充电识别的统计分析指标,确定所述Q种充电协议,包括:根据所述P种充电协议在所述至少两条第一记录中充电识别的识别成功次数,确定第一协议集合;和\或根据所述P种充电协议在所述至少两条第一记录中充电识别的识别失败次数,确定第二协议集合;根据所述第一协议集合和\或所述第二协议集合,确定所述Q种充电协议。
- 如权利要求2所述的方法,其特征在于,所述至少两条第一记录包括在至少两个时段内的第一记录,所述根据所述P种充电协议在所述至少两条第一记录中充电识别的统计分析指标,确定所述Q种充电协议,包括:将所述P种充电协议中在所述至少两个时段内充电识别的识别成功次数和\或识别成功率不递减的充电协议,作为第三协议集合;和\或将所述P种充电协议中在所述至少两个时段内充电识别的识别失败次数和\或识别失败率不递增的充电协议,作为第四协议集合;根据所述第三协议集合和\或所述第四协议集合,确定所述Q种充电协议。
- 如权利要求2所述的方法,其特征在于,所述根据所述P种充电协议在所述至少两条第一记录中充电识别的统计分析指标,确定所述Q种充电协议,包括:根据所述P种充电协议在所述至少两条第一记录中充电识别的识别成功率,确定所述Q种充电协议。
- 如权利要求1至5任一项所述的方法,其特征在于,还包括:获取至少两条第二记录,所述至少两条第二记录为所述电子设备与所述充电设备对所述P种充电协议已执行充电识别的记录;根据所述Q种充电协议在所述至少两条第二记录中充电识别的统计分析指标和\或所述Q种充电协议的充电效率指标,确定从所述Q种充电协议中选取充电协议的选取顺序。
- 如权利要求6所述的方法,其特征在于,所述根据所述Q种充电协议在所述至少两条第二记录中充电识别的统计分析指标和\或所述Q种充电协议的充电效率指标,确定所述从所述Q种充电协议中选取充电协议的选取顺序,包括:针对所述Q种充电协议中任一种充电协议,根据该充电协议的统计分析指标对应的第一评分值和第一权重值,以及该充电协议的充电效率指标对应的第二评分值和第二权重值,确定该充电协议的综合评分值;根据所述Q种充电协议的综合评分值,确定所述选取顺序。
- 如权利要求6所述的方法,其特征在于,所述根据所述Q种充电协议在所述至少两条第二记录中充电识别的统计分析指标和\或所述Q种充电协议的充电效率指标,确定所述从所述Q种充电协议中选取充电协议的选取顺序,包括:将所述Q种充电协议在所述至少两条第二记录中充电识别的识别成功次数或识别成功率从大到小的顺序,或者所述Q种充电协议在所述至少两条第二记录中充电识别的识别失败次数从小到大的顺序,作为所述选取顺序。
- 如权利要求6所述的方法,其特征在于,所述根据所述Q种充电协议在所述至少两条第二记录中充电识别的统计分析指标和\或所述Q种充电协议的充电效率指标,确定所述从所述Q种充电协议中选取充电协议的选取顺序,包括:将所述Q种充电协议的充电效率指标从大到小的顺序,作为所述选取顺序。
- 如权利要求6至9任一项所述的方法,其特征在于,其中,任一充电协议的充电效率指标为该充电协议的额定充电功率,或者是根据该充电协议的额定充电功率与该充电协议的硬件效率确定的,或者是根据该充电协议在所述至少两条第二记录中记录的平均充电电流确定的。
- 如权利要求1至10任一项所述的方法,其特征在于,所述电子设备为车辆,所述充电设备为充电桩。
- 一种电子设备,其特征在于,包括充电接口,至少一个处理器、存储器;所述充电接口,用于连接供电设备;所述存储器,用于存储一个或多个计算机程序;当所述存储器存储的一个或多个计算机程序被所述至少一个处理器执行时,使得所述电子设备能够实现如权利要求1至11任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1至11任一项所述的方法。
- 一种计算机程序产品,其特征在于,包括指令,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1至11任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111222294.9A CN115995856A (zh) | 2021-10-20 | 2021-10-20 | 一种电子设备的充电方法及电子设备 |
CN202111222294.9 | 2021-10-20 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023065931A1 true WO2023065931A1 (zh) | 2023-04-27 |
Family
ID=85989236
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/119964 WO2023065931A1 (zh) | 2021-10-20 | 2022-09-20 | 一种电子设备的充电方法及电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115995856A (zh) |
WO (1) | WO2023065931A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117220376A (zh) * | 2023-09-15 | 2023-12-12 | 小米汽车科技有限公司 | 充电方法、装置、适配器及存储介质 |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116526704B (zh) * | 2023-05-16 | 2024-05-24 | 湖南旭联科技有限公司 | 多设备自适应无线充电方法、装置、设备及存储介质 |
CN116505628B (zh) * | 2023-06-28 | 2024-01-19 | 深圳市澳博森科技有限公司 | 一种智能多端口适配器充电控制方法及系统 |
CN117498508B (zh) * | 2023-12-29 | 2024-09-24 | 深圳市卓芯微科技有限公司 | 移动设备的快充方法、装置、电子设备以及存储介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050242768A1 (en) * | 2004-04-28 | 2005-11-03 | Pandit Amol S | Method and apparatus for sharing battery charging resources |
KR20120109914A (ko) * | 2011-03-28 | 2012-10-09 | 엘에스전선 주식회사 | 전기자동차 충전시스템 |
CN109217419A (zh) * | 2018-09-21 | 2019-01-15 | 深圳市奥必赢科技有限公司 | 快速充电系统及方法 |
CN110120695A (zh) * | 2019-04-29 | 2019-08-13 | 华为技术有限公司 | 一种充电方法及终端设备 |
CN112448435A (zh) * | 2019-09-03 | 2021-03-05 | 中兴通讯股份有限公司 | 终端设备充电方法、装置和存储介质 |
CN112448423A (zh) * | 2019-08-28 | 2021-03-05 | 北京小米移动软件有限公司 | 充电方法和装置、电子设备、存储介质 |
-
2021
- 2021-10-20 CN CN202111222294.9A patent/CN115995856A/zh active Pending
-
2022
- 2022-09-20 WO PCT/CN2022/119964 patent/WO2023065931A1/zh unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050242768A1 (en) * | 2004-04-28 | 2005-11-03 | Pandit Amol S | Method and apparatus for sharing battery charging resources |
KR20120109914A (ko) * | 2011-03-28 | 2012-10-09 | 엘에스전선 주식회사 | 전기자동차 충전시스템 |
CN109217419A (zh) * | 2018-09-21 | 2019-01-15 | 深圳市奥必赢科技有限公司 | 快速充电系统及方法 |
CN110120695A (zh) * | 2019-04-29 | 2019-08-13 | 华为技术有限公司 | 一种充电方法及终端设备 |
CN112448423A (zh) * | 2019-08-28 | 2021-03-05 | 北京小米移动软件有限公司 | 充电方法和装置、电子设备、存储介质 |
CN112448435A (zh) * | 2019-09-03 | 2021-03-05 | 中兴通讯股份有限公司 | 终端设备充电方法、装置和存储介质 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117220376A (zh) * | 2023-09-15 | 2023-12-12 | 小米汽车科技有限公司 | 充电方法、装置、适配器及存储介质 |
CN117220376B (zh) * | 2023-09-15 | 2024-06-04 | 小米汽车科技有限公司 | 充电方法、装置、适配器及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN115995856A (zh) | 2023-04-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023065931A1 (zh) | 一种电子设备的充电方法及电子设备 | |
CN112449328B (zh) | 一种蓝牙搜索方法、系统及相关装置 | |
WO2020041952A1 (zh) | 一种基于快递消息控制快递柜的方法及电子设备 | |
CN110896528B (zh) | 操作电子装置的功能和资源的方法 | |
WO2020233538A1 (zh) | 一种接入无线局域网的方法和终端 | |
CN110809297B (zh) | 一种数据传输方法及电子设备 | |
WO2021185105A1 (zh) | SIM卡和eSIM卡的切换方法及电子设备 | |
US10009838B2 (en) | Access point connection method and electronic device thereof | |
CN112789934B (zh) | 一种蓝牙服务的查询方法及电子设备 | |
WO2021037146A1 (zh) | 一种移动终端的文件共享方法及设备 | |
US12120541B2 (en) | Method for processing communication range information and terminal | |
WO2021098533A1 (zh) | 一种连接建立方法及终端设备 | |
CN113660650B (zh) | 设备回连的方法及相关装置 | |
CN110602312B (zh) | 通话方法、电子设备及计算机可读存储介质 | |
WO2020082373A1 (zh) | 一种通信系统的切换方法和终端设备 | |
EP4135470A1 (en) | Wireless connection providing system, method, and electronic apparatus | |
CN113973398A (zh) | 无线网络连接方法、电子设备及芯片系统 | |
WO2019214420A1 (zh) | 业务调度方法、终端及网络设备 | |
US20230239218A1 (en) | Data Transmission Method and Electronic Device | |
WO2022247638A1 (zh) | 一种手写笔的连接控制方法和电子设备 | |
CN110798830B (zh) | 一种失联设备查找方法及设备 | |
CN114465968A (zh) | 一种不同设备之间的跨应用互联方法及相关装置 | |
CN116016639B (zh) | 链路管理方法、装置及系统 | |
WO2023051204A1 (zh) | 跨设备连接方法、电子设备及存储介质 | |
EP4350482A1 (en) | Device control method and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22882542 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |