Anti-counterfeiting testing method for charging and electronic device

By implementing charging anti-counterfeiting detection in electronic devices, identifying and preventing counterfeit chargers and charging cables, the safety hazards brought by counterfeit devices in the prior art are solved, and the safety and user experience of the charging process are improved.

WO2024244946A1PCT designated stage expired Publication Date: 2024-12-05HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/092586
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-29
Filing Date
2024-05-11
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify and prevent the safety hazards of counterfeit chargers and charging cables to electronic devices, resulting in safety risks during the charging process.

Method used

By implementing charging anti-counterfeiting detection methods in electronic devices, including performing anti-counterfeiting detection based on anti-counterfeiting code on the charger, detecting the cable current carrying capacity of the charging cable, and checking the charging power of the charger in a constant current stage. If the detection is not passed, Display prompt information to remind users to use non-authentic charging devices, and adjust the charging method to protect the equipment safety.

Benefits of technology

Effectively identify and prevent the use of counterfeit charging equipment, improve the charging safety of electronic devices, ensure that users use genuine chargers and charging cables, and avoid potential risks during the charging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024092586_05122024_PF_FP_ABST
    Figure CN2024092586_05122024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present application are an anti-counterfeiting testing method for charging and an electronic device. The method may be applied to the electronic device. When the electronic device is being charged, the anti-counterfeiting testing method for charging can perform anti-counterfeiting testing on a charger being used and / or test the cable current-carrying capacity of a charging line and the charging power of the charger during a constant-current stage, and, when the testing fails, display corresponding counterfeit prompt information. The technical solution may display prompt information in a timely manner when the electronic device identifies that a charger or a charging line is a counterfeit product, so as to prompt a user that the corresponding charging device is counterfeit, thus helping users to identify counterfeit charging devices and improving the safety of electronic devices during charging.
Need to check novelty before this filing date? Find Prior Art

Description

Charging anti-counterfeiting detection method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on May 29, 2023, with application number 202310621582.4 and application name “Charging Anti-Counterfeiting Detection Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of electronic technology, and more specifically, to a charging anti-counterfeiting detection method and an electronic device. Background Art

[0003] When charging an electronic device, using an authentic, genuine charger ensures safe charging. For example, if an electronic device supports SuperCharge, it can be charged using the original SuperCharge charger. When SuperCharge is enabled, the electronic device will undergo cryptographic authentication of the charger, and SuperCharge can only proceed after passing the authentication. However, some counterfeit chargers may bypass this authentication and charge the electronic device, posing a safety hazard. Furthermore, in addition to the charger, the charging cable may also be counterfeit, and using a counterfeit charging cable to charge the electronic device also poses a safety hazard.

[0004] Therefore, how to identify counterfeit charging devices becomes a technical problem that needs to be solved.

[0005] Summary of the Invention

[0006] The present invention provides a charging anti-counterfeiting detection method and electronic device. This technical solution can perform anti-counterfeiting detection on the charger and charging cable while the electronic device is charging. If the detection fails, the electronic device can display a prompt message to remind the user that the charging device currently being used is not genuine.

[0007] In a first aspect, a charging anti-counterfeiting detection method is provided, which is applied to an electronic device. The method includes: performing an anti-counterfeiting detection on the charging device used when the electronic device is charging; and displaying a prompt message when it is determined that the charging device has failed the detection, wherein the prompt message is used to indicate that the charging device is not genuine.

[0008] In an embodiment of the present application, when an electronic device identifies a charger or charging cable as a counterfeit product, a prompt message is promptly displayed to inform the user that the corresponding charging device is not genuine. This helps users identify counterfeit charging devices and guides users to purchase genuine charging devices.

[0009] It should be understood that the charging device may also be referred to as a charging component, a charging accessory, etc.

[0010] In combination with the first aspect, in an implementation of the first aspect, the charging device includes a charger, wherein the anti-counterfeiting detection on the charging device in use includes: performing anti-counterfeiting detection on the charger based on an anti-counterfeiting code; the displaying of prompt information when it is determined that the charging device has not passed the detection includes: displaying first prompt information when it is determined that the charger has not passed the anti-counterfeiting detection based on the anti-counterfeiting code, the first prompt information being used to indicate that the charger is not genuine.

[0011] In an embodiment of the present application, while charging, the electronic device can perform an anti-counterfeiting check on the charger based on the security code. If the charger fails the anti-counterfeiting check based on the security code, a prompt message indicating that the charger is not genuine can be displayed. This technical solution helps users determine whether the charger is a counterfeit product.

[0012] In combination with the first aspect, in an implementation of the first aspect, the charging device includes a charger and a charging cable. When it is determined that the charger passes the anti-counterfeiting detection based on the anti-counterfeiting code, or when it is determined that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the method further includes: testing the cable current-carrying capacity of the charging cable; when it is determined that the charging device fails the test, displaying a prompt message includes: when it is determined that the cable current-carrying capacity of the charging cable fails the test, displaying a second prompt message, the second prompt message being used to indicate that the charging cable is not genuine.

[0013] It should be understood that the cable current carrying capacity of the charging cable can also be referred to as the current carrying capacity of the charging cable.

[0014] In an embodiment of the present application, after the charger passes anti-counterfeiting detection, or when the charger bypasses anti-counterfeiting detection based on the security code, the electronic device can also test the current carrying capacity of the charging cable. If the current carrying capacity of the charging cable fails the test, a prompt message indicating that the charging cable is not genuine is displayed. This technical solution can detect counterfeit charging cables, helping users to determine whether the charging cable is a counterfeit product.

[0015] In combination with the first aspect, in an implementation of the first aspect, the charging device includes a charging cable, wherein the anti-counterfeiting detection of the charging device in use includes: detecting the cable current-carrying capacity of the charging cable; and displaying a prompt message when it is determined that the charging device has not passed the detection includes: displaying a second prompt message when it is determined that the cable current-carrying capacity of the charging cable has not passed the detection, and the second prompt message is used to indicate that the charging cable is not genuine.

[0016] In an embodiment of the present application, the electronic device can also directly test the current-carrying capacity of the charging cable. If the test fails, a prompt message indicating that the charging cable is not genuine is displayed. This technical solution can detect counterfeit charging cables, helping users to determine whether the charging cable is a counterfeit product.

[0017] In combination with the first aspect, in an implementation of the first aspect, the charging device includes a charger and a charging cable. When the cable current carrying capacity of the charging cable passes the test, the method further includes: when it is determined that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, testing the charging power of the charger in the constant current stage; when it is determined that the charging device fails the test, displaying a prompt message includes: when it is determined that the charging power of the charger fails the test, displaying a third prompt message, and the third prompt message is used to indicate that the charger is not genuine.

[0018] In an embodiment of the present application, when the charging cable passes the anti-counterfeiting detection, if the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the electronic device can also detect the charging power of the charger in the constant current stage. If the charging power of the charger fails the detection, a prompt message indicating that the charger is not genuine is displayed.

[0019] In this way, since the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the charger is further tested during the constant current stage to determine whether it is a counterfeit product.

[0020] In combination with the first aspect, in an implementation of the first aspect, the detecting the charging power of the charger in the constant current stage includes: determining the actual current on the charging line in the constant current stage; making N judgments on the charging power of the charger based on the actual current, where N is a positive integer greater than 1; if the results of the N judgments all fail to meet the standards, determining that the charging power of the charger has failed the test; or, if at least one of the results of the N judgments meets the standards, determining that the charging power of the charger has passed the test.

[0021] In this embodiment of the present application, the electronic device can determine whether the charger's charging power meets the standard based on the actual current on the charging line during the constant current phase. If N judgment results are negative, the charger's charging power can be determined to have failed the test; otherwise, the charger has passed the test. This technical solution can make the charger's charging power detection more accurate, avoid misjudgments, and thus improve fault tolerance.

[0022] In combination with the first aspect, in an implementation of the first aspect, the charging power of the charger is judged N times based on the actual current, including: for the i-th judgment, when the difference between the actual current and the first target current is less than or equal to a first threshold, determining that the charging power of the charger meets the standard, where i traverses 1 to N; when the difference between the actual current and the first target current is greater than the first threshold, determining that the charging power of the charger does not meet the standard.

[0023] This technology can determine whether the charging power of the charger meets the standard to further determine whether the charger is genuine.

[0024] In combination with the first aspect, in an implementation of the first aspect, the testing of the cable current-carrying capacity of the charging cable includes: determining whether the difference between the resistance of the charging cable and a preset resistance is less than or equal to a second threshold; when the difference between the resistance and the preset resistance is less than or equal to the second threshold, determining that the cable current-carrying capacity of the charging cable passes the test; when the difference between the resistance and the preset resistance is greater than the second threshold, determining that the cable current-carrying capacity of the charging cable fails the test.

[0025] Based on the embodiment of the present application, the cable current carrying capacity of the charging cable can be detected by the difference between the resistance of the charging cable and the preset resistance.

[0026] In combination with the first aspect, in an implementation of the first aspect, determining whether the difference between the resistance of the charging cable and the preset resistance is less than or equal to the second threshold includes: when determining that the type of the charging cable is a Universal Serial Bus USB-C interface and a USB-C interface C2C, determining whether the difference between the resistance of the charging cable and the preset resistance is less than or equal to the second threshold.

[0027] In an embodiment of the present application, when the type of the charging cable is C2C, the cable current carrying capacity of the charging cable can be detected by whether the difference between the resistance of the charging cable and the preset resistance is less than or equal to the second threshold.

[0028] In combination with the first aspect, in an implementation of the first aspect, the detecting of the cable current-carrying capacity of the charging cable includes: determining whether the maximum passing current of the charging cable is less than or equal to a second target current; when it is determined that the maximum passing current is greater than the second target current, determining that the cable current-carrying capacity of the charging cable passes the detection; when it is determined that the maximum passing current is less than or equal to the second target current, determining that the cable current-carrying capacity of the charging cable fails the detection.

[0029] In an embodiment of the present application, the current carrying capacity of the charging cable can be tested to further determine whether the charging cable is genuine.

[0030] In combination with the first aspect, in an implementation of the first aspect, determining whether the maximum current passing through the charging cable is less than or equal to the second target current includes: when determining that the type of the charging cable is a Universal Serial Bus USB-A interface and a USB-C interface A2C, determining whether the maximum current passing through the charging cable is less than or equal to the second target current.

[0031] In the embodiment of the present application, when the type of the charging cable is A2C, the cable current carrying capacity of the charging cable can be detected by the difference between the maximum current passing through the charging cable and the target current.

[0032] In combination with the first aspect, in an implementation of the first aspect, determining that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code includes: when the charging power received from the charger is 22.5 watts, determining that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code.

[0033] In combination with the first aspect, in an implementation of the first aspect, the method further includes: when it is determined that the charging device passes the anti-counterfeiting detection, charging the electronic device using a first charging method, wherein the first charging method is to charge the electronic device using the maximum power supported by both the electronic device and the charging device.

[0034] For example, the first charging method may be a super fast charging method.

[0035] The maximum power supported by the electronic device and the charging device together can be understood as the minimum of the maximum power supported by the electronic device and the maximum power supported by the charging device. For example, if the maximum power supported by the electronic device's battery is 66W and the maximum power supported by the charging device is 88W, the maximum power supported by the electronic device and the charging device together is 66W.

[0036] In the embodiment of the present application, if the charging device passes the test, it can be determined that the charging device is authentic, and the electronic device can be charged using the maximum power supported by the electronic device and the charging device. This technical solution uses the maximum power for charging only when the charging device is determined to be authentic, which can improve the safety of charging the electronic device.

[0037] In combination with the first aspect, in an implementation of the first aspect, the method further includes: when it is determined that the charging device has not passed the anti-counterfeiting detection, using a second charging method to charge the electronic device; wherein the charging power of the second charging method is less than the maximum power jointly supported by the electronic device and the charging device.

[0038] In an embodiment of the present application, when it is determined that the charging device has not passed the anti-counterfeiting detection, the electronic device is not charged using the maximum power, but is charged using the second charging method, thereby protecting the safety of the electronic device.

[0039] In combination with the first aspect, in an implementation of the first aspect, the charging power of the second charging mode is less than 22.5 watts.

[0040] In combination with the first aspect, in an implementation of the first aspect, the charging power of the second charging mode is 10 watts.

[0041] In a second aspect, an electronic device is provided, comprising: one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs comprising instructions, which, when executed by the one or more processors, enable the charging anti-counterfeiting detection method as described in the first aspect and any possible implementation thereof to be executed.

[0042] In a third aspect, a device is provided, comprising a module for implementing the charging anti-counterfeiting detection method as described in the first aspect and any possible implementation thereof.

[0043] In a fourth aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is used to receive a signal and transmit the signal to the processor, and the processor processes the signal so that the charging anti-counterfeiting detection method described in the first to third aspects and any possible implementation thereof is executed.

[0044] In a fifth aspect, a computer-readable storage medium is provided, in which computer instructions are stored. When the computer instructions are run on a computer, the charging anti-counterfeiting detection method described in the first aspect and any possible implementation thereof is executed.

[0045] In a sixth aspect, a computer program product is provided, which includes a computer program code. When the computer program code is run on a computer, the charging anti-counterfeiting detection method as described in the first aspect and any possible implementation thereof is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.

[0047] FIG2 is a schematic diagram of the software structure of the electronic device provided in an embodiment of the present application.

[0048] FIG3 is a schematic diagram of a set of graphical user interfaces provided in an embodiment of the present application.

[0049] FIG4 is a schematic diagram of another set of graphical user interfaces provided in an embodiment of the present application.

[0050] FIG5 is a schematic diagram of another set of graphical user interfaces provided in an embodiment of the present application.

[0051] FIG6 is a schematic flow chart of a charging anti-counterfeiting detection method provided in an embodiment of the present application.

[0052] FIG7 is a schematic flowchart of another charging anti-counterfeiting detection method provided in an embodiment of the present application.

[0053] FIG8 is a schematic flowchart of another charging anti-counterfeiting detection method provided in an embodiment of the present application.

[0054] FIG9 is a schematic flowchart of a charging anti-counterfeiting detection method provided in an embodiment of the present application.

[0055] FIG10 is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0057] The charging anti-counterfeiting detection method in the embodiment of the present application can be applied to electronic devices such as smart phones, smart speakers, smart TVs, tablet computers, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, vehicle-mounted devices, wearable devices, foldable devices, and Internet of Things (IOT) devices.

[0058] 1 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, 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, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0059] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0060] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0061] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0062] The processor 110 may also include a memory for storing instructions and data.

[0063] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus interface.

[0064] The charging management module 140 is configured to receive charging input from a charger.

[0065] The power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 .

[0066] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0067] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G applied on the electronic device 100.

[0068] The modulation and demodulation processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.

[0069] The wireless communication module 160 can provide wireless communication solutions for application on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Bluetooth low energy (BLE), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0070] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0071] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0072] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.

[0073] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0074] The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture still images or videos.

[0075] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals.

[0076] The video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs.

[0077] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.

[0078] The internal memory 121 may be used to store computer executable program codes, which include instructions. The processor 110 executes the instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 100.

[0079] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0080] The audio module 170 is used to convert digital audio information into analog audio signals for output, and is also used to convert analog audio input into digital audio signals.

[0081] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.

[0082] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.

[0083] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0084] The headphone jack 170D is used to connect a wired headphone.

[0085] The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .

[0086] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .

[0087] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0088] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).

[0089] The distance sensor 180F is used to measure distance.

[0090] The fingerprint sensor 180H is used to collect fingerprints.

[0091] The touch sensor 180K is also called a “touch panel.” The touch sensor 180K can be disposed on the display screen 194 . The touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen.”

[0092] The bone conduction sensor 180M can acquire vibration signals.

[0093] The buttons 190 include a power button, a volume button, and the like.

[0094] Motor 191 can generate vibration prompts.

[0095] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0096] The SIM card interface 195 is used to connect a SIM card.

[0097] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the software structure of the electronic device 100 is exemplified by taking an operating system of a layered architecture as an example.

[0098] Figure 2 is a block diagram of the software structure of electronic device 100 according to an embodiment of the present application. A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the operating system is divided into four layers: the application layer, the application framework layer, the system library layer, and the kernel layer, from top to bottom. The application layer may include a series of application packages.

[0099] As shown in FIG2 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, wallet, etc.

[0100] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0101] As shown in FIG2 , 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.

[0102] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0103] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0104] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0105] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0106] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0107] The notification manager enables applications to display notification information in the status bar, which can be used to convey informational messages and disappear automatically after a short stay without user interaction.

[0108] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the core library.

[0109] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0110] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).

[0111] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0112] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0113] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0114] A 2D graphics engine is a drawing engine for 2D drawings.

[0115] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0116] Before introducing the technical solution of this application, some technical terms that may be involved in this application are briefly introduced as follows.

[0117] Normal charging: When charging an electronic device for 30 minutes, the charging current is less than 3A or the total charge capacity is less than 60%; or the maximum charging power of the electronic device is less than or equal to the target power. For example, an electronic device is charged with a charging voltage of 5V and a charging current of 2A (maximum charging power of 10W).

[0118] Fast charging: When an electronic device is charging, the charging current is greater than 3A or the total charge capacity is greater than or equal to 60% within 30 minutes. Alternatively, the maximum charging power of the electronic device is greater than the target power but less than 22.5W. For example, the target power is 10W or 15W.

[0119] Super fast charging: When charging electronic devices, the maximum charging power is 22.5W or above.

[0120] When charging an electronic device, using an authentic, genuine charger ensures safe charging. For example, if an electronic device supports SuperCharge, it can be charged using the original SuperCharge charger. When SuperCharge is enabled, the electronic device undergoes an anti-counterfeiting authentication process, and SuperCharge is only enabled after passing the authentication. However, some counterfeit chargers may bypass this authentication process and charge electronic devices, posing a safety risk.

[0121] In addition to chargers, charging cables may also be counterfeit products. Using counterfeit charging cables to charge also poses a safety hazard to electronic devices.

[0122] In view of this, an embodiment of the present application provides a charging anti-counterfeiting detection method and electronic device. This technical solution can perform anti-counterfeiting authentication on the charger based on an anti-counterfeiting code during charging, or detect the cable current carrying capacity of the charging cable, or also detect the charging power of the charger in the constant current stage.

[0123] If the charging device passes the test, the electronic device can be charged using the first charging method, which uses the maximum power supported by both the electronic device and the charging device. If the charging device fails the test, the electronic device is charged using the second charging method, which uses a power lower than the maximum power supported by both the electronic device and the charging device. For example, the first charging method is the aforementioned super-fast charging, and the second charging method is the aforementioned normal charging.

[0124] When the charging device fails the detection, the electronic device may also display a prompt message to remind the user that the corresponding product is not genuine.

[0125] The following will introduce the technical solution of displaying a prompt message to the user when a charger or charging cable is detected to be non-genuine in an embodiment of the present application in conjunction with several sets of graphical user interfaces (GUIs).

[0126] Figure 3 is a schematic diagram of a set of GUIs provided in an embodiment of the present application, wherein (a) to (d) in Figure 3 illustrate the process of displaying a prompt message to the user when an electronic device identifies a counterfeit charger during charging.

[0127] 3 ( a ), the GUI is a display interface 310 of the electronic device 300 . The display interface 310 may include several application programs in the electronic device 300 .

[0128] For example, when electronic device 300 detects a charging operation, it can perform an anti-counterfeiting check on the charger. If the charger fails the anti-counterfeiting check, electronic device 300 can display a prompt in the notification center. When electronic device 300 detects that the user has opened the notification center, it can display the GUI shown in Figure 3(b). The charger anti-counterfeiting check will be described below in conjunction with specific embodiments and will not be detailed here.

[0129] Referring to FIG. 3( b ), the GUI is a display interface 320 of the notification center of the electronic device 300. This display interface 320 may include a prompt card 321 containing the text "Unable to fast charge" and "Charger detected unable to fast charge, recommended to use official standard accessories." This prompt card 321 may also include a function button 322 to ignore the message and a function button 323 to view more information.

[0130] It should be understood that the text content in the reminder card 321 is only illustrative and does not limit the present application. In other examples, the reminder card directly displays the text content "Please use a genuine charger" or the like, as long as it can serve as a reminder.

[0131] In other examples, when the electronic device determines that the charger has failed the anti-counterfeiting test, it can also directly display the reminder card 321 in the current display interface 310 to remind the user that the charger currently being used is not genuine.

[0132] When the electronic device detects that the user clicks the function button 323 , it may display a GUI as shown in FIG. 3( c ).

[0133] Referring to (c) in FIG. 3 , the GUI is a display interface 330 of the electronic device 300 . The display interface 330 may include display cards 331, 332, 333, and 334. Display card 331 may include the model information of the electronic device 300. For example, display card 331 may include an image of the electronic device 300 and the model number "HUAWEI MATE30 PRO." Display card 332 may include an image of a charger and the text "It is recommended to use a compatible charger and USB data cable for fast, safe, and stable charging." Display card 333 may include the text "Buy a genuine charger" and a function button 3331 for querying now. Display card 334 may include the text "Detect charger" and a function button 3341 for querying now. When the electronic device 300 detects that a user has clicked function button 3341, it may jump to a display interface for more information about charger detection.

[0134] When the electronic device 300 detects that the user clicks the function button 3331 , it may display a GUI as shown in (d) of FIG. 3 .

[0135] 3 (d), the GUI may be a purchase display interface 340 for chargers in Huawei Mall that match the battery of the electronic device 300. The display interface 340 may include various information about genuine chargers, and users can conveniently purchase the charger directly in the display interface.

[0136] For example, if the battery of an electronic device supports a maximum super fast charge of 88W, the display interface 340 may be a display interface for purchasing an 88W genuine charger. This helps guide users to directly purchase a genuine charger that matches the electronic device, saving them from having to spend extra time searching and purchasing.

[0137] In an embodiment of the present application, when charging an electronic device, the electronic device can perform an anti-counterfeiting test on the charger. If the anti-counterfeiting test fails, a prompt message can be displayed to remind the user that the charger currently being used is not genuine. In addition, the electronic device can also guide the user to purchase a charger that matches the electronic device.

[0138] In some cases, the electronic device can also test the current carrying capacity of the charging cable. If the current carrying capacity of the charging cable fails the test, the electronic device can display a prompt message on the display interface. This technical solution is described below in conjunction with Figure 4.

[0139] FIG4 is a schematic diagram of another set of GUIs provided by an embodiment of the present application, wherein (a) to (d) of FIG4 illustrate the process of displaying a prompt message to the user when the electronic device 400 identifies a counterfeit charging cable during charging.

[0140] It should be understood that (a) in FIG. 4 can refer to the relevant description of (a) in FIG. 3 .

[0141] For example, when electronic device 400 detects a charging operation, it can test the current carrying capacity of the charging cable. If the charging cable current carrying capacity test fails, electronic device 400 can display a prompt message in the notification center. After electronic device 400 detects that the user has opened the notification center, it can display the GUI shown in Figure 4 (b). The charging cable current carrying capacity test will be described below in conjunction with specific embodiments and will not be detailed here.

[0142] Referring to FIG4( b ), the GUI is a display interface 420 of the notification center of the electronic device 400. This display interface 420 may include a prompt card 421, which may include the text "Unable to verify that the data cable is genuine" and "This may reduce charging speed. It is recommended to use official standard accessories." This prompt card 421 may also include a function button 422 to ignore the message and a function button 423 to view more information.

[0143] It should be understood that the text content in the reminder card 421 is merely illustrative and does not limit the present application. In other examples, the reminder card directly displays the text content "Please use a genuine charging cable", etc., as long as it can serve as a reminder.

[0144] In other examples, when the electronic device 400 determines that the cable current carrying capacity test of the charging cable has failed, it can also directly display the prompt card 421 in the current display interface to remind the user that the charging cable currently being used is not genuine.

[0145] When the electronic device 400 detects that the user clicks the function button 423 , it may display a GUI as shown in FIG. 4( c ).

[0146] 4( c ), the GUI is a display interface 430 of the electronic device 400 . The display interface 430 may include a display card 431 , a display card 432 , and a display card 433 .

[0147] For the display card 431 , please refer to the relevant description of the display card 331 .

[0148] The display card 432 may include a picture of a charging cable and text content "It is recommended to use an original USB data cable, which has a fast charging speed, is safe and stable." The display card 433 may include text content "Buy an authentic charging cable" and a function button 4331 for immediate inquiry.

[0149] It should be understood that the charging line in the embodiment of the present application can also be understood as a data line.

[0150] When the electronic device 400 detects that the user clicks the function button 4331 , it may display a GUI as shown in (d) of FIG. 4 .

[0151] Referring to (d) in FIG4 , the GUI may be a purchase display interface 440 for charging cables compatible with the battery of electronic device 400 in the Huawei Mall. This display interface 440 may include various information about genuine charging cables, allowing users to conveniently purchase the cables directly from this interface. This helps guide users directly into purchasing genuine charging cables compatible with their electronic devices, saving them the time and effort of searching and purchasing.

[0152] In an embodiment of the present application, when charging an electronic device, the electronic device can test the current carrying capacity of the charging cable. If the charging cable fails the current carrying capacity test, a prompt message can be displayed to remind the user that the current charging cable is not genuine. In addition, the electronic device can also guide the user to purchase a charging cable that matches the electronic device, saving the user time.

[0153] In some cases, after the charger bypasses encryption authentication, the electronic device can test the current carrying capacity of the charging cable. If the current carrying capacity of the charging cable passes the test, the electronic device can further test the charging power of the charger during the constant current phase. If the charger fails the charging power test, the electronic device can display a prompt message on the display interface. This technical solution is described below in conjunction with Figure 5.

[0154] FIG5 is a schematic diagram of another set of GUIs provided in an embodiment of the present application, wherein (a) to (d) in FIG5 illustrate the process of displaying a prompt message to the user when the electronic device 500 recognizes that the charging power of the charger is insufficient during charging.

[0155] It should be understood that (a) in FIG. 5 can refer to the relevant description of (a) in FIG. 3 .

[0156] For example, when the electronic device 500 determines that the cable current carrying capacity test of the charging cable has passed, the charging power of the charger can be further tested in the constant current stage. When the charging power of the charger fails to pass the test, the electronic device 500 can display a prompt message in the notification center. When the electronic device 500 detects that the user has opened the notification center, the GUI shown in (b) of Figure 5 can be displayed. The following will describe the detection of the charging power of the charger in the constant current stage in conjunction with specific embodiments, which will not be described in detail here.

[0157] Referring to (b) in FIG5 , the GUI is a display interface 520 of the notification center of the electronic device 500. This display interface 520 may include a prompt card 521, which may include the text "Charger charging power is insufficient" and "Charger super-fast charging status abnormality detected, charging speed is slow, it is recommended to use official standard accessories." This prompt card 521 may also include a function button 522 to ignore the message and a function button 523 to view more information.

[0158] It should be understood that the text content in the reminder card 521 is merely illustrative and does not limit the present application. In other examples, the reminder card directly displays the text content "Please use a genuine charger" or the like, as long as it can serve as a reminder.

[0159] In other examples, when the electronic device 500 determines that the charging power detection of the charger in the horizontal constant current stage has failed, it can also directly display the prompt card 521 in the current display interface to remind the user that the charger currently used is not genuine.

[0160] When the electronic device 500 detects that the user clicks the function button 523 , it may display a GUI as shown in FIG. 5( c ).

[0161] It should be understood that (c) to (d) in FIG. 5 can refer to the relevant description of (c) to (d) in FIG. 3 , and will not be repeated for the sake of brevity.

[0162] In an embodiment of the present application, when charging an electronic device, if the charger bypasses encryption authentication, the electronic device can test the current carrying capacity of the charging cable. If the current carrying capacity test of the charging cable passes, the charging power of the charger can be further tested during the constant current phase. If the charging power of the charger fails the test, a prompt message is displayed to remind the user that the charger currently being used is not genuine. In addition, the electronic device can also guide the user to purchase a charger that matches the electronic device, saving the user time.

[0163] In this way, even if the counterfeit charger bypasses the encryption authentication, the electronic device can still detect the charging power of the charger during the constant current stage and identify the charger as a counterfeit product.

[0164] The following describes the technical solution of the charging anti-counterfeiting detection method provided in the embodiment of the present application in conjunction with Figures 6 to 8. This technical solution can be applied to electronic devices.

[0165] FIG6 is a schematic flow chart of a charging anti-counterfeiting detection method provided by an embodiment of the present application. As shown in FIG6 , the method 600 may include steps 601 to 608 .

[0166] 601, the electronic device detects a charging operation.

[0167] For example, a charging cable is connected to a charger, the charger is connected to a power source, and the user plugs the charging cable into the charging port of the mobile phone.

[0168] 602. The electronic device obtains the charger encryption authentication result.

[0169] In one example, when an electronic device detects that a charging cable is plugged into a charging port, the electronic device can send an encrypted authentication message to the charger through the charging cable, where the encrypted authentication message includes an anti-counterfeiting code. After receiving the encrypted authentication message, the charger can perform a verification based on the anti-counterfeiting code, and then send an encrypted authentication code to the electronic device through the charging cable. The electronic device can determine whether the charger has been authenticated based on the encrypted authentication code.

[0170] The encrypted authentication code may include multiple results such as -1, 1, and 0.

[0171] In the embodiments of the present application, performing cryptographic authentication on the charger can be understood as performing anti-counterfeiting detection based on the security code on the charger. Passing cryptographic authentication on the charger can be understood as passing the anti-counterfeiting detection based on the security code, and bypassing cryptographic authentication on the charger can be understood as bypassing the anti-counterfeiting detection based on the security code.

[0172] Alternatively, the charger may not send the encrypted authentication code to the electronic device. For example, if the electronic device still does not receive the encrypted authentication code from the charger after a period of time T after the electronic device sends the encrypted authentication message to the charger, it can be understood that the electronic device has not obtained the encrypted authentication result, which means that the encrypted authentication has failed.

[0173] In some examples, the charger may also send information such as the charger serial number, charger protocol, charger type, charger mode, charger maximum current, and charger maximum power to the electronic device, so that the electronic device can determine various information about the charger.

