CN116501534A - Charging abnormality management method and related device - Google Patents

Charging abnormality management method and related device Download PDF

Info

Publication number
CN116501534A
CN116501534A CN202310763215.8A CN202310763215A CN116501534A CN 116501534 A CN116501534 A CN 116501534A CN 202310763215 A CN202310763215 A CN 202310763215A CN 116501534 A CN116501534 A CN 116501534A
Authority
CN
China
Prior art keywords
power
electronic device
charging
pin
electronic equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310763215.8A
Other languages
Chinese (zh)
Other versions
CN116501534B (en
Inventor
宁红扬
袁振
李士亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310763215.8A priority Critical patent/CN116501534B/en
Publication of CN116501534A publication Critical patent/CN116501534A/en
Application granted granted Critical
Publication of CN116501534B publication Critical patent/CN116501534B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/28Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0736Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in functional embedded systems, i.e. in a data processing system designed as a combination of hardware and software dedicated to performing a certain function
    • G06F11/0742Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in functional embedded systems, i.e. in a data processing system designed as a combination of hardware and software dedicated to performing a certain function in a data processing system embedded in a mobile device, e.g. mobile phones, handheld devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • General Chemical & Material Sciences (AREA)
  • Electrochemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • Manufacturing & Machinery (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The embodiment of the application provides a charging abnormality management method and a related device, wherein the method comprises the following steps: when the electronic equipment abnormally stops charging, recording the power-down sequence of pins of a charging interface of the electronic equipment; uploading data related to abnormal stopping of charging to the cloud; wherein the abnormal stop charge related data includes: and the power-down sequence of the pins of the charging interface and/or the reason for the abnormal stopping of the charging of the electronic equipment, wherein the reason for the abnormal stopping of the charging of the electronic equipment and the power-down sequence of the pins of the charging interface have a preset corresponding relation. Therefore, maintenance personnel or researchers of the electronic equipment can take data such as the power-down sequence of pins of the charging interface, the reason for the abnormal stop of the electronic equipment and the like as reference data, and the reason for the abnormal stop of the electronic equipment can be positioned more rapidly and accurately.

Description

Charging abnormality management method and related device
Technical Field
The application relates to the technical field of terminals, in particular to a charging abnormality management method and a related device.
Background
The electronic device may be equipped with a battery that needs to be charged when the battery is low. After the battery is fully charged, or after the user manually pulls out the charger, the battery of the electronic device may stop charging. In some implementations, in the event that the battery is not fully charged and the user does not unplug the charger, an abnormal stop of the charging of the electronic device may occur.
In some implementations, after the electronic device is abnormally stopped, a professional can detect the reason of the abnormal stop through a special detection instrument, or a researcher in a laboratory can grasp a log stored in a memory of the electronic device, and the reason of the abnormal stop of the electronic device is judged by the grasped log to reproduce the abnormal stop of the electronic device.
However, the foregoing manner may not accurately locate the cause of abnormal charging stop of the electronic device.
Disclosure of Invention
The embodiment of the application provides a charging abnormality management method and a related device, which are applied to the technical field of terminals. Based on the method, after judging that the electronic equipment is abnormally stopped, the electronic equipment can record the power-down sequence of each pin of the charging interface, determine the reason of the abnormal stopping of the electronic equipment according to the power-down sequence of each pin, and report the power-down sequence of each pin and the reason of the abnormal stopping of the electronic equipment to the cloud as reference data for subsequently judging the reason of the abnormal stopping of the electronic equipment.
In a first aspect, an embodiment of the present application proposes a charging anomaly management method. The method comprises the following steps: when the electronic equipment abnormally stops charging, recording the power-down sequence of pins of a charging interface of the electronic equipment; uploading data related to abnormal stopping of charging to the cloud; wherein the abnormal stop charge related data includes: and the power-down sequence of the pins of the charging interface and/or the reason for the abnormal stopping of the charging of the electronic equipment, wherein the reason for the abnormal stopping of the charging of the electronic equipment and the power-down sequence of the pins of the charging interface have a preset corresponding relation. Therefore, maintenance personnel or researchers of the electronic equipment can take the power-down sequence of the pins of the charging interface, the reason for the abnormal stop of the electronic equipment, and other data related to the abnormal stop of the electronic equipment as reference data, so that the reason for the abnormal stop of the electronic equipment can be positioned more rapidly and accurately.
In a possible implementation manner, the preset corresponding relationship includes: the pollution of the charging interface corresponds to the corresponding relation that an external equipment detection pin of the charging interface is powered off before a power supply pin of the charging interface; and/or, the abnormal charger corresponds to the corresponding relation that the forward data transmission pin of the charging interface is powered down before the power supply pin of the charging interface. Therefore, the electronic equipment or the cloud can rapidly and accurately position the reason of abnormal stop charging based on the preset corresponding relation.
In a possible implementation manner, when the electronic device abnormally stops charging, the electronic device also records protocol communication abnormal information, water inlet detection abnormal information and/or adapter abnormal information; the abnormal stop charge related data further includes: protocol communication anomaly information, water inlet detection anomaly information, and/or adapter anomaly information; the preset corresponding relation further comprises: the corresponding relation between the communication abnormality of the charging protocol and the communication abnormality information of the protocol; and/or the corresponding relation between the dirt of the charging interface and the abnormal information of water inlet detection; and/or the corresponding relation between the abnormal charger and the abnormal adapter information. Therefore, the electronic equipment or the cloud can rapidly and accurately position the reason of abnormal stop charging based on the preset corresponding relation.
In a possible implementation manner, when a power pin of the charging interface is electrified, the electrification moment of the power pin is recorded; when the power supply pin of the charging interface is powered down, the power supply pin powering down time is recorded; calculating a first time interval between the last recorded power-on time of the power pin and the last recorded power-off time of the power pin; and when the first time interval is smaller than the first preset time length, determining that the electronic equipment is abnormally stopped from being charged. Therefore, based on the time interval of power on and off of the power pin, when the electronic equipment stops charging, whether the electronic equipment stops charging abnormally can be simply and quickly judged in real time.
In a possible implementation, the first preset duration is related to the second time interval and/or the third time interval; the second time interval comprises a power pin power-on and power-off time interval with the ratio higher than the first preset value in big data, and the big data comprises a plurality of power pin power-on and power-off time intervals; the third time interval comprises a predetermined time interval for manually plugging and unplugging the charger. Therefore, the first preset time length which is accurate and is fit with the reality can be obtained based on the second time interval and the third time interval.
In a possible implementation manner, when the power pin is powered on, recording the power-on time of the power pin includes: when the power pin is electrified, a power management unit PMU of the electronic equipment sends a first interrupt signal to an audio digital signal processor ADSP of the electronic equipment; ADSP detects power-on of the power pin based on the first interrupt signal, and records the power-on time of the power pin; when the power pin is powered down, record the power pin down moment, include: when the power supply pin is powered down, the PMU sends a second interrupt signal to the ADSP; ADSP detects power pin power down based on the second interrupt signal, records power down time of power pin. Thus, the up and down power of the VBUS pin can be quickly detected through the ADSP of the electronic device.
In a possible implementation manner, when the first time interval is smaller than the first preset duration, after determining that the electronic device abnormally stops charging, the method further includes: when the first time interval is smaller than a first preset duration, acquiring the motion state of the electronic equipment; when the electronic device is in a stationary state, it is determined that the electronic device is abnormally stopped from charging. Therefore, the judgment result of whether the electronic equipment is abnormally stopped to charge can be more accurate based on the motion state of the electronic equipment.
In a possible implementation manner, when the first time interval is smaller than the first preset duration, before determining that the electronic device abnormally stops charging, the method further includes: and when the time interval between the first time stamp and the last time stamp is smaller than the second preset duration in the recorded time stamps of the continuous N times of power pin powering-on, determining that the electronic equipment is abnormally stopped from being charged. Thus, whether the electronic device is abnormally stopped or not can be quickly and simply judged in real time based on the time intervals of continuous power-up of a plurality of VBUS.
In a possible implementation manner, when the first time interval is smaller than the first preset duration, before determining that the electronic device abnormally stops charging, the method further includes: and when the recorded power-on times of the power pins are larger than a second preset value within a third preset time, determining that the electronic equipment is abnormally stopped from being charged. Therefore, whether the electronic equipment is abnormally stopped to be charged or not can be judged in real time, quickly and simply based on the power-on times of the VBUS in a certain time.
In a second aspect, embodiments of the present application provide a charging abnormality management device. The charge abnormality management device may be an electronic device, or may be a chip or a chip system in the electronic device. The charge abnormality management device may include a processing unit. The processing unit is configured to implement the first aspect or any method related to processing in any possible implementation manner of the first aspect. When the charge abnormality management is an electronic device, the processing unit may be a processor. The charge abnormality management device may further include a storage unit, which may be a memory. The storage unit is configured to store instructions, and the processing unit executes the instructions stored by the storage unit, so that the electronic device implements a method described in the first aspect or any one of possible implementations of the first aspect. When the charge abnormality management device is a chip or a chip system within an electronic apparatus, the processing unit may be a processor. The processing unit executes instructions stored by the storage unit to cause the electronic device to implement a method as described in the first aspect or any one of the possible implementations of the first aspect. The memory unit may be a memory unit (e.g., a register, a cache, etc.) within the chip, or a memory unit (e.g., a read-only memory, a random access memory, etc.) within the electronic device that is external to the chip.
For example, when the electronic device abnormally stops charging, the processing unit is used for recording the power-down sequence of the pins of the charging interface of the electronic device; the processing unit is used for uploading data related to abnormal stopping of charging to the cloud; wherein the abnormal stop charge related data includes: and the power-down sequence of the pins of the charging interface and/or the reason for the abnormal stopping of the charging of the electronic equipment, wherein the reason for the abnormal stopping of the charging of the electronic equipment and the power-down sequence of the pins of the charging interface have a preset corresponding relation.
In a possible implementation manner, the preset corresponding relationship includes: the pollution of the charging interface corresponds to the corresponding relation that an external equipment detection pin of the charging interface is powered off before a power supply pin of the charging interface; and/or, the abnormal charger corresponds to the corresponding relation that the forward data transmission pin of the charging interface is powered down before the power supply pin of the charging interface.
In a possible implementation manner, when the electronic device abnormally stops charging, the processing unit is further configured to record protocol communication abnormal information, water inlet detection abnormal information, and/or adapter abnormal information; the abnormal stop charge related data further includes: protocol communication anomaly information, water inlet detection anomaly information, and/or adapter anomaly information; the preset corresponding relation further comprises: the corresponding relation between the communication abnormality of the charging protocol and the communication abnormality information of the protocol; and/or the corresponding relation between the dirt of the charging interface and the abnormal information of water inlet detection; and/or the corresponding relation between the abnormal charger and the abnormal adapter information.
In a possible implementation manner, when the power pin of the charging interface of the electronic device is powered on, the processing unit is further configured to record the power-on time of the power pin; when the power supply pin is powered down, the processing unit is also used for recording the power-down time of the power supply pin; the processing unit is further used for calculating a first time interval between the last recorded power-on time of the power pin and the last recorded power-off time of the power pin; and when the first time interval is smaller than the first preset time length, the processing unit is used for determining that the electronic equipment is abnormally stopped from being charged.
In a possible implementation, the first preset duration is related to the second time interval and/or the third time interval; the second time interval comprises a power pin power-on and power-off time interval with the ratio higher than the first preset value in big data, and the big data comprises a plurality of power pin power-on and power-off time intervals; the third time interval comprises a predetermined time interval for manually plugging and unplugging the charger.
In a possible implementation manner, when the power pin is powered on, the power management unit PMU of the electronic device is configured to send a first interrupt signal to the audio digital signal processor ADSP of the electronic device; ADSP detects power-on of the power pin based on the first interrupt signal, and the ADSP is used for recording power-on time of the power pin; when the power supply pin is powered down, the PMU is used for sending a second interrupt signal to the ADSP; ADSP detects power pin power down based on the second interrupt signal, and ADSP is used for recording power down time of power pin.
In a possible implementation manner, when the first time interval is smaller than the first preset duration, the processing unit is further configured to obtain a motion state of the electronic device; the processing unit is used for determining that the electronic device is abnormally stopped from being charged when the electronic device is in a static state.
In a possible implementation manner, when the time interval between the first time stamp and the last time stamp is smaller than the second preset duration in the recorded time stamps of the N power pins.
In a possible implementation manner, when the recorded power-on times of the power pin are greater than the second preset value within the third preset time, the processing unit is used for determining that the electronic equipment is abnormally stopped from being charged.
In a third aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements a method as in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when run, causes a computer to perform the method as in the first aspect.
In a fifth aspect, embodiments of the present application provide a chip comprising a processor for invoking a computer program in a memory to perform a method as described in the first aspect.
It should be understood that, the second aspect to the fifth aspect of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding possible embodiments are similar, and are not repeated.
Drawings
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a pin of a Type-C female provided in an embodiment of the present application;
fig. 3 is a schematic diagram of a pin of a Type-C male provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a software structural block diagram of an electronic device according to an embodiment of the present application;
fig. 6 is a flowchart of a method for managing charging abnormality according to an embodiment of the present application;
FIG. 7 is a bar graph of VBUS pin power up and down time intervals provided by an embodiment of the present application;
fig. 8A is a schematic display diagram of a first electronic device according to an embodiment of the present application;
fig. 8B is a schematic display diagram of a second electronic device according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a charging abnormality management device according to an embodiment of the present application;
fig. 10 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a chip according to an embodiment of the present application.
Detailed Description
In order to clearly describe the technical solutions of the embodiments of the present application, the following simply describes some technical terms and technologies related to the embodiments of the present application.
1. Absolute rest and relative rest
In the embodiment of the application, the absolute rest of the electronic device may refer to that the electronic device has no displacement, for example, a mobile phone placed on an office desk may be considered to be the absolute rest.
A relatively stationary electronic device may refer to a displacement of the electronic device but not a displacement of the electronic device relative to a reference, such as a cell phone placed on a high-speed rail table, which is relatively stationary relative to Gao Tielai.
2. Electronic equipment
The electronic device of the embodiment of the application may be any form of electronic device, for example, the electronic device may include a handheld device with an image processing function, an in-vehicle device, and the like. For example, some electronic devices are: a mobile phone, tablet, palm, notebook, mobile internet device (mobile internet device, MID), wearable device, virtual Reality (VR) device, augmented reality (augmented reality, AR) device, wireless terminal in industrial control (industrial control), wireless terminal in unmanned (self driving), wireless terminal in teleoperation (remote medical surgery), wireless terminal in smart grid (smart grid), wireless terminal in transportation security (transportation safety), wireless terminal in smart city (smart city), wireless terminal in smart home (smart home), cellular phone, cordless phone, session initiation protocol (session initiation protocol, SIP) phone, wireless local loop (wireless local loop, WLL) station, personal digital assistant (personal digital assistant, PDA), handheld device with wireless communication function, public computing device or other processing device connected to wireless modem, vehicle-mounted device, wearable device, electronic device in 5G network or evolving land mobile network (public land mobile network), and the like, without being limited to this embodiment.
By way of example, and not limitation, in embodiments of the present application, the electronic device may also be a wearable device. The wearable device can also be called as a wearable intelligent device, and is a generic name for intelligently designing daily wear by applying wearable technology and developing wearable devices, such as glasses, gloves, watches, clothes, shoes and the like. The wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also can realize a powerful function through software support, data interaction and cloud interaction. The generalized wearable intelligent device includes full functionality, large size, and may not rely on the smart phone to implement complete or partial functionality, such as: smart watches or smart glasses, etc., and focus on only certain types of application functions, and need to be used in combination with other devices, such as smart phones, for example, various smart bracelets, smart jewelry, etc. for physical sign monitoring.
In addition, in the embodiment of the application, the electronic device may also be an electronic device in an internet of things (internet of things, ioT) system, and the IoT is an important component of future information technology development, and the main technical characteristic of the IoT is that the article is connected with a network through a communication technology, so that man-machine interconnection and an intelligent network for internet of things are realized.
The electronic device in the embodiment of the application may also be referred to as: a terminal device, a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent, a user equipment, or the like.
3. For purposes of clarity in describing the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "such as" are used to indicate by way of example, illustration, or description. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
The term "at … …" in the embodiment of the present application may be instantaneous when a certain situation occurs, or may be a period of time after a certain situation occurs, which is not particularly limited in the embodiment of the present application. In addition, the display interface provided in the embodiments of the present application is merely an example, and the display interface may further include more or less content.
Exemplary, fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application.
As shown in fig. 1, an electronic device 100, a charger 101, and a charging wire 102 may be included in the scene, and the electronic device 100 and the charger 101 may be connected through the charging wire 102.
The electronic device 100 and the charging wire 102 are both provided with a charging interface, and the electronic device 100 and the charging wire 102 can be connected through the charging interface. In this embodiment, the charging interface is a universal serial bus Type-C (universal serial bus Type-C, USB Type-C) interface (hereinafter referred to as Type-C interface) for example. The Type-C interface on the electronic device 100 may be referred to as a Type-C socket, and may also be referred to as a Type-C header; the Type-C interface on the charging cord 102 may be referred to as a Type-C plug, and may also be referred to as a Type-C male.
The charger 101 may be connected to a power supply, and the charger 101 may be configured to convert an ac power supply into a dc power, and perform voltage conversion on the dc power, where the converted dc power may be input to the electronic device 100 through the charging wire 102, to charge a battery of the electronic device 100.
As shown in a of fig. 1, after the charger 101 is connected to the power supply, the electronic device may be in a charging state, a first battery icon 104 may be displayed on an upper right corner of a display screen of the electronic device, and a charging icon 105 may also be displayed on the display screen of the electronic device.
As shown in b of fig. 1, after the charger 101 is connected to the power supply, if the battery is not fully charged and the battery is not manually plugged in or out, the electronic device abnormally stops charging, and the second battery icon 106 may be displayed on the upper right corner of the display screen of the electronic device, and the charging icon 105 may not be displayed on the display screen of the electronic device. In some implementations, after the electronic device stops charging, a speaker of the electronic device may emit a notification of the stop of charging, e.g., after the electronic device stops charging, the speaker of the electronic device may emit a notification of "drip" to prompt the user to pause charging; in still other implementations, the indicator light of the electronic device may flash one or more times after the electronic device stops charging, e.g., the indicator light of the electronic device flashes twice after the electronic device stops charging to alert the user to a suspension of charging.
After the abnormal charging stopping phenomenon of the electronic equipment occurs, in some implementations, a professional can detect the reason of the abnormal charging stopping through a special detection instrument, or a researcher in a laboratory can grasp a log stored in a memory of the electronic equipment, and the reason of the abnormal charging stopping of the electronic equipment is judged by the grasped log to reproduce the abnormal charging stopping phenomenon of the electronic equipment.
However, the above-mentioned methods are all performed after a long time after the abnormal charging stop of the electronic device occurs, and have strong hysteresis, when the detection instrument is used for detection, the fault point of the electronic device may not be detected, and the abnormal charging stop phenomenon of the electronic device may not be accurately reproduced by the data such as the log, so that the reason of the abnormal charging stop of the electronic device cannot be accurately determined in the above-mentioned methods.
In view of this, the embodiment of the application provides a charging anomaly management method, on the basis of which, after determining that an abnormal charging stop condition occurs in an electronic device, the electronic device may record a power-down sequence of each pin of a charging interface, determine a cause of abnormal charging stop of the electronic device according to the power-down sequence of each pin, and report the power-down sequence of each pin and the cause of abnormal charging stop of the electronic device to a cloud as reference data for subsequently determining the cause of abnormal charging stop of the electronic device. Therefore, when the abnormal charging stopping phenomenon of the electronic equipment occurs, maintenance staff or research staff can quickly and accurately determine the reason of the abnormal charging stopping based on the cloud reference data.
In order to make the technical solution of the present application clearer and easy to understand, before describing in detail the method for managing charging abnormality provided by the embodiments of the present application, fig. 2 to fig. 3 are combined to illustrate pin distribution and functions of each pin of the charging interface of the electronic device in the embodiments of the present application; with reference to fig. 4, an exemplary description is given of a structural schematic diagram of an electronic device provided in an embodiment of the present application; a software architecture block diagram of an electronic device provided in an embodiment of the present application is illustrated with reference to fig. 5.
Fig. 2 shows a schematic diagram of a Type-C header pin.
As shown in FIG. 2, the Type-C header includes 24 pins, A1-A12, and B1-B12, respectively. Because A1-A12 function similarly to B1-B12, the following description will take pins A1-A12 as an example, each of which functions.
Pins A1, a12: ground (GND) pin.
Pins A2, A3: the data transmission pins, also known as the TX1+ pin, TX 1-pin, may be used to be compatible with USB3.0 and USB3.1.
Pins A4, A9: and the power supply pin is connected with a power supply module in the electronic equipment, so that the electronic equipment supplies power for the Type-C female head, namely the electronic equipment provides VBUS (visual basic unit) for the Type-C female head, and the VBUS pin is also called.
When the VBUS pin is powered on, the VBUS pin outputs voltage to charge the battery of the electronic device, and when the VBUS pin is powered down, the VBUS pin does not output voltage and cannot charge the battery of the electronic device.
Pin A5: the external device detection pin, also called CC1 pin, is used to detect the type of external device. The types of the external device may include: downstream port (downstream facing port, DFP) devices and upstream port (upstream facing port, UFP) devices.
Pins A6, A7: the data transmission pins are also called as a D+ pin or a DP pin, a D-pin or a DN pin and are used for transmitting audio and video streams or files and the like, the electronic equipment can also output voltage signals to the charger through the D+ pin and the D-pin based on a fast charging protocol, and a USB decoding chip built in the charger can judge the voltage which needs to be output by the charger according to the voltage signals so as to rapidly charge the electronic equipment. The VBUS pin generally transmits a charging voltage of not more than 5V in a normal charging mode (no fast charging is used), and the transmitted charging voltage can reach about 20V at maximum in the fast charging mode. Pins A6, A7 may be used to be compatible with USB2.0.
Pin A8: the function expansion pin is also called as SBU1 pin.
Pins a10, a11: the data reception pins, also called RX2+ pin, RX 2-pin, may be used for compatibility with USB3.0 and USB3.1.
The functions of B1-B12 correspond to those of A1-A12, and are not described in detail herein, and B1-B12 may be referred to as: GND, TX2+, TX2-, VBUS, CC2, D+, D-, SBU2, VBUS, RX1+, RX1-, GND.
As can be seen from FIG. 2, the A1-A12 pins correspond to the A layer gold fingers, the B1-B12 pins correspond to the B layer gold fingers, and the A layer gold fingers and the B layer gold fingers are asymmetric at CC1, SBU2, CC2 and SBU1, and the signals are symmetric elsewhere.
Fig. 3 shows a schematic diagram of a Type-C male pin.
As shown in fig. 3, the Type-C male may include: 4 VBUS pins for power, 4 GND pins for ground, two CC pins (CC and Vconn). Type-C plug can also include: 4 pairs of Transmit (TX) pins/Receive (RX) pins, 1 pair of d+ pins/D-pins, a pair of function expansion (SBU 1 and SBU 2) pins.
The CC pins are configuration pins for detecting the connection and forward and reverse insertion directions of the equipment, the Vconn is a pin with oblique symmetry of the CC pins, when one pin confirms CC, the other pin is defined as Vconn, and the Vconn pin can be used for supplying power to eMark wires.
The effect of each pin of the Type-C male head can be referred to the effect of each pin of the Type-C female head, and will not be described here again.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
The electronic device 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 charge management module 140, a power management module (power management unit, PMU) 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identity module (subscriber identification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the 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 reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present invention is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The magnetic sensor 180D may also be referred to as a magnetometer, and the magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
In this embodiment, the electronic device may determine whether the electronic device is in absolute rest or relative rest according to the data detected by the gyro sensor 180B, the magnetic sensor 180D and/or the acceleration sensor 180E, and a specific determination manner is described below.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the invention, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 5 is a software structure block diagram of an electronic device according to an embodiment of the present invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is an application layer (APP), an application framework layer (FWK), an Zhuoyun row (Android run) and system library, a hardware abstraction layer (hardwareabstraction layer, HAL), and a kernel layer, respectively, from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 5, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 5, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The hardware abstraction layer is an interface layer between the operating system kernel and the hardware circuitry that can be used to abstract the hardware. In some embodiments, the hardware abstraction layer includes a hardware abstraction layer interface definition language (hardware abstraction layerinterface definition language, HIDL) interface. The hardware abstraction layer may include: wi-Fi HAL, audio HAL, etc.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
In this embodiment of the present application, the software of the electronic device may further include an audio digital processor (audio digital signal processor, ADSP), where the ADSP may perform information interaction with the kernel layer through pmic_link, and the ADSP may include an intelligent Sensor Hub (Sensor Hub).
In this embodiment of the present application, the Sensor Hub may acquire data detected by sensors such as an acceleration Sensor, a gyroscope Sensor, and a magnetic Sensor, and determine a motion state of an electronic device by combining the data, and the Sensor Hub may further upload the data detected by the sensors to the HAL layer, and provide the data to other levels for code use.
The workflow of the electronic device 100 software and hardware is illustrated below in connection with the scenario of an abnormal stop of the electronic device.
When the electronic equipment is charged, the ADSP can detect the power-on of the VBUS pin and record the power-on time of the VBUS pin, when the electronic equipment is in a halt state, the ADSP can detect the power-off of the VBUS pin and record the power-off time of the VBUS pin, judge whether the electronic equipment is in abnormal state or not based on the detected power-on time and the power-off time of the VBUS pin and the motion state of the electronic equipment determined by the Sensor Hub, after the ADSP determines that the electronic equipment is in abnormal state, the ADSP can record data related to abnormal state charging such as the power-off sequence of each pin of a charging interface and determine the reason of the abnormal state charging of the electronic equipment, and the data such as the power-off sequence of each pin of the charging interface and the reason of the abnormal state charging of the electronic equipment can be sequentially transmitted to a kernel layer, a HAL layer, a An Zhuoyun time and system library, an application frame layer and an application program layer through the ADSP, and finally the cloud is uploaded.
Next, a specific flow of charge anomaly management provided in the embodiment of the present application will be described with reference to fig. 6.
S601, the electronic equipment detects VBUS interruption.
In an embodiment of the present application, the VBUS interrupt detected by the electronic device may include: VBUS pin power-up triggered interrupts (which may be represented by vbus_on) and VBUS pin power-down triggered interrupts (which may be represented by vbus_off).
Specifically, when the electronic device is powered on after being connected to a power supply for supplying power, the VBUS pin of the electronic device is powered on, the PMU of the electronic device may detect the state change of the VBUS pin and trigger an interrupt, the PMU may transmit an interrupt signal to the ADSP, and the ADSP may detect that the VBUS pin of the electronic device is powered on based on the received interrupt signal.
When the user manually disconnects the electronic device from the power supply, or after the electronic device abnormally stops charging, the VBUS pin of the electronic device is powered down, where the user manually disconnects the electronic device from the power supply may include any one of the following conditions: the user manually disconnects the electronic device from the charging wire, the user manually disconnects the charging wire from the charger, or the user manually disconnects the charger from the power supply. After the VBUS pin of the electronic device is powered down, the PMU of the electronic device may detect this state change of the VBUS pin and trigger an interrupt, and the PMU may transmit an interrupt signal to the ADSP, which may detect that the VBUS pin of the electronic device is powered down based on the received interrupt signal.
S602, when the VBUS pin is powered on, recording the power-on time of the VBUS pin.
When the electronic device detects that the VBUS pin is powered on, the electronic device may record the time when the VBUS pin is powered on. In addition, the electronic device may further record the number of times of power-on of the VBUS pin, the number of times of power-on of the VBUS pin recorded by the electronic device may be increased by a, in this embodiment of the present application, the value of a is not limited, for example, the number of times of power-on of the VBUS pin recorded by the ADSP may be increased by 1 each time the VBUS pin is powered on.
S603, when the VBUS pin is powered down, recording the power down time of the VBUS pin.
When the electronic device detects that the VBUS pin is powered down, the electronic device can record the time when the VBUS pin is powered down.
In this embodiment of the present application, the power-on time and the power-off time of the VBUS pin may be recorded by the ADSP of the electronic device.
It is understood that there is no sequence between the steps S602 and S603, and the step S602 may be performed before the step S603 or may be performed after the step S603.
S604, the electronic device calculates the time interval between the last power-up of the VBUS pin and the last power-down of the VBUS pin.
Specifically, the electronic device may calculate, based on the recorded last power-up time of the VBUS pin and the last power-down time of the VBUS pin, a time interval Δt between power-up of the VBUS pin and power-down of the VBUS pin.
S605, judging whether the total time interval of the continuous N times of VBUS pin powering-up is smaller than T_sum.
The electronic device may calculate a total time interval for N consecutive VBUS pin powers on based on the recorded power-up time of the VBUS pin, which may include the following calculation manner.
The first calculation mode is as follows: based on the power-on time of the continuous N times of VBUS pins recorded by the electronic equipment, the electronic equipment can calculate the time interval between the first power-on time and the last power-on time in the power-on time of the N times of VBUS pins so as to obtain the total time interval of the continuous N times of VBUS pin power-on.
The second calculation mode: based on the power-on time of the continuous N VBUS pins recorded by the electronic equipment, the electronic equipment can calculate the time interval t between the first power-on time and the second power-on time in the power-on time of the N VBUS pins 1 Time interval between second power-up time and third power-up timet 2 … …, time interval t between penultimate power-up time and last power-up time N-1 By calculating the time interval t 1 To time interval t N-1 The total time interval for N consecutive VBUS pin powers up can be obtained.
After the electronic device calculates the total time interval of the continuous N times of VBUS pin electrification, the electronic device judges whether the total time interval is smaller than T_sum, wherein T_sum can be a preset duration, and the value range of T_sum can be a value between 1 minute and 2 minutes.
It is understood that the electronic device may also calculate the total time interval of N consecutive VBUS powers up in other ways, which is not specifically limited in the embodiments of the present application.
S606, when the total time interval of the continuous N times of VBUS pin power-up is not less than T_sum, the electronic device judges whether the time interval DeltaT is less than T_min.
The t_min may be obtained based on time interval analysis of power-up and power-down of multiple VBUS pins of multiple electronic devices.
After obtaining the time intervals of powering on and powering off the plurality of VBUS pins of the plurality of electronic devices, the occurrence times of the same time interval can be accumulated, and the value of T_min should be smaller than the time interval of which the occurrence times are more than a first preset value, wherein the value range of the first preset value can be a value between 0.6 and 1.
The VBUS pin power-on and power-off may be caused by manual plug-in or abnormal stop of the electronic device, and it should be noted that, when the electronic device is abnormally stopped, the electronic device may resume charging within a shorter time period to power on the VBUS pin, the shorter time period is usually shorter than the time period of manually plugging the VBUS pin to power on, and in general, the possibility of manually plugging the VBUS pin to power on and off is higher than the possibility of abnormally stopping the charging to power on and off the VBUS pin, so the time interval with a large occurrence number usually corresponds to the time interval of manually plugging the VBUS pin to power on and off, and therefore, the value of t_min should be smaller than the time interval with the largest occurrence number, so that whether the VBUS pin power-on and power-off is due to the manual plug-in or the abnormal stop charging can be effectively distinguished.
Illustratively, FIG. 7 shows a histogram of VBUS pin power up and down time intervals. As shown in fig. 7, the abscissa in fig. 7 represents the time interval of powering up and powering down the VBUS pin, the ordinate represents the number of occurrences of each time interval, and in fig. 7, the time interval of powering up and powering down the VBUS pin greater than or equal to 2000ms occurs most often, so the value of t_min may be a value less than 2000ms, for example, t_min may be 1500ms.
In addition, in order to make the value of t_min more accurate, the research and development personnel of the electronic device can also perform an artificial plug experiment, record the time interval of power on and power off of the VBUS pin when one or more people perform an artificial plug operation on the same electronic device, and/or record the time interval of power on and power off of the VBUS pin when one or more people perform an artificial plug operation on a plurality of electronic devices. Based on the artificial plug-and-pull experiment, a time interval can be determined, which is used to correct the value of t_min.
S607, when the time interval DeltaT is smaller than T_min, judging the motion state of the electronic equipment.
The motion state of the electronic device may include absolute rest and relative rest, among others.
In this embodiment of the present application, the electronic device may determine the motion state of the electronic device through a Sensor Hub, and specifically, the Sensor Hub may acquire related data detected by an acceleration Sensor, a gyroscope Sensor, a magnetic Sensor and/or a Modem base station, and determine the motion state of the electronic device based on the acquired data.
The manner in which the Sensor Hub determines the motion state of the electronic device may include:
in a possible implementation, when the acceleration Sensor detects that the acceleration of the electronic device is less than the second value, the angular velocity of the electronic device detected by the gyro Sensor is less than the third value, the magnetic Sensor detects that the change of the magnetic field around the electronic device is less than the fourth value, and the change of the signal intensity received by the Modem base station is less than the fifth value, the Sensor Hub may determine that the electronic device is in an absolute static state. The second to fifth values may be smaller values because the electronic device is considered to be in an absolute stationary state when the acceleration and angular velocity of the electronic device are small, the magnetic field around the electronic device is changed, and the signal strength received by the Modem base station is changed little.
For example, taking an example that the electronic device is placed on a desk, the acceleration of the electronic device detected by the acceleration Sensor may be 0, the angular velocity of the electronic device detected by the gyroscope Sensor may be 0, the magnetic Sensor detects that the magnetic field around the electronic device is unchanged, the signal intensity received by the Modem base station is unchanged, and the Sensor Hub may determine that the electronic device is in an absolute static state.
In a possible implementation, the Sensor Hub may also determine the motion state of the electronic device by analyzing the change amplitude of the related data detected by the acceleration Sensor, the gyroscope Sensor, the magnetic Sensor and/or the Modem base station.
For example, when the acceleration Sensor detects that the change trend of the acceleration of the electronic device is small, the change of the angular velocity of the electronic device detected by the gyro Sensor is small, the change trend of the magnetic field around the electronic device detected by the magnetic Sensor is small, and the change trend of the signal intensity received by the Modem base station is small, the Sensor Hub may determine that the electronic device is in an absolute stationary state. For example, the above case may correspond to a scenario in which the electronic device is placed on a desk.
When the acceleration Sensor detects that the change trend of the acceleration of the electronic device is small, the change of the angular velocity of the electronic device detected by the gyroscope Sensor is small, the change trend of the magnetic field around the electronic device detected by the magnetic Sensor is large, and the change trend of the signal intensity received by the Modem base station is large, the Sensor Hub can judge that the electronic device is in a relatively static state. For example, the above situation may correspond to a scenario in which the electronic device is placed on a high-speed rail table in constant speed operation.
When the acceleration Sensor detects that the change trend of the acceleration of the electronic device is large, the change of the angular velocity of the electronic device detected by the gyroscope Sensor is large, the change trend of the magnetic field around the electronic device detected by the magnetic Sensor is large, and the change trend of the signal intensity received by the Modem base station is large, the Sensor Hub can judge that the electronic device is not in a relatively static state or an absolute static state. For example, the above situation may correspond to a scenario in which a user holds an electronic device, walks in a high-speed rail in constant speed operation.
It can be appreciated that the electronic device may also determine the motion state thereof by other manners, which is not specifically limited in the embodiments of the present application.
And S608, determining that the electronic equipment is abnormally stopped when the total time interval of the continuous N times of power-on of the VBUS pin is smaller than T_sum or when the electronic equipment is in an absolute static state or a relatively static state.
Conversely, when the total time interval of the VBUS pin power-up N times is greater than or equal to t_sum, or when the time interval Δt is greater than or equal to t_min, or when the electronic device is not in an absolute stationary or a relatively stationary state, it may be determined that the power-up and power-down of the VBUS pin is caused by the human plug.
S609, after abnormal stopping of the electronic equipment is determined, the power-down sequence of each pin of the charging interface is recorded.
Specifically, the ADSP of the electronic device may receive an interrupt signal triggered when each pin is powered down, and based on the sequence of receiving each interrupt signal, the electronic device may obtain the power down sequence of each pin of the charging interface.
It will be appreciated that the electronic device may also record the level information of each pin of the charging interface, the pin is not powered down when the level information of the pin is high, and the pin is powered down when the level information of the pin is low.
S610, determining the reason for abnormal stopping of the electronic equipment.
It can be understood that the reason for the abnormal stopping of the charging of the electronic device and the power-down sequence of the pins of the charging interface have a preset corresponding relationship, and the preset corresponding relationship may include:
after the CC1 pin and the CC2 pin are powered down, the VBUS pin is powered down and can correspond to pollution of the charging interface; after the DP pin is powered down, the VBUS pin is powered down, which may correspond to a charger anomaly.
Optionally, when the electronic device abnormally stops charging, the electronic device may also record protocol communication abnormality information, water inlet detection abnormality information, and/or adapter abnormality information.
The protocol communication anomaly information may refer to that when the protocol chip of the electronic device communicates with the protocol chip of the charger, after the protocol chip of the electronic device sends a PING request (the PING request is generally used for detecting whether communication is normal) to the charger, if the set time is exceeded, the electronic device still does not receive a reply, the charger may return NACK (not acknowledged) information to the electronic device, and after the electronic device receives NACK information, the protocol communication anomaly information may be recorded. The reason for abnormal charging stopping of the electronic equipment corresponding to the protocol communication abnormal information can be as follows: protocol communication is abnormal.
The abnormal water inlet detection information may mean that a water inlet detection device may be disposed near a charging interface of the electronic device, and when the water inlet detection device detects that the charging interface is in water inlet, the electronic device records the abnormal water inlet information. The reason for abnormal stopping of the electronic equipment corresponding to the water inflow detection abnormal information can be as follows: the charging interface is dirty.
The adapter abnormality information may refer to that when an abnormality occurs in the adapter of the charger, for example, when an uninterruptible process in the adapter is interrupted, the charger may record the adapter abnormality information, and the electronic device may acquire the abnormality information recorded in the charger and record the abnormality information in the electronic device. The reason for abnormal charging stopping of the electronic equipment corresponding to the adapter abnormal information can be as follows: the charger is abnormal.
Optionally, when it is determined that the reason for abnormal charging of the electronic device is abnormal protocol communication, the display screen of the electronic device may display a first prompt message 801 as shown in fig. 8A; when it is determined that the reason for abnormal charging stop of the electronic device is that the charging interface is dirty, the display screen of the electronic device may display a second prompting message 802 as shown in fig. 8B.
It can be understood that, for different reasons of abnormal charging stop, the electronic device may display different prompting messages, or may have different prompting modes, which is not specifically limited in this application.
Therefore, the user can maintain the electronic equipment in time when the electronic equipment is abnormally stopped and charged based on the prompt information, the abnormal stopping and charging condition of the electronic equipment is reduced, and the use experience of the user is improved.
S611, the electronic equipment reports the related data of the abnormal stop of charging to the cloud.
The related data of the abnormal stopping of the charging may include a power-down sequence of pins of the charging interface, level information of each pin of the charging interface, protocol communication abnormal information, water inlet detection abnormal information, adapter abnormal information, and/or a reason for the abnormal stopping of the charging of the electronic device.
The reason for stopping the charging of the electronic device abnormally can be obtained by analyzing the protocol communication abnormal information, the water inlet detection abnormal information or the adapter abnormal information and the like in the electronic device based on the power-down sequence of the pins of the charging interface recorded in the electronic device; the method can also be obtained by analyzing protocol communication abnormal information, water inlet detection abnormal information or adapter abnormal information and the like in the cloud based on the power-down sequence of pins of a charging interface uploaded to the cloud by the electronic equipment.
In the embodiment of the application, the electronic device may upload the data related to the abnormal stop charging in real time, or may upload the data related to the abnormal stop charging at regular time.
In a possible implementation, when the electronic device is in the wireless communication mode, for example, when the electronic device uses WiFi for communication, the frequency of uploading the data related to the abnormal stop charging by the electronic device may be higher, for example, the electronic device uploads the data related to the abnormal stop charging to the cloud every 8 hours; when the electronic device is in the mobile communication mode, for example, when the electronic device uses 4G for communication, the frequency of uploading the data related to the abnormal stop charging by the electronic device may be low, for example, every 36 hours, the electronic device uploads the data related to the abnormal stop charging to the cloud. Therefore, the consumption of network data can be effectively reduced, the flow is saved, and the flow cost of a user is reduced.
In a possible implementation, the electronic device may also determine a time to upload the abnormally stopped charging-related data based on a time period in which the user uses the electronic device. For example, the electronic device may not upload the abnormally stopped charging-related data during a period of time (e.g., 8:00-23:00) in which the user is using the electronic device, and the electronic device may upload the abnormally stopped charging-related data during a period of time (e.g., 0:00-5:00) in which the user is not using the electronic device. Therefore, occupation of communication resources, CPU space and the like of the electronic equipment can be reduced, the occurrence of the clamping phenomenon of the electronic equipment is reduced, and the use experience of a user is improved.
The cloud can receive and store the related data of the abnormal stop charging, so that when the electronic equipment is in the abnormal stop charging condition again, maintenance staff or researchers can quickly and accurately position the reason of the abnormal stop charging based on the related data of the abnormal stop charging stored in the cloud, and in addition, the researchers can optimize the electronic equipment of subsequent research and development production based on the related data of the abnormal stop charging stored in the cloud.
It should be noted that, the sequence of the steps shown in fig. 6 may be adjusted in conjunction with a specific scene, and the steps shown in fig. 6 may be deleted or added in conjunction with a specific scene, and each step is not necessarily executed.
The overall flow of the charge anomaly management method provided in the embodiment of the present application is described above based on fig. 6, and exemplary, and possible implementations of each step will be described in layers below.
The embodiment of the application provides a charging abnormality management method, which is applied to electronic equipment and comprises the following steps: when the electronic equipment abnormally stops charging, recording the power-down sequence of pins of a charging interface of the electronic equipment; and uploading data related to the abnormal stop of charging to the cloud. Wherein the abnormal stop charge related data includes: the power down sequence of the pins of the charging interface and/or the reason for the abnormal stopping of the charging of the electronic equipment. The reason for stopping the charging of the electronic equipment abnormally and the power-down sequence of the pins of the charging interface have a preset corresponding relation.
In a possible implementation, the electronic device may further record level information of each pin of the charging interface, where the level information may include a high level and a low level, and when the level information of the pin is high, the pin is not powered down, and when the level information of the pin is low, the pin is powered down. The abnormal stop charge related data may further include: and the level information of each pin of the charging interface.
In this embodiment of the present application, the preset correspondence may include: the pollution of the charging interface corresponds to the corresponding relation that an external equipment detection pin of the charging interface is powered off before a power supply pin of the charging interface; and/or, the abnormal charger corresponds to the corresponding relation that the forward data transmission pin of the charging interface is powered down before the power supply pin of the charging interface.
In a possible implementation, when the electronic device abnormally stops charging, the electronic device may also record protocol communication abnormal information, water inlet detection abnormal information, and/or adapter abnormal information; the abnormal stop charge related data further includes: protocol communication anomaly information, water inlet detection anomaly information, and/or adapter anomaly information.
The preset corresponding relation further comprises: the corresponding relation between the communication abnormality of the charging protocol and the communication abnormality information of the protocol; and/or the corresponding relation between the dirt of the charging interface and the abnormal information of water inlet detection; and/or the corresponding relation between the abnormal charger and the abnormal adapter information.
In this embodiment of the present application, the preset correspondence may be stored in the electronic device, or may be stored in the cloud. If the preset corresponding relation is stored in the electronic equipment, the reason for stopping the charging of the electronic equipment abnormally can be obtained by analysis in the electronic equipment; if the preset corresponding relation is stored in the cloud, the reason for stopping the charging of the electronic equipment abnormally is obtained in the cloud.
The above-mentioned contents may correspond to steps S609 to S611, and specific contents may refer to descriptions of steps S609 to S611, which are not repeated herein.
Therefore, maintenance personnel or researchers of the electronic equipment can take the data related to abnormal stop charging such as the power-down sequence of the pins of the charging interface, the reason for the abnormal stop charging of the electronic equipment and the like as reference data, and the reason for the abnormal stop charging of the electronic equipment can be positioned more rapidly and accurately.
In a possible implementation, when a power pin of a charging interface of the electronic device is powered on, the power-on time of the power pin is recorded; when the power pin is powered down, the power down time of the power pin is recorded. Calculating a first time interval between the last recorded power-on time of the power pin and the last recorded power-off time of the power pin; and when the first time interval is smaller than the first preset time length, determining that the electronic equipment is abnormally stopped from being charged.
This is because the time interval for powering up and down the power supply pin caused by the abnormal stop of the electronic device is generally short, and therefore, when the first time interval is smaller than the first preset time period, it can be determined that the electronic device is abnormally stopped from being charged.
The first time interval may correspond to the time interval Δt in step S604, and the first preset duration may correspond to t_min in step S606.
The above-mentioned contents may correspond to steps S601 to S604 and S606, and specific contents may refer to descriptions of steps S601 to S604 and S606, which are not repeated herein.
Therefore, based on the time interval of power on and off of the power pin, when the electronic equipment stops charging, whether the electronic equipment stops charging abnormally can be simply and quickly judged in real time.
In a possible implementation, the first preset duration is related to the second time interval and/or the third time interval.
The second time interval comprises a power pin power-on and power-off time interval with the ratio higher than the first preset value in big data, the big data comprises a plurality of power pin power-on and power-off time intervals, and the third time interval comprises a predetermined time interval for manually plugging and unplugging the charger.
The big data may correspond to the time intervals of powering up and powering down the VBUS pins of the plurality of electronic devices in step S606, and the second time interval may correspond to the time interval of occurrence of the number of times of the occurrence of the VBUS pins exceeding the first preset value in step S606. The third time interval may correspond to the time interval determined by the developer of the electronic device through the trial and error of the human plug in step S606.
Therefore, the first preset time length which is accurate, practical in fitting and capable of effectively distinguishing abnormal stop and filling and artificial insertion and extraction can be obtained based on the second time interval and the third time interval.
In a possible implementation, when a power pin of a charging interface of an electronic device is powered on, recording a power-on time of the power pin includes: when the power pin is electrified, a power management unit PMU of the electronic equipment sends a first interrupt signal to an audio digital signal processor ADSP of the electronic equipment; ADSP detects power-on of the power pin based on the first interrupt signal, and records the power-on time of the power pin; when the power pin is powered down, record the power pin down moment, include: when the power supply pin is powered down, the PMU sends a second interrupt signal to the ADSP; ADSP detects power pin power down based on the second interrupt signal, records power down time of power pin.
Wherein the first interrupt signal may correspond to vbus_on in step S601, and the second interrupt signal may correspond to vbus_off in step S601.
The above content may correspond to step S601, and specific content may refer to the description of step S601, which is not repeated herein.
Thus, the up and down power of the VBUS pin can be quickly detected through the ADSP of the electronic device.
In a possible implementation, when the first time interval is less than the first preset duration, after determining that the electronic device abnormally stops charging, the method further includes: when the first time interval is smaller than a first preset duration, acquiring the motion state of the electronic equipment; when the electronic device is in a stationary state, it is determined that the electronic device is abnormally stopped from charging.
This is because, when the electronic apparatus is in a stationary state, it can be considered that there is no operation of manually plugging the charger, and thus, it can be determined that the electronic apparatus abnormally stops charging. Wherein the stationary state may correspond to absolute stationary and relative stationary in step S607.
The above content may correspond to step S607, and specific content may refer to the description of step S607, which is not repeated here.
Thus, based on the motion state of the electronic equipment, the judgment result of whether the electronic equipment stops charging abnormally can be more accurate.
In a possible implementation, when the first time interval is less than the first preset duration, before determining that the electronic device abnormally stops charging, the method further includes: and when the time interval between the first time stamp and the last time stamp is smaller than the second preset duration in the recorded time stamps of the continuous N times of power pin powering-on, determining that the electronic equipment is abnormally stopped from being charged.
This is because, in a short time, the possibility that the power pin is powered on a plurality of times by the manual plug is small, and therefore, when the time interval corresponding to the continuous N times of power pin powering on is smaller than the second preset time period, it can be determined that the electronic device is abnormally stopped from being charged.
The recorded time stamps of the N consecutive power pins may correspond to the power-up time of the N consecutive VBUS pins in step S605, the first time stamp may correspond to the first power-up time in step S605, the last time stamp may correspond to the last power-up time in step S605, and the second preset duration may correspond to t_sum in step S605.
The above content may correspond to step S605, and specific content may refer to the description of step S605, which is not repeated here.
Thus, whether the electronic device is abnormally stopped or not can be quickly and simply judged in real time based on the time intervals of continuous power-up of a plurality of VBUS.
In a possible implementation, when the first time interval is less than the first preset duration, before determining that the electronic device abnormally stops charging, the method further includes: and when the recorded power-on times of the power pins are larger than a second preset value within a third preset time, determining that the electronic equipment is abnormally stopped from being charged.
That is, in addition to the calculation method described in step S605, the electronic device may determine whether the electronic device is abnormally stopped from charging through the implementation method, where the value range of the third preset duration may be 1 minute to 5 minutes, and the value range of the second preset value may be 10 times to 50 times.
For example, taking the third preset time period as 2 minutes and the second preset value as 20 times as an example, if the total number of times of the VBUS pin electrification recorded by the electronic device is 10 times in the time period of 2 minutes, it may be determined that the electronic device does not abnormally stop the charging; or if the total number of times the VBUS pin is powered up recorded by the electronic device is 25, it may be determined that the electronic device abnormally stops charging.
Therefore, whether the electronic equipment is abnormally stopped to be charged or not can be judged in real time, quickly and simply based on the power-on times of the VBUS in a certain time.
The method provided by the embodiment of the present application is described above with reference to fig. 6, and the device for performing the method provided by the embodiment of the present application is described below. As shown in fig. 9, fig. 9 is a schematic structural diagram of a charging abnormality management device according to an embodiment of the present application, where the charging abnormality management device may be an electronic device according to an embodiment of the present application, or may be a chip or a chip system in the electronic device.
As shown in fig. 9, the charge abnormality management apparatus 900 may be used in a circuit, a hardware component, or a chip, and includes a processing unit 901. Wherein the processing unit 901 is for supporting the steps performed by the charging abnormality management device, for example, the processing unit is for processing the steps S601 to S611 in fig. 6.
In one possible implementation manner, the charging anomaly management device may further include: and a storage unit 903. The storage unit 903 may include one or more memories, which may be one or more devices, circuits, or devices for storing programs or data.
The storage unit 903 may exist separately and be connected to the processing unit 901 via a communication bus. The storage unit 903 may also be integrated with the processing unit 901.
Taking the example that the charging abnormality management device may be a chip or a chip system of the electronic device in the embodiment of the present application, the storage unit 903 may store computer-executed instructions of a method of the electronic device, so that the processing unit 901 executes the method of the electronic device in the embodiment described above. The storage unit 903 may be a register, a cache or a random access memory (random access memory, RAM) etc., and the storage unit 903 may be integrated with the processing unit 901. The storage unit 903 may be a read-only memory (ROM) or other type of static storage device that may store static information and instructions, and the storage unit 903 may be independent of the processing unit 901.
In one possible implementation manner, the charging anomaly management device may further include: a communication unit 902. Wherein the communication unit 902 is configured to support interaction of the charging anomaly management apparatus with other devices. For example, when the charge abnormality management device is an electronic device, the communication unit 902 may be a communication interface or an interface circuit. When the charge abnormality management device is a chip or a chip system within an electronic apparatus, the communication unit 902 may be a communication interface. For example, the communication interface may be an input/output interface, pins or circuitry, etc.
The apparatus of this embodiment may be correspondingly configured to perform the steps performed in the foregoing method embodiments, and the implementation principle and technical effects are similar, which are not described herein again.
Fig. 10 is a schematic hardware structure of an electronic device according to an embodiment of the present application, as shown in fig. 10, where the electronic device includes a processor 1001, a communication line 1004, and at least one communication interface (the communication interface 1003 is illustrated in fig. 10 as an example).
The processor 1001 may be a general purpose central processing unit (central processing unit, CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the programs of the present application.
Communication line 1004 may include circuitry to communicate information between the components described above.
Communication interface 1003 uses any transceiver-like device for communicating with other devices or communication networks, such as ethernet, wireless local area network (wireless local area networks, WLAN), etc.
Possibly, the electronic device may also comprise a memory 1002.
The memory 1002 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), a compact disc read-only memory (compact disc read-only memory) or other optical disk storage, a compact disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory may be implemented on its own and coupled to the processor via communication line 1004. The memory may also be integrated with the processor.
The memory 1002 is used for storing computer-executable instructions for executing the embodiments of the present application, and is controlled by the processor 1001 for execution. The processor 1001 is configured to execute computer-executable instructions stored in the memory 1002, thereby implementing the methods provided in the embodiments of the present application.
Possibly, the computer-executed instructions in the embodiments of the present application may also be referred to as application program code, which is not specifically limited in the embodiments of the present application.
In a particular implementation, the processor 1001 may include one or more CPUs, such as CPU0 and CPU1 in fig. 10, as one embodiment.
In a particular implementation, as one embodiment, an electronic device may include multiple processors, such as processor 1001 and processor 1005 in FIG. 10. Each of these processors may be a single-core (single-CPU) processor or may be a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
Fig. 11 is a schematic structural diagram of a chip according to an embodiment of the present application. Chip 1100 includes one or more (including two) processors 1120 and a communication interface 1130.
In some implementations, the memory 1140 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
In an embodiment of the present application, memory 1140 may include read only memory and random access memory and provide instructions and data to processor 1120. A portion of memory 1140 may also include non-volatile random access memory (non-volatile random access memory, NVRAM).
In the illustrated embodiment, memory 1140, communication interface 1130, and processor 1120 are coupled together by bus system 1110. The bus system 1110 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. For ease of description, the various buses are labeled as bus system 1110 in FIG. 11.
The methods described in the embodiments of the present application may be applied to the processor 1120 or implemented by the processor 1120. The processor 1120 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the methods described above may be performed by integrated logic circuitry in hardware or instructions in software in processor 1120. The processor 1120 described above may be a general purpose processor (e.g., a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), an off-the-shelf programmable gate array (field-programmable gate array, FPGA) or other programmable logic device, discrete gates, transistor logic, or discrete hardware components, and the processor 1120 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments herein.
The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a state-of-the-art storage medium such as random access memory, read-only memory, programmable read-only memory, or charged erasable programmable memory (electrically erasable programmable read only memory, EEPROM). The storage medium is located in the memory 1140, and the processor 1120 reads information in the memory 1140 and performs the steps of the above method in combination with its hardware.
In the above embodiments, the instructions stored by the memory for execution by the processor may be implemented in the form of a computer program product. The computer program product may be written in the memory in advance, or may be downloaded in the form of software and installed in the memory.
The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL), or wireless (e.g., infrared, wireless, microwave, etc.), or semiconductor medium (e.g., solid state disk, SSD)) or the like.
Embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer readable media can include computer storage media and communication media and can include any medium that can transfer a computer program from one place to another. The storage media may be any target media that is accessible by a computer.
As one possible design, the computer-readable medium may include compact disk read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disk memory; the computer readable medium may include disk storage or other disk storage devices. Moreover, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital versatile disc (digital versatile disc, DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
Combinations of the above should also be included within the scope of computer-readable media. The foregoing is merely illustrative embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think about variations or substitutions within the technical scope of the present invention, and the invention should be covered. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and provide corresponding operation entries for the user to select authorization or rejection.

Claims (11)

1. A charging abnormality management method applied to an electronic device, characterized by comprising:
recording the power-down sequence of pins of a charging interface of the electronic equipment when the electronic equipment abnormally stops charging;
Uploading data related to abnormal stopping of charging to the cloud; wherein the abnormal stop charge related data includes: and the power-down sequence of the pins of the charging interface and/or the reason for the electronic equipment to abnormally stop charging are/is provided with a preset corresponding relation with the power-down sequence of the pins of the charging interface.
2. The method according to claim 1, wherein the preset correspondence relationship includes:
the pollution of the charging interface corresponds to the corresponding relation that an external equipment detection pin of the charging interface is powered off before a power supply pin of the charging interface;
and/or, the abnormal charger corresponds to the corresponding relation that the forward data transmission pin of the charging interface is powered down before the power supply pin of the charging interface.
3. The method according to claim 1 or 2, wherein when the electronic device abnormally stops charging, the electronic device further records protocol communication abnormality information, water inflow detection abnormality information, and/or adapter abnormality information;
the data related to abnormal stop charging further includes: the protocol communication anomaly information, the water inlet detection anomaly information and/or the adapter anomaly information;
The preset corresponding relation further comprises: the corresponding relation between the communication abnormality of the charging protocol and the communication abnormality information of the protocol; and/or the corresponding relation between the dirt of the charging interface and the abnormal information of the water inlet detection; and/or the corresponding relation between the abnormal charger and the abnormal adapter information.
4. The method according to claim 1 or 2, characterized in that the method further comprises:
when a power pin of the charging interface is electrified, the electrifying moment of the power pin is recorded;
when the power supply pin of the charging interface is powered down, recording the power-down time of the power supply pin;
calculating a first time interval between the last recorded power-on time of the power pin and the last recorded power-off time of the power pin;
and when the first time interval is smaller than a first preset time length, determining that the electronic equipment is abnormally stopped from being charged.
5. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
the first preset duration is related to a second time interval and/or a third time interval; the second time interval comprises a power pin power-on and power-off time interval with the occupation ratio higher than a first preset value in big data, and the big data comprises a plurality of power pin power-on and power-off time intervals; the third time interval comprises a predetermined time interval for manually plugging and unplugging the charger.
6. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
when the power pin of the charging interface is electrified, recording the electrifying moment of the power pin, including:
when the power pin is electrified, a power management unit PMU of the electronic equipment sends a first interrupt signal to an audio digital signal processor ADSP of the electronic equipment; the ADSP detects the power-on of the power pin based on the first interrupt signal and records the power-on time of the power pin;
when the power supply pin of the charging interface is powered down, the power supply pin power down time is recorded, and the method comprises the following steps:
when the power supply pin is powered down, the PMU sends a second interrupt signal to the ADSP; and the ADSP detects the power supply pin to be powered down based on the second interrupt signal, and records the power-down time of the power supply pin.
7. The method of claim 4, wherein when the first time interval is less than a first preset duration, after determining that the electronic device is abnormally stopped from charging, further comprising:
when the first time interval is smaller than a first preset duration, acquiring a motion state of the electronic equipment;
And when the electronic equipment is in a static state, determining that the electronic equipment is abnormally stopped from being charged.
8. The method of claim 4, wherein when the first time interval is less than a first preset duration, before determining that the electronic device is abnormally stopped from charging, further comprising:
and when the time interval between the first time stamp and the last time stamp is smaller than the second preset duration in the recorded time stamps of the continuous N times of power pin powering-on, determining that the electronic equipment is abnormally stopped from being charged.
9. The method of claim 4, wherein when the first time interval is less than a first preset duration, before determining that the electronic device is abnormally stopped from charging, further comprising:
and when the recorded power-on times of the power pins are larger than a second preset value within a third preset time, determining that the electronic equipment is abnormally stopped from being charged.
10. An electronic device, comprising: a processor and a memory;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory to cause the electronic device to perform the method of any one of claims 1-9.
11. A computer readable storage medium storing a computer program, which when executed by a processor implements the method according to any one of claims 1-9.
CN202310763215.8A 2023-06-27 2023-06-27 Charging abnormality management method and related device Active CN116501534B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310763215.8A CN116501534B (en) 2023-06-27 2023-06-27 Charging abnormality management method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310763215.8A CN116501534B (en) 2023-06-27 2023-06-27 Charging abnormality management method and related device

Publications (2)

Publication Number Publication Date
CN116501534A true CN116501534A (en) 2023-07-28
CN116501534B CN116501534B (en) 2024-04-02

Family

ID=87328715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310763215.8A Active CN116501534B (en) 2023-06-27 2023-06-27 Charging abnormality management method and related device

Country Status (1)

Country Link
CN (1) CN116501534B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2866325A1 (en) * 2013-10-25 2015-04-29 Xiaomi Inc. Battery, method, device and system for battery protection
CN108268389A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 The insertion detection method and mobile terminal of a kind of equipment
CN113267736A (en) * 2021-05-31 2021-08-17 荣耀终端有限公司 Charging test device and method
CN114325195A (en) * 2021-12-31 2022-04-12 珠海视熙科技有限公司 Wired charging detection method and device and computer readable storage medium
CN115098319A (en) * 2022-07-31 2022-09-23 苏州浪潮智能科技有限公司 Method, device and equipment for detecting power-on time sequence of power supply and readable medium
CN115328290A (en) * 2022-10-14 2022-11-11 深圳市磐鼎科技有限公司 Power-on abnormity indication method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2866325A1 (en) * 2013-10-25 2015-04-29 Xiaomi Inc. Battery, method, device and system for battery protection
CN108268389A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 The insertion detection method and mobile terminal of a kind of equipment
CN113267736A (en) * 2021-05-31 2021-08-17 荣耀终端有限公司 Charging test device and method
CN114325195A (en) * 2021-12-31 2022-04-12 珠海视熙科技有限公司 Wired charging detection method and device and computer readable storage medium
CN115098319A (en) * 2022-07-31 2022-09-23 苏州浪潮智能科技有限公司 Method, device and equipment for detecting power-on time sequence of power supply and readable medium
CN115328290A (en) * 2022-10-14 2022-11-11 深圳市磐鼎科技有限公司 Power-on abnormity indication method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116501534B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN116564304A (en) Voice interaction method and device
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
WO2021051982A1 (en) Method for calling hardware interface and electronic device
WO2021155709A1 (en) Charging control method and electronic device
CN110769094A (en) Method for displaying user interface according to rear shell color and electronic equipment
CN116094083B (en) Charging method, device and storage medium
CN114371985A (en) Automated testing method, electronic device, and storage medium
WO2022170856A1 (en) Method for establishing connection, and electronic device
CN115333941A (en) Method for acquiring application running condition and related equipment
WO2021180095A1 (en) Method and apparatus for obtaining pose
CN113688019A (en) Response time duration detection method and device
CN116501534B (en) Charging abnormality management method and related device
WO2023197709A1 (en) Device identification method and related apparatus
US20230401897A1 (en) Method for preventing hand gesture misrecognition and electronic device
US20230376459A1 (en) File Generation Method and Electronic Device
CN114828098B (en) Data transmission method and electronic equipment
CN116707048B (en) OTG-based charging control method and related device
CN116069697B (en) Type-C interface level control method and related device
CN116196621B (en) Application processing method and related device
CN117451173B (en) Motor detection method and related equipment
CN117013660B (en) Charging icon display method and electronic equipment
CN116795476B (en) Wallpaper deleting method and electronic equipment
CN116365670B (en) Charging control method, device and storage medium
CN115016666B (en) Touch processing method, terminal equipment and storage medium
CN115902766B (en) Measurement method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant