Charging anti-counterfeiting detection method and electronic equipment
By performing anti-counterfeiting detection of chargers and charging cables in electronic devices, identifying and prompting non-authentic products, the safety hazards of counterfeit charging devices for electronic devices are solved, and the safety and user experience of the charging process are improved.
Patent Information
- Application Number
- CN202310621582.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2024-11-29
AI Technical Summary
The prior art is difficult to identify and prevent the safety hazards of counterfeit chargers and charging cables to electronic devices, resulting in safety risks during charging.
When charging an electronic device, anti-counterfeiting inspection of the charger and charging cable, including authentication based on anti-counterfeiting code, cable current carrying capacity detection and charging power detection, identify and prompt non-authentic products to ensure the use of genuine charging equipment.
Effectively identify and prevent counterfeit charging equipment, improve the safety of the charging process, ensure that electronic devices use genuine chargers and charging cables, and improve user safety experience.
Smart Images

Figure CN119051182A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] When charging electronic devices, using original authentic chargers can ensure charging safety. For example, when an electronic device supports super-fast charging, the original super-fast charger can be used to charge the electronic device in super-fast charging mode. When the electronic device is super-fast charging, the charger will be encrypted and authenticated, and super-fast charging can only be performed after the encryption authentication is passed. However, some counterfeit chargers may bypass the encryption authentication of the charger and charge the electronic device, posing a safety hazard to the electronic device. In addition, in addition to the charger, the charging cable may also be a counterfeit product. Using a counterfeit charging cable to charge also poses a safety hazard to the electronic device.
[0003] Therefore, how to identify counterfeit charging devices becomes a technical problem that needs to be solved. Summary of the invention
[0004] The embodiment of the present application provides a charging anti-counterfeiting detection method and an electronic device. The technical solution can perform anti-counterfeiting detection on the charger and charging cable when 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 used is not genuine.
[0005] In a first aspect, a charging anti-counterfeiting detection method is provided, which is applied to an electronic device, and the method comprises: when the electronic device is charging, performing an anti-counterfeiting detection on the charging device used; if it is determined that the charging device has not passed the detection, displaying a prompt message, wherein the prompt message is used to indicate that the charging device is not authentic.
[0006] In the embodiment of the present application, when the electronic device identifies that the charger or charging cable is a counterfeit product, prompt information is displayed in time to remind the user that the corresponding charging device is not genuine, thereby facilitating the user to identify counterfeit charging devices and guiding the user to purchase genuine charging devices.
[0007] It should be understood that the charging device may also be referred to as a charging component, a charging accessory, etc.
[0008] 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 an anti-counterfeiting detection on the charger based on an anti-counterfeiting code; when it is determined that the charging device has not passed the detection, displaying a prompt message includes: when it is determined that the charger has not passed the anti-counterfeiting detection based on the anti-counterfeiting code, displaying a first prompt message, the first prompt message being used to indicate that the charger is not genuine.
[0009] In the embodiment of the present application, when charging, the electronic device can perform an anti-counterfeiting detection on the charger based on the anti-counterfeiting code, and when the charger fails the anti-counterfeiting detection based on the anti-counterfeiting code, a prompt message indicating that the charger is not genuine can be displayed. This technical solution is helpful for users to determine whether the charger is a counterfeit product.
[0010] 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 an anti-counterfeiting detection based on an anti-counterfeiting code, or when it is determined that the charger bypasses an anti-counterfeiting detection based on an anti-counterfeiting code, the method further includes: detecting the cable current carrying capacity of the charging cable; when it is determined that the charging device fails the detection, displaying a prompt message, including: when it is determined that the cable current carrying capacity of the charging cable fails the detection, displaying a second prompt message, the second prompt message being used to indicate that the charging cable is not genuine.
[0011] It should be understood that the cable current carrying capacity of the charging cable may also be referred to as the current carrying capacity of the charging cable.
[0012] In the embodiment of the present application, after the charger passes the anti-counterfeiting detection, or when the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the electronic device can also detect the cable current carrying capacity of the charging cable. If the cable current carrying capacity of the charging cable fails the detection, a prompt message indicating that the charging cable is not genuine is displayed. This technical solution can detect counterfeit charging cables, which is helpful for users to determine whether the charging cable is a counterfeit product.
[0013] 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.
[0014] In the embodiment of the present application, the electronic device can also directly detect the current carrying capacity of the charging cable, and when the detection fails, a prompt message indicating that the charging cable is not genuine is displayed. This technical solution can detect counterfeit charging cables, which is helpful for 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 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, detecting 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.
[0016] 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 is displayed to indicate that the charger is not genuine.
[0017] 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.
[0018] In combination with the first aspect, in an implementation method 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 detection; 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 detection.
[0019] In the embodiment of the present application, the electronic device can determine whether the charging power of the charger meets the standard according to the actual current on the charging line during the constant current stage. If the N judgment results are not up to standard, it can be determined that the charging power of the charger has not passed the test; otherwise, it has passed the test. This technical solution can make the charging power detection of the charger more accurate, avoid misjudgment, and thus improve a certain degree of fault tolerance.
[0020] In combination with the first aspect, in an implementation method 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, it is determined 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, it is determined that the charging power of the charger does not meet the standard.
[0021] This technology can determine whether the charging power of the charger meets the standard to further determine whether the charger is genuine.
[0022] In combination with the first aspect, in an implementation of the first aspect, the detecting 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 detection; 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 detection.
[0023] Based on the embodiment of the present application, the cable current carrying capacity of the charging cable can be detected by the relationship between the difference between the resistance of the charging cable and the preset resistance.
[0024] 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 a 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.
[0025] In the 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 determining whether the difference between the resistance of the charging cable and the preset resistance is less than or equal to the second threshold.
[0026] In combination with the first aspect, in an implementation of the first aspect, the detecting 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.
[0027] In the 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.
[0028] In combination with the first aspect, in an implementation of the first aspect, determining whether the maximum current passing through the charging line is less than or equal to the second target current includes: when determining that the type of the charging line is a universal serial bus USB-A interface and a USB-C interface A2C, determining whether the maximum current passing through the charging line is less than or equal to the second target current.
[0029] 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 based on the relationship between the maximum current passing through the charging cable and the target current.
[0030] 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.
[0031] In combination with the first aspect, in an implementation of the first aspect, the method also 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 a maximum power supported by both the electronic device and the charging device.
[0032] For example, the first charging method may be a super fast charging method.
[0033] The maximum power supported by the electronic device and the charging device can be understood as the minimum value 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 battery of the electronic device is 66W and the maximum power supported by the charging device is 88W, then the maximum power supported by the electronic device and the charging device is 66W.
[0034] In the embodiment of the present application, when it is determined that the charging device has passed 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 it is determined that the charging device is authentic, which can improve the safety of charging the electronic device.
[0035] 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, charging the electronic device using a second charging method; 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.
[0036] 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.
[0037] In combination with the first aspect, in an implementation of the first aspect, a charging power of the second charging method is less than 22.5 watts.
[0038] In combination with the first aspect, in an implementation manner of the first aspect, the charging power of the second charging method is 10 watts.
[0039] 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 described in the first aspect and any possible implementation thereof to be executed.
[0040] 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.
[0041] 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 methods thereof is executed.
[0042] In a fifth aspect, a computer-readable storage medium is provided, in which computer instructions are stored. When the computer instructions are executed on a computer, the charging anti-counterfeiting detection method as described in the first aspect and any possible implementation thereof is executed.
[0043] In a sixth aspect, a computer program product is provided, the computer program product comprising a computer program code, and 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
[0044] Figure 1 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0045] Figure 2 It is a schematic diagram of the software structure of the electronic device provided in the embodiment of the present application.
[0046] Figure 3It is a schematic diagram of a set of graphical user interfaces provided in an embodiment of the present application.
[0047] Figure 4 It is a schematic diagram of another set of graphical user interfaces provided in an embodiment of the present application.
[0048] Figure 5 It is a schematic diagram of another set of graphical user interfaces provided in an embodiment of the present application.
[0049] Figure 6 It is a schematic flow chart of a charging anti-counterfeiting detection method provided in an embodiment of the present application.
[0050] Figure 7 It is a schematic flow chart of another charging anti-counterfeiting detection method provided in an embodiment of the present application.
[0051] Figure 8 It is a schematic flow chart of another charging anti-counterfeiting detection method provided in an embodiment of the present application.
[0052] Fig. 9 It is a schematic flow chart of a charging anti-counterfeiting detection method provided in an embodiment of the present application.
[0053] Fig.10 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0055] 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.
[0056] Figure 11 shows a schematic diagram of the structure of the 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 screen 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.
[0057] It is to be understood that the structure illustrated in the embodiment of the present application does 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 in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0058] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0059] 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.
[0060] The processor 110 may also be provided with a memory for storing instructions and data.
[0061] In some embodiments, the processor 110 may include one or more interfaces. The interface 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, etc.
[0062] The charging management module 140 is used to receive charging input from a charger.
[0063] The power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 .
[0064] 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.
[0065] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the electronic device 100 .
[0066] The modulation and demodulation processor may include a modulator and a demodulator, wherein the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal, and the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
[0067] The wireless communication module 160 can provide wireless communication solutions for application in 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.
[0068] 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.
[0069] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0070] 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.
[0071] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0072] The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture still images or videos.
[0073] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals.
[0074] The video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs.
[0075] 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 .
[0076] The internal memory 121 may be used to store computer executable program codes, wherein the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121 .
[0077] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0078] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
[0079] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.
[0080] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.
[0081] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0082] The earphone jack 170D is used to connect a wired earphone.
[0083] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
[0084] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .
[0085] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0086] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
[0087] The distance sensor 180F is used to measure the distance.
[0088] The fingerprint sensor 180H is used to collect fingerprints.
[0089] The touch sensor 180K is also called a “touch panel.” The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen.”
[0090] Bone conduction sensor 180M can obtain vibration signals.
[0091] Buttons 190 include a power button, a volume button, and the like.
[0092] Motor 191 can generate vibration prompts.
[0093] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0094] The SIM card interface 195 is used to connect a SIM card.
[0095] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes an operating system of a layered architecture as an example to exemplify the software structure of the electronic device 100.
[0096] Figure 2 1 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the system library, and the kernel layer. The application layer can include a series of application packages.
[0097] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, wallet, etc.
[0098] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0099] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0100] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0101] 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.
[0102] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0103] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0104] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0105] 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.
[0106] The core library consists of two parts: one part is the function that the Java language needs to call, and the other part is the core library.
[0107] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0108] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0109] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0110] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0111] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0112] A 2D graphics engine is a drawing engine for 2D drawings.
[0113] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0114] Before introducing the technical solution of the present application, some technical terms that may be involved in the present application are briefly introduced as follows.
[0115] Normal charging: When an electronic device is charged, the charging current is less than 3A or the total charge capacity is less than 60% for 30 minutes; 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).
[0116] Fast charging: When an electronic device is charging, the charging current is >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 and less than 22.5W. For example, the target power is 10W or 15W.
[0117] Super fast charging: When electronic devices are charged, the maximum charging power is 22.5W or above.
[0118] When charging an electronic device, using an original authentic charger can ensure the safety of charging. For example, when an electronic device supports super-fast charging, the original super-fast charger can be used to charge the electronic device in super-fast charging mode. When an electronic device is super-fast charging, the charger will be authenticated for anti-counterfeiting, and super-fast charging can only be performed after the anti-counterfeiting authentication is passed. However, some counterfeit chargers may bypass the anti-counterfeiting authentication of the charger and charge the electronic device, posing a safety hazard to the electronic device.
[0119] 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.
[0120] In view of this, an embodiment of the present application provides a charging anti-counterfeiting detection method and an 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 can also detect the charging power of the charger in the constant current stage.
[0121] When the charging device passes the test, the electronic device can be charged in the first charging mode, which is to charge the electronic device using the maximum power supported by both the electronic device and the charging device. When the charging device fails the test, the electronic device is charged in the second charging mode, which has a charging power less than the maximum power supported by both the electronic device and the charging device. For example, the first charging mode is the super fast charging mentioned above, and the second charging mode is the normal charging mentioned above.
[0122] 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.
[0123] The following will introduce the technical solution of displaying prompt information to the user when it is detected that the charger or charging cable is not genuine in the embodiment of the present application in combination with several groups of graphical user interfaces (GUI).
[0124] Figure 3 is a schematic diagram of a set of GUIs provided in an embodiment of the present application. Figure 3 (a) to (d) in the figure show the process of displaying prompt information to the user when the electronic device identifies a counterfeit charger during charging.
[0125] See also Figure 3 In (a), the GUI is a display interface 310 of the electronic device 300. The display interface 310 may include several applications in the electronic device 300.
[0126] For example, when the electronic device 300 detects a charging operation, the charger may be subjected to an anti-counterfeiting test. When the charger fails the anti-counterfeiting test, the electronic device 300 may display a prompt message in the notification center. When the electronic device 300 detects that the user has opened the notification center, the following message may be displayed: Figure 3 The GUI shown in (b) in FIG. The charger anti-counterfeiting detection will be described below in conjunction with a specific embodiment, which will not be described in detail here.
[0127] See also Figure 3 In (b), the GUI is a display interface 320 of the notification center of the electronic device 300. The display interface 320 may include a prompt card 321, and the prompt card 321 may include text content "unable to fast charge" and "detected that the charger cannot fast charge, it is recommended to use official standard accessories". The prompt card 321 may also include a function button 322 to ignore the message and a function button 323 to view more.
[0128] It should be understood that the text content in the reminder card 321 is only illustrative and should not limit the present application. In other examples, the reminder card directly displays the text content "Please use a genuine charger" etc., as long as it can serve as a reminder.
[0129] 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 used is not genuine.
[0130] When the electronic device detects that the user clicks the function button 323, the following display may be displayed: Figure 3 GUI shown in (c) in FIG.
[0131] See also Figure 3 In (c), 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. Among them, the display card 331 may include the model information of the electronic device 300, for example, the display card 331 may include the appearance picture and model "HUAWEI MATE30 PRO" of the electronic device 300. The display card 332 may include a picture of the charger and the text content "It is recommended to use a compatible charger and USB data cable, which has a fast charging speed, is safe and stable". The display card 333 may include the text content "Buy a genuine charger" and a function button 3331 for immediate query. The display card 334 may include the text content "Detect charger" and a function button 3341 for immediate query. When the electronic device 300 detects that the user clicks the function button 3341, it can jump to the display interface for more information about the charger detection.
[0132] When the electronic device 300 detects that the user clicks the function button 3331, the following information may be displayed: Figure 3 GUI shown in (d).
[0133] See also Figure 3 In (d), the GUI may be a purchase display interface 340 of a charger in Huawei Mall that matches the battery of the electronic device 300. The display interface 340 may include various information of a genuine charger, and the user may conveniently purchase the charger directly in the display interface.
[0134] For example, if the battery of the 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 the user to directly purchase a genuine charger that matches the electronic device, avoiding the user spending more time searching and purchasing.
[0135] In an embodiment of the present application, when charging an electronic device, the electronic device can perform an anti-counterfeiting test on the charger, and when the anti-counterfeiting test fails, a prompt message can be displayed to remind the user that the charger currently used is not genuine. In addition, the electronic device can also guide the user to purchase a charger that matches the electronic device.
[0136] In some cases, the electronic device may also detect the current carrying capacity of the charging cable. When the current carrying capacity of the charging cable fails to be detected, the electronic device may display a prompt message in the display interface. Figure 4 Introduce the technical solution.
[0137] Figure 4 is a schematic diagram of another set of GUIs provided in an embodiment of the present application. Figure 4 (a) to (d) in the figure show the process of displaying prompt information to the user when the electronic device 400 identifies a counterfeit charging cable during charging.
[0138] It should be understood that Figure 4 For (a) in Figure 3 The relevant description of (a) in .
[0139] For example, when the electronic device 400 detects a charging operation, the current carrying capacity of the charging cable can be tested. When the current carrying capacity of the charging cable fails to be tested, the electronic device 400 can display a prompt message in the notification center. Figure 4 The GUI shown in (b) in FIG. The current carrying capacity detection of the charging cable will be described below in conjunction with a specific embodiment, which will not be described in detail here.
[0140] See also Figure 4 In (b), the GUI is a display interface 420 of the notification center of the electronic device 400. The display interface 420 may include a prompt card 421, and the prompt card 421 may include text content "Cannot verify that the data cable is original" and "It may reduce the charging speed, it is recommended to use official standard accessories". The prompt card 421 may also include a function button 422 to ignore the message and a function button 423 to view more.
[0141] It should be understood that the text content in the reminder card 421 is only illustrative and should 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.
[0142] 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 used is not genuine.
[0143] When the electronic device 400 detects that the user clicks the function button 423, the following information may be displayed: Figure 4 GUI shown in (c) in FIG.
[0144] See also Figure 4 In (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.
[0145] For the display card 431 , reference may be made to the related description of the display card 331 .
[0146] 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 includes text content “Buy an authentic charging cable” and a function button 4331 for immediate query.
[0147] It should be understood that the charging line in the embodiment of the present application can also be understood as a data line.
[0148] When the electronic device 400 detects that the user clicks the function button 4331, the following information may be displayed: Figure 4 GUI shown in (d).
[0149] See also Figure 4 In (d), the GUI may be a purchase display interface 440 of a charging cable that matches the battery of the electronic device 400 in Huawei Mall. The display interface 440 may include various information about the genuine charging cable, and the user can conveniently purchase the charging cable directly in the display interface. This helps guide the user to directly purchase the genuine charging cable that matches the electronic device, avoiding the user spending more time searching and purchasing.
[0150] In the embodiment of the present application, when charging an electronic device, the electronic device can detect the cable current carrying capacity of the charging cable. When the cable current carrying capacity test of the charging cable fails, a prompt message can be displayed to remind the user that the charging cable currently used 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.
[0151] In some cases, when the charger bypasses 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 charger in the constant current stage. When the charging power test of the charger fails, the electronic device can display a prompt message in the display interface. Figure 5 Introduce the technical solution.
[0152] Figure 5 is a schematic diagram of another set of GUIs provided in an embodiment of the present application. Figure 5 (a) to (d) in FIG. 5 show a process in which the electronic device 500 displays a prompt message to the user when it recognizes that the charging power of the charger is insufficient during charging.
[0153] It should be understood that Figure 5 For (a) in Figure 3 The relevant description of (a) in .
[0154] For example, when the electronic device 500 determines that the cable current carrying capacity of the charging cable has passed the detection, the charging power of the charger can be further detected in the constant current stage. When the charging power of the charger has not passed the detection, 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, it can display the following information: Figure 5 The GUI shown in (b) of FIG. The following will describe the detection of the charging power of the charger in the constant current stage in conjunction with a specific embodiment, which will not be described in detail here.
[0155] See also Figure 5 In (b), the GUI is a display interface 520 of the notification center of the electronic device 500. The display interface 520 may include a prompt card 521, and the prompt card 521 may include text content "The charger has insufficient charging power" and "The charger super-fast charging state is detected to be abnormal, and the charging speed is slow. It is recommended to use official standard accessories." The prompt card 521 may also include a function button 522 to ignore the message and a function button 523 to view more.
[0156] It should be understood that the text content in the reminder card 521 is only illustrative and should not limit the present application. In other examples, the reminder card directly displays the text content "Please use a genuine charger" etc., as long as it can serve as a reminder.
[0157] In other examples, when the electronic device 500 determines that the charging power detection of the charger in the horizontal constant current stage has not passed, 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.
[0158] When the electronic device 500 detects that the user clicks the function button 523, the following information may be displayed: Figure 5 GUI shown in (c) in FIG.
[0159] It should be understood that Figure 5 For (c) to (d) in Figure 3 The descriptions of (c) to (d) are omitted for brevity.
[0160] In an embodiment of the present application, when charging an electronic device, when the charger bypasses encryption authentication, the electronic device can detect the cable current carrying capacity of the charging cable. When the cable current carrying capacity of the charging cable passes the detection, the charging power of the charger can be further detected in the constant current stage. When the charging power of the charger fails to pass the detection, a prompt message is displayed to remind the user that the charger currently used is not genuine. In addition, the electronic device can also guide the user to purchase a charger that matches the electronic device to save the user's time.
[0161] 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 can also identify the charger as a counterfeit product.
[0162] The following will combine Figure 6-8 The technical solution of the charging anti-counterfeiting detection method provided in the embodiment of the present application is introduced. The technical solution can be applied to electronic devices.
[0163] Figure 6 is a schematic flow chart of a charging anti-counterfeiting detection method provided in an embodiment of the present application. Figure 6 As shown, the method 600 may include steps 601 to 608 .
[0164] 601, the electronic device detects a charging operation.
[0165] For example, a charging cable is connected to a charger, the charger is connected to a power source, and a user plugs the charging cable into a charging port of a mobile phone.
[0166] 602, the electronic device obtains the charger encryption authentication result.
[0167] 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 via 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 via the charging cable; the electronic device can determine whether the charger has passed the authentication based on the encrypted authentication code.
[0168] The encrypted authentication code may include multiple results such as -1, 1, and 0.
[0169] In the embodiment of the present application, the encrypted authentication of the charger can be understood as the anti-counterfeiting detection based on the anti-counterfeiting code. The charger passing the encrypted authentication can be understood as the charger passing the anti-counterfeiting detection based on the anti-counterfeiting code, and the charger bypassing the encrypted authentication can be understood as the charger bypassing the anti-counterfeiting detection based on the anti-counterfeiting code.
[0170] 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 sent by 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 not passed.
[0171] In some examples, the charger may also send information such as charger serial number, charger protocol, charger type, charger mode, charger maximum current, charger maximum power, etc. to the electronic device, so that the electronic device can determine various information of the charger.
[0172] 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.
[0173] 603 , the electronic device determines whether the charger passes the encryption authentication.
[0174] The electronic device can determine whether the charging has passed the encryption authentication based on the encrypted authentication code returned by the charger.
[0175] 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 bypasses the encryption authentication. It should be understood that bypassing encryption authentication can also be considered as passing encryption authentication, so that the electronic device can perform the process after passing encryption authentication.
[0176] When the encryption 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 encryption authentication.
[0177] Alternatively, the electronic device may determine that the charger has not passed the encryption authentication when the encryption authentication code is not obtained within a preset time.
[0178] 604. When the electronic device determines that the charger has not passed the encryption authentication, it displays a prompt message A, where the prompt message A is used to indicate that the charger is not genuine.
[0179] For example, see Figure 3 In (b), when the electronic device determines that the charger has not passed the encryption authentication, a reminder message can be displayed in the notification center to remind the user that the charger currently being used is not genuine.
[0180] 605 , the electronic device is charged according to the second charging method.
[0181] For example, a counterfeit charger claims to be a 66W super-fast charger. When the electronic device determines that the charger has not passed the encryption authentication, it cannot use the charger for super-fast charging, and charges in the second charging mode. For example, the second charging mode is the ordinary charging mode mentioned above, and the electronic device can control the maximum output voltage of the charger to be 5 volts (V) and the maximum output current to be 2 amperes (A).
[0182] In other examples, the second charging method may also be the fast charging method mentioned above.
[0183] 606. 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 detection.
[0184] When the type of the charging cable is a USB-A interface at one end and a USB-C interface at the other end (USB-AtoUSB-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.
[0185] Exemplarily, the electronic device may include a charging chip, which can apply a target voltage to the charging cable, determine the resistance of the charging cable by detecting the current on the charging cable, and store the resistance value in a register. When the electronic device detects the cable current carrying capacity of the charging cable, it can directly read the resistance value of the charging cable from the register and compare it with the standard value. When it is determined that the difference between the resistance of the charging cable and the preset resistance is less than a threshold value, it can be determined that the charging cable has passed the detection; otherwise, the electronic device determines that the charging cable has not passed the detection.
[0186] When the type of the charging cable is that both ends have USB-C interfaces (USB-C to USB-C, C2C), the electronic device can determine whether the charging cable passes the test by detecting the cable current carrying capacity of the charging cable. When the electronic device determines that the maximum current passing through the charging cable is greater than or equal to the preset current, it is determined that the charging cable passes the test. On the contrary, when it is determined that the maximum current passing through the charging cable is less than the preset current A, it is determined that the charging cable does not pass the test.
[0187] For example, the preset current is 5A. When 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.
[0188] It is understandable that the current carrying capacity of the charging cable is a characteristic of the charging cable itself.
[0189] 607, when the electronic device determines that the current carrying capacity of the charging cable has not passed the test, it displays a prompt message B to indicate that the charging cable is not genuine.
[0190] For example, see Figure 4 In (b), when the electronic device determines that the current carrying capacity of the charging cable has not passed the detection, a prompt message can be displayed.
[0191] After step 607, step 605 may be performed so that the electronic device is charged in a common charging manner.
[0192] 608. When the electronic device determines that the current carrying capacity of the charging cable passes the test, the electronic device is charged according to the first charging method.
[0193] Exemplarily, 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.
[0194] 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.
[0195] It is understandable that when the charger or charging cable fails the detection, the electronic device can be charged in the second charging mode, and cannot be charged at the maximum power supported by the charging device and the electronic device. And the electronic device can display a prompt message to remind the user that the current charger or charging cable is not genuine, helping the user to identify counterfeit products.
[0196] In some cases, when charging, the electronic device may not perform encryption authentication on the charger, but instead detect the current carrying capacity of the charging cable and the charging power of the charger. Figure 6 Introduce the technical solution.
[0197] Figure 7 is a schematic flow chart of a charging anti-counterfeiting detection method provided in an embodiment of the present application. Figure 7 As shown, the method 700 may include steps 701 to 707 .
[0198] 701, the electronic device detects a charging operation.
[0199] 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.
[0200] 702 , the electronic device determines whether the charging cable passes the detection.
[0201] 703. When the electronic device determines that the charging cable has not passed the test, a prompt message is displayed, where the prompt message can be used to indicate that the charging cable is not genuine.
[0202] It should be understood that the steps 702-703 can refer to the relevant descriptions of steps 606-607, and for the sake of brevity, they are not repeated here.
[0203] 704, the electronic device is charged according to the second charging method.
[0204] It should be understood that the step 704 can refer to the relevant description of step 605, and for the sake of brevity, it will not be repeated here.
[0205] 705 , when the electronic device determines that the charging line passes the detection, determine whether the charging power of the charger passes the detection in the constant current stage.
[0206] 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 detection in the constant current stage.
[0207] For example, when charging, the charger can adjust the current step by step, and after a period of time, the current reaches a constant value. At this time, the electronic device can determine whether the difference between the actual current on the charging line and the preset current B is less than or equal to the 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, it is determined that the charging power of the charger has passed the test; otherwise, it is determined that the charging power of the charger has not passed the test.
[0208] 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 not passed the test; otherwise, it is determined that the charging power of the charger has passed the test.
[0209] 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 greatly 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.
[0210] 706. When the electronic device determines that the charging power of the charger has not passed the test, a prompt message C is displayed. The prompt message C can be used to indicate that the charger is not genuine.
[0211] For example, see Figure 5 In (b), 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 can be displayed to remind the user that the charger is not genuine.
[0212] After step 706 , step 704 may be performed.
[0213] 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.
[0214] Exemplarily, 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 detection, the electronic device can be charged at the maximum power of 66W.
[0215] 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 passes the test, it is further determined whether the charging power of the charger is normal during the constant current stage. When the electronic device determines that the charging power of the charger is abnormal during the constant current stage, a prompt message may be displayed to remind the user that the charger is not genuine. When the electronic device determines that the charging power of the charger is normal during the constant current stage, a first charging method is used for charging, for example, the first charging method is super fast charging.
[0216] In this way, when the cable current carrying capacity of the charging cable fails to pass the detection, or the charging power detection of the charger fails to pass, the electronic device can be charged in the second charging mode, and cannot be charged at the maximum power supported by the charging device and the electronic device. And the electronic device can display a prompt message to remind the user that the current charging cable or charger is not genuine, helping the user to identify counterfeit products.
[0217] In some cases, when an electronic device is charging, it is possible to 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 stage. Figure 8 Introduce the technical solution.
[0218] Figure 8 is a schematic flow chart of a charging anti-counterfeiting detection method provided in an embodiment of the present application. Figure 8As shown, the method 800 may include steps 801 to 810 .
[0219] 801, the electronic device detects a charging operation.
[0220] 802, the electronic device obtains the charger encryption authentication result.
[0221] 803 , the electronic device determines whether the charger passes the encryption authentication.
[0222] 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.
[0223] 805. The electronic device is charged according to the second charging method.
[0224] 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 detection.
[0225] 807, when the electronic device determines that the current carrying capacity of the charging cable has not passed the test, it displays a prompt message B, where the prompt message B is used to indicate that the charging cable is not genuine.
[0226] It should be understood that the steps 801-807 can refer to the relevant description of steps 601-607, and for the sake of brevity, they are not repeated here.
[0227] In the embodiment of the present application, when the electronic device determines that the charger has passed the encryption authentication or the charger bypasses the encryption authentication, the cable current carrying capacity of the charging cable is further detected. After the cable current carrying capacity of the charging cable passes the detection, in the case where the charger bypasses the encryption authentication, the charging power of the charger needs to be detected in the constant current stage.
[0228] 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 stage.
[0229] 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 in the foregoing text.
[0230] 809. When the electronic device determines that the charging power of the charger does not pass the test in the constant current stage, a prompt message C is displayed. The prompt message C is used to indicate that the charger is not genuine.
[0231] It should be understood that the step 809 may refer to the relevant description of the step 706 .
[0232] 810. The electronic device is charged according to a first charging method.
[0233] It should be understood that the step 810 may refer to the relevant description of step 707 .
[0234] In one embodiment of the present application, when charging, the electronic device can perform encryption authentication on the charger, detect the current carrying capacity of the charging cable, and detect the charging power of the charger in the constant current stage. When the test fails, the electronic device can display a prompt message to remind the user that the corresponding product is not genuine.
[0235] 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.
[0236] In other embodiments, when charging, the electronic device may first perform encryption authentication on the charger, and when the charger encryption authentication fails, a prompt message may be displayed to indicate that the charger is not genuine. When the charger encryption authentication passes, or the charger bypasses the encryption authentication, the electronic device may not detect the cable current carrying capacity of the charging cable, but further determine whether the charging power of the charger passes the test in the constant current stage. When the charging power of the charger fails to pass the test, the electronic device displays a prompt message to indicate that the charger or charging cable is not genuine.
[0237] It can be understood 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 protection scope of the present application.
[0238] Fig. 9 is a schematic flow chart of a charging anti-counterfeiting detection method provided in an embodiment of the present application. Fig. 9 As shown, the method 900 may be applied in an electronic device, and the method 900 may include steps 910 to 920.
[0239] 910. When the electronic device is being charged, an anti-counterfeiting detection is performed on the charging device used.
[0240] Exemplarily, 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, a charging accessory, etc.
[0241] 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.
[0242] In other examples, the electronic device may also detect the charging protocol used by the charging device before performing anti-counterfeiting detection on 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.
[0243] 920. 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.
[0244] For example, see 3 and Figure 5 When the charger fails the test, the electronic device may display a prompt message to remind the user that the charger is not genuine.
[0245] For example, see Figure 4 When the current carrying capacity of the charging cable fails to pass the test, the electronic device can display a prompt message to remind the user that the charging cable is not genuine.
[0246] Alternatively, the prompt information may also be used to prompt that the charging device is incompatible or mismatched with the charger.
[0247] In the embodiment of the present application, when the electronic device identifies that the charger or charging cable is a counterfeit product, prompt information is displayed in time to remind the user that the corresponding charging device is not genuine, thereby facilitating the user to identify counterfeit charging devices and guiding the user to purchase genuine charging devices.
[0248] In some embodiments, the charging device includes a charger, wherein the anti-counterfeiting detection is performed on the used charging device, including:
[0249] Conduct anti-counterfeiting detection on the charger based on the anti-counterfeiting code;
[0250] If it is determined that the charging device has not passed the test, a prompt message is displayed, including:
[0251] 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.
[0252] For example, see Figure 3 , the first prompt information may be a prompt card 321 .
[0253] It should be understood that the anti-counterfeiting detection based on the anti-counterfeiting code may be the encryption authentication mentioned above.
[0254] In the embodiment of the present application, when charging, the electronic device can perform an anti-counterfeiting detection on the charger based on the anti-counterfeiting code, and when the charger fails the anti-counterfeiting detection based on the anti-counterfeiting code, a prompt message indicating that the charger is not genuine can be displayed. This technical solution is helpful for users to determine whether the charger is a counterfeit product.
[0255] 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 anti-counterfeiting code, or when it is determined that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the method 900 may further include:
[0256] Test the current carrying capacity of the charging cable;
[0257] If it is determined that the charging device has not passed the test, a prompt message is displayed, including:
[0258] When it is determined that the current carrying capacity of the charging cable has not passed the test, a second prompt message is displayed, and the second prompt message is used to indicate that the charging cable is not genuine.
[0259] For example, see Figure 4 , the second prompt information can prompt card 421.
[0260] It should be understood that the cable current carrying capacity of the charging cable may also be referred to as the current carrying capacity of the charging cable.
[0261] In the embodiment of the present application, after the charger passes the encryption authentication, or when the charger bypasses the encryption authentication, the electronic device can also detect the cable current carrying capacity of the charging cable. If the cable current carrying capacity of the charging cable fails to pass the test, a prompt message indicating that the charging cable is not genuine is displayed. This technical solution can detect counterfeit charging cables, which is helpful for users to determine whether the charging cable is a counterfeit product.
[0262] In some embodiments, 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 900 may further include:
[0263] When it is determined that the charger bypasses the anti-counterfeiting detection based on the anti-counterfeiting code, the charging power of the charger is detected in the constant current stage;
[0264] If it is determined that the charging device has not passed the test, a prompt message is displayed, including:
[0265] When it is determined that the charging power of the charger fails the test, a third prompt message is displayed, and the third prompt message is used to indicate that the charger is not genuine.
[0266] For example, see Figure 5 , the third prompt information can be a prompt card 521.
[0267] In an embodiment of the present application, when the charging cable passes the 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 is displayed to indicate that the charger is not genuine.
[0268] 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.
[0269] In some embodiments, detecting the charging power of the charger in the constant current stage includes:
[0270] During the constant current phase, determine the actual current on the charging line;
[0271] The charging power of the charger is judged N times according to the actual current, where N is a positive integer greater than 1;
[0272] If the results of N judgments are all unsatisfactory, it is determined that the charging power of the charger has not passed the test; or,
[0273] 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.
[0274] In the embodiment of the present application, the electronic device can determine whether the charging power of the charger meets the standard according to the actual current on the charging line during the constant current stage. If the N judgment results are not up to standard, it can be determined that the charging power of the charger has not passed the test; otherwise, it has passed the test. This technical solution can make the charging power detection of the charger more accurate, avoid misjudgment, and thus improve a certain degree of fault tolerance.
[0275] In some embodiments, the charging power of the charger is determined N times according to the actual current, including:
[0276] 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;
[0277] 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.
[0278] 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.
[0279] This technology can determine whether the charging power of the charger meets the standard to further determine whether the charger is genuine.
[0280] In some embodiments, detecting the current carrying capacity of the charging cable includes:
[0281] Determining whether a difference between a resistance of the charging line and a preset resistance is less than or equal to a second threshold;
[0282] 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 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 not passed the test;
[0283] 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:
[0284] When it is determined that the type of the charging line is C2C, it is determined whether a difference between a resistance of the charging line and a preset resistance is less than or equal to a second threshold.
[0285] In the 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 determining whether the difference between the resistance of the charging cable and the preset resistance is less than or equal to the second threshold.
[0286] In some embodiments, the cable current carrying capacity of the charging cable is detected, 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.
[0287] The embodiment of the present application does not limit the specific value of the second threshold. For example, the second threshold may be 0.05, 0.1, etc.
[0288] In some embodiments, determining whether the maximum current passing through the charging line is less than or equal to the second target current includes:
[0289] 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.
[0290] The embodiment of the present application does not limit the specific value of the second target current. For example, the second target current may be 5A or 6A.
[0291] In the 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.
[0292] In some embodiments, determining that the charger bypasses anti-counterfeiting detection based on the anti-counterfeiting code includes:
[0293] 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.
[0294] 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.
[0295] In some embodiments, the method 900 may further include:
[0296] 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.
[0297] For example, the first charging method may be a super fast charging method.
[0298] The maximum power supported by the electronic device and the charging device can be understood as the minimum value 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 battery of the electronic device is 66W and the maximum power supported by the charging device is 88W, then the maximum power supported by the electronic device and the charging device is 66W.
[0299] In the embodiment of the present application, when it is determined that the charging device has passed the test, it can be determined that the charging device is genuine, 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 it is determined that the charging device is genuine, which can improve the safety of charging the electronic device.
[0300] In some embodiments, the method 900 may further include:
[0301] When 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.
[0302] 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 common charging mode mentioned above, such as charging the electronic device at 5V and 2A.
[0303] In an embodiment of the present application, when it is determined that the charging device has not passed 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.
[0304] In some embodiments, the charging power of the second charging method is less than 22.5 watts.
[0305] In some embodiments, the charging power of the second charging method is 10 watts. For example, charging is performed using 5V and 2A.
[0306] Fig.10 is a schematic block diagram of an electronic device provided in an embodiment of the present application. Fig.10 As shown, the electronic device 1000 may include one or more processors 1010; one or more memories 1020; the one or more memories 1020 store one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors 1010, the charging anti-counterfeiting detection method described in any possible implementation method described above is executed.
[0307] Exemplarily, 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.
[0308] An embodiment of the present application also provides a chip, which includes 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 any possible implementation method described above is executed.
[0309] This embodiment also provides a computer-readable storage medium, in which computer instructions are stored. 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.
[0310] This embodiment also 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.
[0311] 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 so that the chip executes the charging anti-counterfeiting detection method in the above-mentioned method embodiments.
[0312] 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.
[0313] Those of ordinary skill 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 to be beyond the scope of this application.
[0314] Those skilled in the art can 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.
[0315] In the several embodiments provided in the present 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, 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.
[0316] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0317] 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.
[0318] 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 can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0319] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope 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, 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, 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.