[0174] It should be understood that the charging cable in the embodiment of the present application is inserted into the electronic device interface, which can be understood as the charging cable is connected to the charger, and the charger is connected to the power supply; it can also be understood that when the charging cable is inserted into the electronic device interface, the user hopes to charge the electronic device normally.

[0175] 603 , the electronic device determines whether the charger passes the encryption authentication.

[0176] The electronic device can determine whether the charging has passed the encryption authentication based on the encryption authentication code returned by the charger.

[0177] For example, when the encryption authentication code received by the electronic device is 1, it can be determined that the charger has passed the encryption authentication. When the encryption authentication code received by the electronic device is -1, it can be determined that the charger has not passed the encryption authentication. When the encryption authentication code received by the electronic device is 0, it can be determined that the charger does not perform encryption authentication, and it can be considered that the charger has bypassed the encryption authentication. It should be understood that bypassing the encryption authentication can also be considered as passing the encryption authentication, allowing the electronic device to proceed with the process after passing the encryption authentication.

[0178] When the encrypted authentication code is 0, it can be understood that the charger sends a target charging power to the electronic device. For example, the target charging power is 22.5 watts (W), 40W, etc. At this time, the charger can bypass the encrypted authentication.

[0179] Alternatively, the electronic device may determine that the charger has failed the encryption authentication when the encryption authentication code is not obtained within a preset time.

[0180] 604. When the electronic device determines that the charger has not passed the encryption authentication, it displays prompt information A, where the prompt information A is used to indicate that the charger is not genuine.

[0181] For example, referring to (b) in FIG3 , when the electronic device determines that the charger has not passed the encryption authentication, a reminder message may be displayed in the notification center to remind the user that the charger currently being used is not genuine.

[0182] 605 , the electronic device is charged according to the second charging method.

[0183] For example, a counterfeit charger claims to have a 66W super-fast charge function. If the electronic device determines that the charger has not passed the encryption authentication, it cannot use the charger for super-fast charging and is forced to charge in the second charging mode. For example, the second charging mode is the normal charging mode mentioned above, in which case the electronic device can control the charger's maximum output voltage to 5 volts (V) and the maximum output current to 2 amperes (A).

[0184] In other examples, the second charging method may also be the fast charging method mentioned above.

[0185] 606 , when the electronic device determines that the charger passes the encryption authentication, it determines whether the cable current carrying capacity of the charging cable passes the test.

[0186] When the charging cable has a USB-A port on one end and a USB-C port on the other end (USB-A to USB-C, A2C), the electronic device can determine whether the charging cable passes the test by detecting whether the resistance of the charging cable is a standard value.

[0187] For example, an electronic device may include a charging chip that applies a target voltage to a charging cable, determines the resistance of the charging cable by detecting the current flowing in the cable, and stores the resistance value in a register. When testing the current carrying capacity of the charging cable, the electronic device can directly read the resistance value of the charging cable from the register and compare it with a standard value. If the difference between the resistance of the charging cable and a preset resistance is less than a threshold, the charging cable is deemed to have passed the test; otherwise, the electronic device determines that the charging cable has failed the test.

[0188] When the charging cable has USB-C connectors on both ends (USB-C to USB-C, C2C), the electronic device can determine whether the charging cable has passed the test by testing the current-carrying capacity of the charging cable. The electronic device determines that the charging cable has passed the test if the maximum current passing through the charging cable is greater than or equal to a preset current. Conversely, the electronic device determines that the charging cable has failed the test if the maximum current passing through the charging cable is less than the preset current A.

[0189] For example, the preset current is 5A. During charging, the electronic device can directly obtain the cable current carrying capacity of the charging cable through the USB power delivery (PD) protocol. When it is determined that the cable current carrying capacity is greater than or equal to 5A, it can be determined that the cable current carrying capacity of the charging cable has passed the test; otherwise, it has failed the test.

[0190] It is understandable that the current carrying capacity of the charging cable is a characteristic of the charging cable itself.

[0191] 607. When the electronic device determines that the current carrying capacity of the charging cable fails the test, it displays prompt information B to indicate that the charging cable is not genuine.

[0192] For example, referring to (b) in FIG4 , when the electronic device determines that the current carrying capacity of the charging cable has not been detected, a prompt message may be displayed.

[0193] After step 607, step 605 may be performed to charge the electronic device in a common charging manner.

[0194] 608. When the electronic device determines that the current carrying capacity of the charging cable passes the test, the electronic device charges according to the first charging method.

[0195] For example, the maximum power of the charger is 66W, and the electronic device also supports charging at a maximum power of 66W. When the electronic device determines that the charging cable passes the encryption authentication, the electronic device can be charged at a maximum power of 66W.

[0196] In one embodiment of the present application, when charging, the electronic device will first obtain the encrypted authentication result of the charger to determine whether the charger has passed the encrypted authentication. When the electronic device determines that the charger has not passed the authentication, a prompt message is displayed to remind the user that the charger is not genuine. When the electronic device determines that the charger has passed the authentication, it can further determine whether the cable current carrying capacity of the charging cable has passed the test. When the electronic device determines that the cable current carrying capacity of the charging cable has not passed the authentication, a prompt message is displayed to remind the user that the charging cable is not genuine. When the electronic device determines that the cable current carrying capacity of the charging cable has also passed the authentication, the electronic device is charged in the first charging mode, for example, the first charging mode is super fast charging.

[0197] It is understood that when the charger or charging cable fails the test, the electronic device may be charged using a second charging method, and may not be charged at the maximum power supported by both the charger and the electronic device. Furthermore, the electronic device may display a prompt to remind the user that the current charger or charging cable is not genuine, helping the user identify counterfeit products.

[0198] In some cases, when charging, the electronic device can detect the current carrying capacity of the charging cable and the charging power of the charger instead of performing encryption authentication on the charger. This technical solution will be described below with reference to FIG6.

[0199] FIG7 is a schematic flow chart of a charging anti-counterfeiting detection method provided by an embodiment of the present application. As shown in FIG7 , the method 700 may include steps 701 to 707 .

[0200] 701: The electronic device detects a charging operation.

[0201] It should be understood that the step 701 can refer to the relevant description of step 601, and for the sake of brevity, it will not be repeated here.

[0202] 702 , the electronic device determines whether the charging cable passes the test.

[0203] 703. When the electronic device determines that the charging cable has failed the test, it displays a prompt message, which can be used to indicate that the charging cable is not genuine.

[0204] It should be understood that steps 702-703 can refer to the relevant description of steps 606-607, and for the sake of brevity, they are not repeated here.

[0205] 704 , the electronic device is charged according to the second charging method.

[0206] It should be understood that the description of step 704 can refer to the relevant description of step 605, and for the sake of brevity, it will not be repeated here.

[0207] 705 , when the electronic device determines that the charging cable passes the test, it determines whether the charging power of the charger passes the test in the constant current stage.

[0208] For example, after determining that the current carrying capacity of the charging cable is normal, the electronic device may further determine whether the charging power of the charger passes the test in the constant current stage.

[0209] For example, during charging, the charger can gradually adjust the current until it reaches a constant value after a period of time. At this point, the electronic device can determine whether the difference between the actual current on the charging line and a preset current B is less than or equal to a threshold. If the electronic device determines that the difference between the actual current and the preset current B is less than or equal to the threshold, the charger's charging power passes the test; otherwise, the charger's charging power fails the test.

[0210] Alternatively, the electronic device may determine multiple times whether the difference between the actual current and the preset current B is less than or equal to a threshold value. If the difference between the actual current and the preset current B determined multiple times by the electronic device is greater than the threshold value, it is determined that the charging power of the charger has failed the test; otherwise, it is determined that the charging power of the charger has passed the test.

[0211] In step 705, since the electronic device has previously determined that the current carrying capacity of the charging cable is normal, but in the constant current stage, the actual current on the charging cable differs significantly from the preset current, it can be determined that the charging power of the charger is abnormal and the charger can be determined to be a counterfeit product.

[0212] 706. When the electronic device determines that the charging power of the charger has not passed the test, it displays a prompt message C. The prompt message C can be used to indicate that the charger is not genuine.

[0213] For example, referring to (b) in FIG5 , when the electronic device determines that the charging power of the charger fails to pass the test in the constant current stage, a prompt message may be displayed to remind the user that the charger is not genuine.

[0214] After step 706 , step 704 may be performed.

[0215] 707 : When the electronic device determines that the charging power of the charger passes the detection, the electronic device charges according to the first charging method.

[0216] For example, the maximum power of the charger is 66W, and the electronic device also supports charging at a maximum power of 66W. When the electronic device determines that the charging power of the charger passes the test, the electronic device can be charged at the maximum power of 66W.

[0217] In one embodiment of the present application, when charging, the electronic device may first determine whether the cable current carrying capacity of the charging cable has passed the test. When the cable current carrying capacity of the charging cable has not passed the test, the electronic device may display a prompt message to remind the user that the charging cable is not genuine. When the charging cable current carrying capacity has passed the test, it is further determined whether the charging power of the charger is normal in the constant current stage. When the electronic device determines that the charging power of the charger is abnormal in the constant current stage, it may display a prompt message to remind the user that the charger is not genuine. When the electronic device determines that the charging power of the charger is normal in the constant current stage, it uses the first charging method for charging, for example, the first charging method is super fast charging.

[0218] In this way, if the charging cable's current carrying capacity fails detection, or the charger's charging power fails detection, the electronic device can be charged using the second charging method, and cannot be charged at the maximum power supported by both the charger and the electronic device. Furthermore, the electronic device can display a prompt to remind the user that the current charging cable or charger is not genuine, helping the user identify counterfeit products.

[0219] In some cases, when charging, the electronic device can perform encryption authentication on the charger, test the current carrying capacity of the charging cable, and test the charging power of the charger during the constant current phase. This technical solution will be described below in conjunction with Figure 8.

[0220] FIG8 is a schematic flow chart of a charging anti-counterfeiting detection method provided by an embodiment of the present application. As shown in FIG8 , the method 800 may include steps 801 to 810.

[0221] 801: The electronic device detects a charging operation.

[0222] 802. The electronic device obtains the charger encryption authentication result.

[0223] 803 , the electronic device determines whether the charger passes the encryption authentication.

[0224] 804. When the electronic device determines that the charger has not passed the encryption authentication, it displays prompt information A, where the prompt information A is used to indicate that the charger is not genuine.

[0225] 805 , the electronic device is charged according to the second charging method.

[0226] 806 , when the electronic device determines that the charger has passed the encryption authentication, it determines whether the current carrying capacity of the charging cable has passed the test.

[0227] 807. When the electronic device determines that the current carrying capacity of the charging cable fails the test, it displays a prompt message B, where the prompt message B is used to indicate that the charging cable is not genuine.

[0228] It should be understood that steps 801-807 can refer to the relevant description of steps 601-607, and for the sake of brevity, they are not repeated here.

[0229] In this embodiment of the present application, when the electronic device determines that the charger has passed encryption authentication or after the charger has bypassed encryption authentication, the charging cable's cable current carrying capacity is further tested. After the charging cable's cable current carrying capacity test passes, if the charger bypasses encryption authentication, the charger's charging power needs to be tested during the constant current phase.

[0230] 808. When the electronic device determines that the current carrying capacity of the charging cable passes the test, it determines whether the charging power of the charger passes the test in the constant current phase.

[0231] It should be understood that the manner in which the electronic device determines whether the charging power of the charger passes the detection in the constant current stage can refer to the relevant description of step 705 above.

[0232] 809. When the electronic device determines that the charging power of the charger fails to pass the test in the constant current stage, it displays a prompt message C, which is used to indicate that the charger is not genuine.

[0233] It should be understood that the step 809 may refer to the relevant description of step 706 .

[0234] 810. The electronic device is charged according to a first charging method.

[0235] It should be understood that the step 810 may refer to the relevant description of step 707 .

[0236] In one embodiment of the present application, while charging, the electronic device can perform cryptographic authentication on the charger, test the current-carrying capacity of the charging cable, and test the charging power of the charger during the constant current phase. If the test fails, the electronic device can display a prompt message to inform the user that the corresponding product is not genuine.

[0237] By adopting the technical solution in the embodiments of the present application, even if the counterfeit charger bypasses the encryption authentication, the electronic device can detect the cable current carrying capacity of the charging cable. After the cable current carrying capacity of the charging cable passes the test, the electronic device can further detect the charging power of the counterfeit charger in the constant current stage, thereby identifying the counterfeit charger.

[0238] In other embodiments, when charging, the electronic device may first perform cryptographic authentication on the charger. If the charger fails the cryptographic authentication, a prompt message may be displayed to indicate that the charger is not genuine. After the charger passes the cryptographic authentication, or after the charger bypasses the cryptographic authentication, the electronic device may not test the current carrying capacity of the charging cable, but instead further determine whether the charger's charging power passes the test during the constant current phase. If the charger's charging power fails the test, the electronic device displays a prompt message to indicate that the charger or charging cable is not genuine.

[0239] It is understandable that the various embodiments introduced in the above embodiments of the present application can also be combined with each other, and such technical solutions should not be considered to exceed the scope of protection of the present application.

[0240] FIG9 is a schematic flow chart of a charging anti-counterfeiting detection method provided by an embodiment of the present application. As shown in FIG9 , the method 900 can be applied to an electronic device and can include steps 910 to 920.

[0241] 910. When the electronic device is charging, perform anti-counterfeiting detection on the charging device used.

[0242] For example, the charging device may include a charger and a charging cable. In some cases, the charger and charging cable used by the user may be counterfeit. It should be understood that the charging device may also be referred to as a charging component, charging accessory, etc.

[0243] Anti-counterfeiting detection of the charging device in use may include anti-counterfeiting detection of the charging device based on the anti-counterfeiting code, detection of the current carrying capacity of the charging cable, detection of the charging power of the charger, etc.

[0244] In other examples, before performing anti-counterfeiting detection on the charging device, the electronic device may also detect the charging protocol used by the charging device. When it is detected that the charging protocol of the charging device is the same as the charging protocol of the electronic device, the electronic device is subjected to anti-counterfeiting detection; when it is detected that the charging protocol of the charging device is different from the charging protocol of the electronic device, the electronic device is charged using a second charging method.

[0245] 920. If it is determined that the charging device has failed the test, a prompt message is displayed, where the prompt message is used to indicate that the charging device is not genuine.

[0246] For example, referring to FIG3 and FIG5 , when the charger fails the test, the electronic device may display a prompt message to remind the user that the charger is not genuine.

[0247] For example, referring to FIG4 , when the current carrying capacity of the charging cable fails to pass the test, the electronic device may display a prompt message to remind the user that the charging cable is not genuine.

[0248] Alternatively, the prompt information may also be used to prompt that the charging device is incompatible or mismatched with the charger.

[0249] In an embodiment of the present application, when an electronic device identifies a charger or charging cable as a counterfeit product, a prompt message is promptly displayed to inform the user that the corresponding charging device is not genuine. This helps users identify counterfeit charging devices and guides users to purchase genuine charging devices.

[0250] In some embodiments, the charging device includes a charger, wherein performing anti-counterfeiting detection on the used charging device includes:

[0251] Conduct anti-counterfeiting detection on the charger based on the anti-counterfeiting code;

[0252] If the charging device fails the test, a prompt message is displayed, including:

[0253] When it is determined that the charger fails the anti-counterfeiting detection based on the anti-counterfeiting code, a first prompt message is displayed, where the first prompt message is used to indicate that the charger is not genuine.

[0254] Exemplarily, referring to FIG. 3 , the first prompt information may be a prompt card 321 .

[0255] It should be understood that the anti-counterfeiting detection based on the anti-counterfeiting code may be the encryption authentication mentioned above.

[0256] In an embodiment of the present application, while charging, the electronic device can perform an anti-counterfeiting check on the charger based on the security code. If the charger fails the anti-counterfeiting check based on the security code, a prompt message indicating that the charger is not genuine can be displayed. This technical solution helps users determine whether the charger is a counterfeit product.

[0257] In some embodiments, the charging device includes a charger and a charging cable. When it is determined that the charger passes the anti-counterfeiting detection based on the security code, or when it is determined that the charger bypasses the anti-counterfeiting detection based on the security code, the method 900 may further include:

[0258] Test the current carrying capacity of the charging cable;

[0259] If the charging device fails the test, a prompt message is displayed, including:

[0260] If it is determined that the current carrying capacity of the charging cable fails the test, a second prompt message is displayed, where the second prompt message is used to indicate that the charging cable is not genuine.

[0261] Exemplarily, referring to FIG. 4 , the second prompt information may prompt card 421 .

[0262] It should be understood that the cable current carrying capacity of the charging cable can also be referred to as the current carrying capacity of the charging cable.

[0263] In this embodiment of the present application, after the charger passes encryption authentication, or when the charger bypasses encryption authentication, the electronic device can also test the current carrying capacity of the charging cable. If the current carrying capacity of the charging cable fails the test, a prompt message indicating that the charging cable is not genuine is displayed. This technical solution can detect counterfeit charging cables, helping users to determine whether the charging cable is a counterfeit product.

[0264] In some embodiments, the charging device includes a charger and a charging cable. If the current carrying capacity of the charging cable passes the test, the method 900 may further include:

[0265] When determining that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the charging power of the charger is detected during the constant current phase;

[0266] If the charging device fails the test, a prompt message is displayed, including:

[0267] When it is determined that the charging power of the charger fails the test, a third prompt message is displayed, where the third prompt message is used to indicate that the charger is not genuine.

[0268] Exemplarily, referring to FIG. 5 , the third prompt information may be a prompt card 521 .

[0269] In an embodiment of the present application, when the charging cable passes the inspection, if the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the electronic device can also detect the charging power of the charger in the constant current stage. If the charging power of the charger fails the inspection, a prompt message indicating that the charger is not genuine is displayed.

[0270] In this way, since the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the charger is further tested during the constant current stage to determine whether it is a counterfeit product.

[0271] In some embodiments, detecting the charging power of the charger during the constant current phase includes:

[0272] During the constant current phase, determine the actual current on the charging line;

[0273] The charging power of the charger is judged N times according to the actual current, where N is a positive integer greater than 1;

[0274] If the results of N judgments are all unsatisfactory, it is determined that the charging power of the charger has failed the test; or,

[0275] If at least one of the N judgment results meets the standard, it is determined that the charging power of the charger has passed the test.

[0276] In this embodiment of the present application, the electronic device can determine whether the charger's charging power meets the standard based on the actual current on the charging line during the constant current phase. If N judgment results are negative, the charger's charging power can be determined to have failed the test; otherwise, the charger has passed the test. This technical solution can make the charger's charging power detection more accurate, avoid misjudgments, and thus improve fault tolerance.

[0277] In some embodiments, the charging power of the charger is determined N times based on the actual current, including:

[0278] For the i-th judgment, when the difference between the actual current and the first target current is less than or equal to the first threshold, it is determined that the charging power of the charger meets the standard, where i traverses 1 to N;

[0279] When the difference between the actual current and the first target current is greater than a first threshold, it is determined that the charging power of the charger does not meet the standard.

[0280] The embodiment of the present application does not limit the specific value of the first threshold. For example, the second threshold may be 0.03 or 0.05.

[0281] This technology can determine whether the charging power of the charger meets the standard to further determine whether the charger is genuine.

[0282] In some embodiments, detecting the current carrying capacity of the charging cable includes:

[0283] determining whether a difference between a resistance of the charging cable and a preset resistance is less than or equal to a second threshold;

[0284] When the difference between the resistance and the preset resistance is less than or equal to a second threshold, it is determined that the cable current carrying capacity of the charging cable has passed the test; when the difference between the resistance and the preset resistance is greater than the second threshold, it is determined that the cable current carrying capacity of the charging cable has failed the test;

[0285] In some embodiments, determining whether a difference between a resistance of the charging line and a preset resistance is less than or equal to a second threshold value includes:

[0286] When it is determined that the type of the charging cable is C2C, it is determined whether a difference between a resistance of the charging cable and a preset resistance is less than or equal to a second threshold.

[0287] In an embodiment of the present application, when the type of the charging cable is C2C, the cable current carrying capacity of the charging cable can be detected by whether the difference between the resistance of the charging cable and the preset resistance is less than or equal to the second threshold.

[0288] In some embodiments, the cable current carrying capacity of the charging cable is tested, including: determining whether the maximum passing current of the charging cable is less than or equal to a second target current; when it is determined that the maximum passing current is greater than the second target current, determining that the cable current carrying capacity of the charging cable passes the test; when it is determined that the maximum passing current is less than or equal to the second target current, determining that the cable current carrying capacity of the charging cable fails the test.

[0289] The embodiment of the present application does not limit the specific value of the second threshold. For example, the second threshold can be 0.05, 0.1, etc.

[0290] In some embodiments, determining whether the maximum current flowing through the charging line is less than or equal to the second target current includes:

[0291] When it is determined that the type of the charging line is A2C, it is determined whether a maximum passing current on the charging line is less than or equal to a second target current.

[0292] The embodiment of the present application does not limit the specific value of the second target current. For example, the second target current can be 5A or 6A.

[0293] In an embodiment of the present application, the current carrying capacity of the charging cable can be tested to further determine whether the charging cable is genuine.

[0294] In some embodiments, determining that the charger bypasses anti-counterfeiting detection based on the anti-counterfeiting code includes:

[0295] When the charging power sent by the receiving charger is 22.5 watts, it is determined that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code.

[0296] It should be understood that when the electronic device performs anti-counterfeiting detection based on the anti-counterfeiting code on the charger, when the charger sends a charging power of 22.5W to the electronic device, the charger may not be subjected to anti-counterfeiting detection based on the anti-counterfeiting code, that is, the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code.

[0297] In some embodiments, the method 900 may further include:

[0298] When it is determined that the charging device passes the anti-counterfeiting detection, the electronic device is charged using a first charging method, where the first charging method is to charge the electronic device using a maximum power supported by both the electronic device and the charging device.

[0299] For example, the first charging method may be a super fast charging method.

[0300] The maximum power supported by the electronic device and the charging device together can be understood as the minimum of the maximum power supported by the electronic device and the maximum power supported by the charging device. For example, if the maximum power supported by the electronic device's battery is 66W and the maximum power supported by the charging device is 88W, the maximum power supported by the electronic device and the charging device together is 66W.

[0301] In the embodiment of the present application, if the charging device passes the test, it can be determined that the charging device is authentic, and the electronic device can be charged using the maximum power supported by both the electronic device and the charging device. This technical solution uses the maximum power for charging only when the charging device is determined to be authentic, which can improve the safety of charging the electronic device.

[0302] In some embodiments, the method 900 may further include:

[0303] If it is determined that the charging device fails the anti-counterfeiting detection, the electronic device is charged using a second charging method, wherein the charging power of the second charging method is less than the maximum power supported by both the electronic device and the charging device.

[0304] It should be understood that charging in the second charging mode can be understood as charging with a charging power less than the maximum power supported by the electronic device and the charging device. For example, the second charging mode is the ordinary charging mode mentioned above, such as charging the electronic device at 5V and 2A.

[0305] In an embodiment of the present application, when it is determined that the charging device has failed the test, the electronic device is not charged using the maximum power, but is charged using the second charging method, thereby protecting the safety of the electronic device.

[0306] In some embodiments, the charging power of the second charging method is less than 22.5 watts.

[0307] In some embodiments, the second charging method has a charging power of 10 watts, for example, using 5V and 2A for charging.

[0308] Figure 10 is a schematic block diagram of an electronic device provided in an embodiment of the present application. As shown in Figure 10, the electronic device 1000 may include one or more processors 1010 and one or more memories 1020. The one or more memories 1020 store one or more computer programs, each of which includes instructions that, when executed by the one or more processors 1010, implement the charging anti-counterfeiting detection method described in any of the possible implementations described above.

[0309] Illustratively, the electronic device 1000 may be the electronic device 100, the electronic device 300, the electronic device 400, or the electronic device 500 mentioned above.

[0310] An embodiment of the present application also provides a chip, which includes a processor and a communication interface. The communication interface is used to receive a signal and transmit the signal to the processor. The processor processes the signal so that the charging anti-counterfeiting detection method described in any possible implementation method described above is executed.

[0311] This embodiment also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the charging anti-counterfeiting detection method in the above-mentioned embodiment.

[0312] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the charging anti-counterfeiting detection method in the above-mentioned embodiment.

[0313] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the chip to execute the charging anti-counterfeiting detection method in the above-mentioned method embodiments.

[0314] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0315] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0316] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0317] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0318] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0319] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0320] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0321] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A charging anti-counterfeiting detection method, characterized in that: The method is applied to an electronic device, and the method comprises: When the electronic device is charging, performing anti-counterfeiting detection on the charging device used; When it is determined that the charging device has not passed the test, a prompt message is displayed, where the prompt message is used to indicate that the charging device is not genuine.

2. The method according to claim 1, characterized in that: The charging device includes a charger, wherein the anti-counterfeiting detection of the used charging device includes: Performing anti-counterfeiting detection on the charger based on the anti-counterfeiting code; When it is determined that the charging device fails the test, displaying a prompt message includes: When it is determined that the charger fails the anti-counterfeiting detection based on the anti-counterfeiting code, first prompt information is displayed, where the first prompt information is used to indicate that the charger is not genuine.

3. The method according to claim 1, characterized in that The charging device includes a charger and a charging cable. When it is determined that the charger passes the anti-counterfeiting detection based on the anti-counterfeiting code, or when it is determined that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the method further includes: Testing the current carrying capacity of the charging cable; When it is determined that the charging device fails the test, displaying a prompt message includes: When it is determined that the current carrying capacity of the charging cable has not passed the test, a second prompt message is displayed, where the second prompt message is used to indicate that the charging cable is not genuine.

4. The method according to claim 1, characterized in that: The charging device includes a charging cable, wherein the anti-counterfeiting detection of the used charging device includes: Testing the current carrying capacity of the charging cable; When it is determined that the charging device fails the test, displaying a prompt message includes: When it is determined that the current carrying capacity of the charging cable fails the test, a second prompt message is displayed, where the second prompt message is used to indicate that the charging cable is not genuine.

5. The method according to claim 1, characterized in that: The charging device includes a charger and a charging cable. When the cable current carrying capacity of the charging cable passes the detection, the method further includes: When it is determined that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, detecting the charging power of the charger in a constant current stage; When it is determined that the charging device fails the test, displaying a prompt message includes: When it is determined that the charging power of the charger fails the detection, a third prompt message is displayed, where the third prompt message is used to indicate that the charger is not genuine.

6. The method according to claim 5, characterized in that The detecting the charging power of the charger in the constant current stage includes: In the constant current stage, determining the actual current on the charging line; Determine the charging power of the charger N times according to the actual current, where N is a positive integer greater than 1; If the results of the N judgments are all unsatisfactory, it is determined that the charging power of the charger has not passed the test; or, If at least one of the N judgment results meets the standard, it is determined that the charging power of the charger passes the detection.

7. The method according to claim 6, characterized in that The determining the charging power of the charger N times according to the actual current includes: For the i-th judgment, when the difference between the actual current and the first target current is less than or equal to the first threshold, it is determined that the charging power of the charger meets the standard, where i traverses from 1 to N; When the difference between the actual current and the first target current is greater than the first threshold, it is determined that the charging power of the charger does not meet the standard.

8. The method according to claim 3 or 4, characterized in that: The detecting the current carrying capacity of the charging cable includes: Determining whether a difference between a resistance of the charging line and a preset resistance is less than or equal to a second threshold; When the difference between the resistance and the preset resistance is less than or equal to the second threshold, it is determined that the cable current carrying capacity of the charging cable passes the test. Test; When the difference between the resistance and the preset resistance is greater than the second threshold, it is determined that the cable current carrying capacity of the charging cable fails the detection.

9. The method according to claim 8, characterized in that The determining whether the difference between the resistance of the charging line and the preset resistance is less than or equal to a second threshold value includes: When it is determined that the type of the charging cable is a universal serial bus USB-C interface and a USB-C interface C2C, it is determined whether a difference between a resistance of the charging cable and a preset resistance is less than or equal to a second threshold.

10. The method according to claim 3 or 4, characterized in that: The detecting the current carrying capacity of the charging cable includes: Determine whether the maximum current passing through the charging line is less than or equal to a second target current; When it is determined that the maximum passing current is greater than the second target current, determining that the cable current carrying capacity of the charging cable passes the detection; When it is determined that the maximum passing current is less than or equal to the second target current, it is determined that the cable current carrying capacity of the charging cable fails the detection.

11. The method according to claim 8, characterized in that The determining whether the maximum current passing through the charging line is less than or equal to the second target current includes: When it is determined that the type of the charging line is a universal serial bus USB-A interface and a USB-C interface A2C, it is determined whether the maximum passing current on the charging line is less than or equal to the second target current.

12. The method according to claim 3 or 5, characterized in that: The determining that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code includes: When the charging power received from the charger is 22.5 watts, it is determined that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code.

13. The method according to any one of claims 1 to 12, characterized in that The method further comprises: When it is determined that the charging device passes the anti-counterfeiting detection, the electronic device is charged using a first charging method, where the first charging method is to charge the electronic device using a maximum power supported by both the electronic device and the charging device.

14. The method according to claims 1-12, characterized in that The method further comprises: When it is determined that the charging device has not passed the anti-counterfeiting detection, the electronic device is charged using a second charging method; wherein the charging power of the second charging method is less than the maximum power supported by both the electronic device and the charging device.

15. The method according to claim 14, characterized in that The charging power of the second charging method is less than 22.5 watts.

16. The method according to claim 14 or 15, characterized in that The charging power of the second charging method is 10 watts.

17. An electronic device, characterized in that: include: one or more processors; One or more memories; the one or more memories store one or more computer programs, the one or more computer programs include instructions, when the instructions are executed by one or more processors, the charging anti-counterfeiting detection method as described in any one of claims 1-16 is executed.

18. A readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the charging anti-counterfeiting detection method according to any one of claims 1 to 16 is executed.

Citation Information

Patent Citations

  • Portable communication device and method for charging through discernment of charging cable

    CN101355259A

  • Wireless charging authentication system of mobile terminal

    CN105634036A

  • Charger authentication method and device for electronic equipment and electronic equipment

    CN105932729A

  • Intelligence control system of charger

    CN206557568U

  • Battery charger management system, battery charger management method, and service providing device

    JP2012228006A