CN116231815A - Method for controlling charging and electronic equipment - Google Patents

Method for controlling charging and electronic equipment Download PDF

Info

Publication number
CN116231815A
CN116231815A CN202310520273.8A CN202310520273A CN116231815A CN 116231815 A CN116231815 A CN 116231815A CN 202310520273 A CN202310520273 A CN 202310520273A CN 116231815 A CN116231815 A CN 116231815A
Authority
CN
China
Prior art keywords
electronic device
mobile phone
charge
cable
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310520273.8A
Other languages
Chinese (zh)
Other versions
CN116231815B (en
Inventor
杨运猛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310520273.8A priority Critical patent/CN116231815B/en
Publication of CN116231815A publication Critical patent/CN116231815A/en
Application granted granted Critical
Publication of CN116231815B publication Critical patent/CN116231815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4072Drivers or receivers
    • G06F13/4077Precharging or discharging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4081Live connection to bus, e.g. hot-plugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits
    • H02J7/0036Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits using connection detecting circuits
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits
    • H02J7/0048Detection of remaining charge capacity or state of charge [SOC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/02Details
    • H04B3/04Control of transmission; Equalising
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/02Details
    • H04B3/46Monitoring; Testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/60Systems for communication between relatively movable stations, e.g. for communication with lift
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Secondary Cells (AREA)

Abstract

The embodiment of the application relates to the technical field of charging, in particular to a method for controlling charging and an electronic device, wherein after two electronic devices are connected through a C-C cable, only data are transmitted between the electronic devices to control the electronic devices not to charge each other, and the electric quantity of the electronic devices is saved. The method is applied to the first electronic equipment with the first USB Type-C interface. The method comprises the following steps: after the first electronic device detects that the first USB Type-C interface is connected with a second USB Type-C interface of the second electronic device through a Type-C cable, judging whether the first electronic device and the second electronic device are in data transmission through the Type-C cable; if the first electronic device and the second electronic device are transmitting data through the Type-C cable, the first electronic device controls the first electronic device not to charge the second electronic device or refuses the second electronic device to charge the first electronic device.

Description

Method for controlling charging and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of charging, in particular to a method for controlling charging and electronic equipment.
Background
The universal serial bus (universal serial bus, USB) is a serial bus standard and is widely applied to various electronic devices such as mobile phones, computers and the like. The electronic device may have a USB interface. The USB interface of the electronic device may be connected to various external devices for data transmission or charging.
The USB interface includes multiple types, such as a Micro USB interface, a USB Type-C interface, a USB Type-A interface, a USB Type-B interface, and the like. The USB Type-C interface is a novel USB interface Type. The Type-C interface is widely applied to electronic equipment because of the advantages of supporting forward and backward symmetric plug, supporting larger power transmission, supporting bidirectional power transmission and the like.
Two electronic equipment with USB Type-C interface can be through both ends being the cable of USB Type-C interface and directly link. After direct connection, one electronic device is randomly defined as a master device, and the other electronic device is a slave device. The master device provides a charging current for the slave device (i.e., the master device charges the slave device). In the conventional technology, the master device continuously charges the slave device, and the situation that the power of the electronic device is exhausted may occur.
Disclosure of Invention
The application provides a method for controlling charging and electronic equipment, which are used for solving the problem that after two electronic equipment with USB Type-C interfaces are directly connected through a C-C cable, one electronic equipment (master equipment) charges the other electronic equipment (slave equipment), so that the electric quantity of the electronic equipment is exhausted.
In order to achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
In a first aspect, a method for controlling charging is provided, where the method is applied to a first electronic device, and the first electronic device has a first USB Type-C interface. The method may include: after detecting that the first USB Type-C interface is connected with the second USB Type-C interface of the second electronic device through the Type-C cable, the first electronic device further detects whether data are transmitted between the first electronic device and the second electronic device through the Type-C cable. And when the first electronic device and the second electronic device are detected to transmit data through the Type-C cable, the first electronic device can not charge the second electronic device or the first electronic device refuses to charge the second electronic device.
In the scheme, after the first electronic device and the second electronic device are connected through the Type-C cable, the first electronic device can detect whether the first electronic device and the second electronic device are transmitting data through the Type-C cable. As long as the first electronic device detects that the two electronic devices are transmitting data through the Type-C cable, the first electronic device may not charge the opposite terminal device (the second electronic device), or the first electronic device refuses to charge itself to the opposite terminal. Therefore, the function of only transmitting data without mutual charging can be realized, and the requirements of customers are met. Meanwhile, the phenomenon that the electronic equipment is continuously charged only through the connection of the Type-C cable is avoided, and the electric quantity of the electronic equipment is saved.
In a possible implementation manner of the first aspect, the first electronic device detects that the first electronic device and the second electronic device are transmitting data through the Type-C cable, and the first electronic device may not charge the second electronic device according to the data transmission direction.
Specifically, the data transmission direction includes the first electronic device acquiring data from the second electronic device, or the first electronic device sending data to the second electronic device. Taking the example that the first electronic device obtains data from the second electronic device, for example, the first electronic device recognizes that the first electronic device copies the data from the second electronic device, because the power consumption of the first electronic device is larger, the first electronic device can not charge the second electronic device, so that the electric quantity of the first electronic device is saved, and the problem that the data transmission is failed possibly due to the insufficient electric quantity of the first electronic device is avoided.
In another possible implementation manner of the first aspect, the first electronic device detects that the first electronic device and the second electronic device are transmitting data through the Type-C cable, and the first electronic device may further control the first electronic device not to charge the second electronic device according to power consumption of the first electronic device when the power consumption is greater.
Specifically, the first electronic device may identify whether the first electronic device is running a preset application, where the preset application may be a high power consumption application, and the high power consumption application may be a game application, a video application, or the like. The first electronic device recognizes that the first electronic device is running the preset application, and the first electronic device can control the first electronic device not to charge the second electronic device. Alternatively, the first electronic device may also identify whether the application that the first electronic device is running is a power-hungry application, e.g., the first electronic device may identify whether the power consumption of the running application is greater than a preset power consumption threshold. If the first electronic device identifies that the power consumption of the running application is greater than the preset power consumption threshold, the first electronic device identifies the application as the application with the greater power consumption, and the first electronic device can control the first electronic device not to charge the second electronic device. In the scheme, the first electronic device can further detect the current power consumption condition of the first electronic device when recognizing that the data are transmitted between the electronic device and the second electronic device, and the first electronic device controls the first electronic device not to charge the second electronic device when the power consumption of the first electronic device is larger.
In another possible implementation manner of the first aspect, the first electronic device detects that the first electronic device and the second electronic device are transmitting data through the Type-C cable, and the first electronic device may further obtain remaining power of the first electronic device and the second electronic device, and control the first electronic device not to charge the second electronic device according to the remaining power of the two parties.
Specifically, the remaining power of the first electronic device is smaller than the first power threshold, which indicates that the remaining power of the first electronic device is smaller, and the remaining power of the second electronic device is larger than the second power threshold, which indicates that the remaining power of the second electronic device is more sufficient. When the remaining power of the first electronic device is smaller than the first power threshold and/or the remaining power of the second electronic device is larger than the second power threshold, the first electronic device can control the first electronic device not to charge the second electronic device.
In another possible implementation manner of the first aspect, further, after the first electronic device controls the first electronic device not to charge the second electronic device, the first electronic device switches a charging role with the second electronic device, and the first electronic device accepts that the second electronic device charges the first electronic device.
That is, as long as the first electronic device switches the charging roles after controlling the first electronic device not to charge the second electronic device, the first electronic device is charged by the second electronic device. Particularly, when the first electronic device acquires data from the second electronic device, or the first electronic device consumes more power, or the first electronic device has less residual electric quantity and/or the second electronic device has more residual electric quantity, the first electronic device can accept the second electronic device to charge the first electronic device after controlling the first electronic device not to charge the second electronic device, so that the electric quantity exhaustion of the first electronic device can be effectively avoided.
In another possible implementation manner of the first aspect, the first electronic device detects that the first electronic device and the second electronic device are transmitting data through the Type-C cable, and the first electronic device may reject the second electronic device to charge the first electronic device according to a data transmission direction.
Specifically, the data transmission direction may further include the second electronic device acquiring data from the first electronic device, or the second electronic device sending data to the first electronic device. Taking the example that the second electronic device obtains data from the first electronic device, for example, the first electronic device recognizes that the second electronic device copies the data from the first electronic device, because the power consumption of the second electronic device is larger, the first electronic device can refuse the second electronic device to charge the first electronic device, thereby saving the electric quantity of the second electronic device and avoiding the failure of data transmission possibly caused by the insufficient electric quantity of the second electronic device.
In another possible implementation manner of the first aspect, the first electronic device detects that the first electronic device and the second electronic device are transmitting data through the Type-C cable, and the first electronic device may further obtain remaining power of the first electronic device and the second electronic device, and refuse the second electronic device to charge the first electronic device according to the remaining power of the two parties.
Specifically, the remaining power of the second electronic device is smaller than the third power threshold, which indicates that the remaining power of the second electronic device is smaller, and the remaining power of the first electronic device is larger than the fourth power threshold, which indicates that the remaining power of the first electronic device is more sufficient. And when the residual electric quantity of the second electronic device is smaller than the third electric quantity threshold value and/or the residual electric quantity of the first electronic device is larger than the fourth electric quantity threshold value, the first electronic device can refuse the second electronic device to charge the first electronic device.
In another possible implementation manner of the first aspect, further, after the first electronic device refuses to charge the second electronic device for the first electronic device, the first electronic device switches a charging role with the second electronic device, and the first electronic device charges the second electronic device through the Type-C cable. Thus, the electric quantity of the second electronic equipment can be saved.
In a second aspect, the present application provides an electronic device comprising: memory, USB Type-C interface, and one or more processors. The USB Type-C interface is used for establishing USB connection with the electronic equipment with the USB Type-C interface. A memory is coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions. The computer instructions, when executed by the processor, cause the electronic device to perform the steps of: after the first electronic device detects that the first USB Type-C interface is connected with a second USB Type-C interface of the second electronic device through a Type-C cable, judging whether the first electronic device and the second electronic device are in data transmission through the Type-C cable; if the first electronic device and the second electronic device are transmitting data through the Type-C cable, the first electronic device controls the first electronic device not to charge the second electronic device or refuses the second electronic device to charge the first electronic device.
With reference to the second aspect, in one possible design manner, the computer instructions, when executed by the processor, cause the electronic device to further perform the following steps: if the first electronic device and the second electronic device are transmitting data through the Type-C cable, and the data transmission direction is that the first electronic device obtains data from the second electronic device, the first electronic device does not charge the second electronic device.
With reference to the second aspect, in one possible design manner, the computer instructions, when executed by the processor, cause the electronic device to further perform the following steps: if the first electronic device and the second electronic device are transmitting data through the Type-C cable, the first electronic device identifies whether the first electronic device is running the first application; the first application is a preset application, or the first application is an application with power consumption larger than a preset power consumption threshold; and if the first electronic device is running the first application, the first electronic device controls the first electronic device not to charge the second electronic device.
With reference to the second aspect, in one possible design manner, the computer instructions, when executed by the processor, cause the electronic device to further perform the following steps: if the first electronic device and the second electronic device are in data transmission through the Type-C cable, the first electronic device obtains the residual electric quantity of the first electronic device and the residual electric quantity of the second electronic device; if the residual electric quantity of the first electronic device is smaller than the first electric quantity threshold value, the residual electric quantity of the second electronic device is larger than the second electric quantity threshold value, the first electronic device controls the first electronic device not to charge the second electronic device,
With reference to the second aspect, in one possible design manner, the computer instructions, when executed by the processor, cause the electronic device to further perform the following steps: after the first electronic device does not charge the second electronic device, the first electronic device and the second electronic device switch the charging roles, and the second electronic device is accepted to charge the first electronic device.
With reference to the second aspect, in one possible design manner, the computer instructions, when executed by the processor, cause the electronic device to further perform the following steps: if the first electronic device and the second electronic device are transmitting data through the Type-C cable, and the data transmission direction is that the second electronic device obtains data from the first electronic device, the first electronic device refuses the second electronic device to charge the first electronic device.
With reference to the second aspect, in one possible design manner, the computer instructions, when executed by the processor, cause the electronic device to further perform the following steps: if the first electronic device and the second electronic device are in data transmission through the Type-C cable, the first electronic device obtains the residual electric quantity of the first electronic device and the residual electric quantity of the second electronic device; and if the residual electric quantity of the second electronic device is smaller than the third electric quantity threshold value, the residual electric quantity of the first electronic device is larger than the fourth electric quantity threshold value, and the first electronic device refuses to charge the second electronic device for the first electronic device.
With reference to the second aspect, in one possible design manner, the computer instructions, when executed by the processor, cause the electronic device to further perform the following steps: after the first electronic equipment refuses the second electronic equipment to charge the first electronic equipment, the first electronic equipment and the second electronic equipment switch the charging roles, and the second electronic equipment is charged through the Type-C cable.
In a third aspect, the present application provides a chip system that may be applied to an electronic device including a memory. The system-on-chip includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a wire. The interface circuit is configured to receive signals from the memory and to send the signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device performs the method as in the first aspect and any one of its possible designs.
In a fourth aspect, the present application provides a computer-readable storage medium comprising computer instructions. When executed on an electronic device, the computer instructions cause the electronic device to perform a method as in the first aspect and any one of its possible designs.
In a fifth aspect, the present application provides a computer program product for, when run on a computer, causing the computer to perform the method as in the first aspect and any one of its possible designs.
It may be appreciated that the advantages achieved by the electronic device according to any of the possible designs of the second aspect, the chip system according to the third aspect, the computer readable storage medium according to the fourth aspect, and the computer program product according to the fifth aspect may refer to the advantages as in the first aspect and any of the possible designs thereof, and are not described herein.
Drawings
Fig. 1 is a schematic diagram of mutual charging between mobile phones through a C-C cable according to an embodiment of the present application;
fig. 2 is a schematic diagram of charging each other and transmitting data between mobile phones through a C-C cable according to an embodiment of the present application;
fig. 3 is a schematic diagram of another mobile phone according to an embodiment of the present application, where the mobile phones are mutually charged and data are transmitted through a C-C cable;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic software architecture of an electronic device according to an embodiment of the present application;
fig. 6 is a flowchart of a method for identifying whether a connected electronic device is a second electronic device with USB Type C according to an embodiment of the present application;
Fig. 7 is a flowchart of a method for controlling charging according to an embodiment of the present disclosure;
fig. 8 is a flowchart of a method for controlling charging in combination with power consumption of an electronic device according to an embodiment of the present application;
fig. 9 is a flowchart of a method for controlling charging in combination with a remaining power of an electronic device according to an embodiment of the present application;
fig. 10 is a flowchart of a method for controlling charging in combination with power consumption and residual power of an electronic device according to an embodiment of the present application;
fig. 11 is a flowchart of another method for controlling charging in combination with a remaining power of an electronic device according to an embodiment of the present application;
fig. 12 is an interaction schematic diagram of internal modules of an electronic device according to an embodiment of the present application.
Detailed Description
The universal serial bus (universal serial bus, USB) is a serial bus standard and is widely applied to various electronic devices such as mobile phones, computers and the like. The electronic device may have a USB interface. The USB interface of the electronic device may be connected to various external devices for data transmission or charging.
The USB interface includes multiple types, such as a Micro USB interface, a USB Type-C interface, a USB Type-A interface, a USB Type-B interface, and the like. The USB Type-C interface is a novel USB interface Type. The USB Type-C interface is widely used in electronic devices because it has the advantages of supporting forward and backward symmetric plug, supporting higher power transmission, supporting bidirectional power transmission, and the like.
Two electronic devices with USB Type-C interfaces can establish connection through USB Type-C to USB Type-C cables (C-C cables for short). The interfaces at the two ends of the C-C cable are USB Type-C interfaces. In the related art, after a connection is established, two electronic devices randomly designate one as a master device and the other as a slave device. The master device charges the slave device, i.e. the master device provides a charging current for the slave device. As long as two electronic devices establish a connection through a C-C cable, there must be a case where one electronic device charges the other electronic device.
Taking the example of the mobile phone establishing connection with the mobile phone, fig. 1 shows the case where the mobile phone A1 charges the mobile phone B1.
As shown in fig. 1, after the mobile phone A1 and the mobile phone B1 are connected through the C-C cable, the mobile phone A1 may be randomly designated as a master device, and the mobile phone B1 is a slave device. The mobile phone A1 charges (supplies power to) the mobile phone B1. The charging direction of fig. 1 is from the mobile phone A1 to the mobile phone B1. For example, the current for charging handset B1 by handset A1 may be 500mA.
After the mobile phone A1 and the mobile phone B1 are connected through the C-C cable, the mobile phone B1 can be randomly designated as a master device, and the mobile phone A1 is a slave device. The mobile phone B1 charges the mobile phone A1. At this time, the charging direction between the two mobile phones is from mobile phone B1 to mobile phone A1.
That is, as long as two electronic devices with USB Type-C interfaces are connected through a C-C cable, it is certain that one of the electronic devices charges the other electronic device. For example, in fig. 1, the mobile phone A1 charges the mobile phone B1 or the mobile phone B1 charges the mobile phone A1.
The two electronic devices may be charged not only by the C-C cable, but also may transmit data by the C-C cable.
For example, take a mobile phone to mobile phone connection as shown in fig. 2. The mobile phone A2 is connected with the mobile phone B2 through a C-C cable. The mobile phone A2 can charge the mobile phone B2, and the charging direction between the two mobile phones is from the mobile phone A2 to the mobile phone B2. The data direction between two mobile phones is the mobile phone A2 to the mobile phone B2, and it should be noted that the "data direction" in the embodiment of the present application refers to the direction of the accessed party from the party accessing the data, and may also be referred to as the data transmission direction. For example, handset A2 may access data in handset B2 and obtain data from handset B2. Handset A2 may also access handset B2 and send data to handset B2. In fig. 2, the data direction between two handsets is from handset A2 to handset B2. The charging direction between the mobile phone A2 and the mobile phone B2 is consistent with the data direction.
Still take the mobile phone to establish a connection with the mobile phone as shown in fig. 3. The mobile phone A3 is connected with the mobile phone B3 through a C-C cable. The mobile phone A3 can charge the mobile phone B3, and the charging direction between the two mobile phones is from the mobile phone A3 to the mobile phone B3. The mobile phone B3 can access the data in the mobile phone A3 and acquire the data from the mobile phone A3. In fig. 3, the data direction between two handsets is from handset B3 to handset A3, and the charging direction between the two handsets is opposite.
In summary, no matter whether the charging direction between two electronic devices is consistent with the data direction or the charging direction between two electronic devices is inconsistent with the data direction, no matter whether data transmission is needed between two electronic devices or not; as long as two electronic devices are connected by a C-C cable, a charging signal is transmitted to charge.
In some scenarios, after two electronic devices are connected by a C-C cable, a user may simply want to transfer data directly between the electronic devices without the two devices being charged to each other. That is, even if two electronic devices are connected by a C-C cable, charging may not be required.
Therefore, the embodiment of the application provides a method for controlling charging, which can be applied to electronic equipment (such as a first electronic equipment and a second electronic equipment) with an USB Type-C interface. After the first electronic device is connected with the second electronic device through the C-C cable, the first electronic device can identify whether the first electronic device and the second electronic device are transmitting data through the C-C cable. If the first electronic device and the second electronic device are transmitting data through the C-C cable, the first electronic device can stop charging the second electronic device. Or if the first electronic device and the second electronic device are transmitting data through the C-C cable, the first electronic device may also refuse the second electronic device to charge the first electronic device. Therefore, even if the first electronic device is connected with the second electronic device through the C-C cable, data can be transmitted only through the C-C cable without mutual charging, the electric quantity of the electronic device can be saved, and the power consumption of the electronic device is reduced.
Taking fig. 2 as an example, the mobile phone A2 is taken as a master device, the mobile phone B2 is taken as a slave device, the mobile phone A2 recognizes that the mobile phone A2 and the mobile phone B2 are transmitting data through the C-C cable, and the mobile phone A2 can control the mobile phone A2 not to charge the mobile phone B2. Similarly, the mobile phone A2 is a slave device, the mobile phone B2 is a master device, the mobile phone A2 recognizes that the mobile phone A2 and the mobile phone B2 are transmitting data through the C-C cable, and the mobile phone A2 can reject the mobile phone B2 to charge the mobile phone A2. Therefore, only data can be transmitted without mutual charging, and the electric quantity of the mobile phone A2 or the mobile phone B2 is effectively saved.
The method for controlling charging provided by the embodiment of the application can be applied to first electronic equipment, and the first electronic equipment is connected with second electronic equipment through a C-C cable.
The first electronic device and the second electronic device may include a mobile phone, a tablet computer, a notebook computer, a personal computer (personal computer, PC), an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a handheld computer, a netbook, an intelligent home device (such as an intelligent television, an intelligent screen, a large screen, an intelligent sound box, an intelligent air conditioner, etc.), a personal digital assistant (personal digital assistant, PDA), a wearable device (such as an intelligent watch, an intelligent bracelet, etc.), a vehicle-mounted device, a virtual reality device, etc., which is not limited in this embodiment of the present application. In this embodiment of the present application, the electronic device is an electronic device that may run an operating system and install an application program. Optionally, the operating system operated by the electronic device may be An Zhuo system, windows system, iOS system, etc.
The implementation of the examples of the present application will be described in detail below with reference to the accompanying drawings. Taking the first electronic device and the second electronic device as mobile phones as examples, the hardware structure of the first electronic device is described. Referring to fig. 4, fig. 4 shows a schematic structural diagram of an electronic device, and as shown in fig. 4, an electronic device 400 may include: processor 410, external memory interface 420, internal memory 421, usb interface 430, charge management module 440, charge protocol module 443, power management module 441, battery 442, antenna 1, antenna 2, mobile communication module 450, wireless communication module 460, audio module 470, speaker 470A, receiver 470B, microphone 470C, headset interface 470D, sensor module 480, keys 490, motor 491, indicator 492, camera 493, display screen 494, and subscriber identity module (subscriber identification module, SIM) card interface 495, among others.
The sensor module 480 may include a pressure sensor, a gyroscope sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 400. In other embodiments, electronic device 400 may include more or fewer components than shown, or may combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 410 may include one or more processing units, such as: the processor 410 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and command center of the electronic device 400. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 410 for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. The memory may hold instructions or data that the processor 410 has just used or recycled. If the processor 410 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided, reducing the latency of the processor 410 and thus improving the efficiency of the system.
In some embodiments, processor 410 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the connection relationship between the modules illustrated in this embodiment is merely illustrative, and does not limit the structure of the electronic device 400. In other embodiments, the electronic device 400 may also employ different interfaces in the above embodiments, or a combination of interfaces.
USB interface 430 is an interface conforming to the USB standard, and specifically may be an USB Type-C interface. USB interface 430 may be used to connect with a power adapter to charge electronic device 400. USB interface 430 may also be used to connect with an electronic device having a USB interface to charge the electronic device or for data transfer between devices. Specifically, the processor 410 is connected to the USB interface 430, and the processor 410 may determine the type of the electronic device connected to the USB interface 430 based on the signal of the USB interface.
The charge management module 440 is configured to receive a charge input from a charger. The charger is a wired charger in the embodiment of the present application, and the charging management module 440 may receive a charging input of the wired charger through the USB interface 430 (i.e., the charging interface described above). The battery 442 may be charged by the charge management module 440, and the electronic device may be powered by the power management module 441. In the present embodiment, the charging management module 440 may also be configured to output a power source to charge other electronic devices and output an adjustable charging current.
The power management module 441 is configured to connect the battery 442, the charge management module 440 and the processor 410. The power management module 441 receives input from the battery 442 and/or the charge management module 440 to power the processor 410, the internal memory 421, the external memory, the display screen 494, the camera 493, the wireless communication module 460, and the like. The power management module 441 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 441 may also be disposed in the processor 410. In other embodiments, the power management module 441 and the charge management module 440 may be disposed in the same device.
The charging protocol module 443 may be a charging protocol chip. For example, the charging protocol module in the embodiment of the present application may be configured to interact with the charging protocol module of the external device in response to an instruction for acquiring an electrical value of the processor 410, and acquire an electrical quantity of the external device.
The wireless communication function of the electronic device 400 may be implemented by the antenna 1, the antenna 2, the mobile communication module 450, the wireless communication module 460, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in electronic device 400 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 450 may provide a solution for wireless communication, including 2G/3G/4G/5G, as applied to the electronic device 400. The mobile communication module 450 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 450 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation.
The wireless communication module 460 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 400.
The wireless communication module 460 may be one or more devices that integrate at least one communication processing module. The wireless communication module 460 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 410. The wireless communication module 460 may also receive a signal to be transmitted from the processor 410, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 450 of electronic device 400 are coupled, and antenna 2 and wireless communication module 460 are coupled, such that electronic device 400 may communicate with a network and other devices through wireless communication techniques. Wireless communication techniques may include global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 400 implements display functions via a GPU, a display screen 494, and an application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 494 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 410 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 494 is used to display images, videos, and the like. The display screen 494 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like.
Electronic device 400 may implement capture functionality through an ISP, camera 493, video codec, GPU, display screen 494, and application processor, among others. The ISP is used to process the data fed back by the camera 493. The camera 493 is used to capture still images or video. In some embodiments, electronic device 400 may include 1 or N cameras 493, N being a positive integer greater than 1. The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 400 is selecting a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like. Video codecs are used to compress or decompress digital video. The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 400 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 420 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 400. The external memory card communicates with the processor 410 through an external memory interface 420 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 421 may be used to store computer-executable program code that includes instructions. The processor 410 executes various functional applications of the electronic device 400 and data processing by executing instructions stored in the internal memory 421. For example, in the present embodiment, the processor 410 may include a storage program area and a storage data area by executing instructions stored in the internal memory 421.
The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 400 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 421 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
Electronic device 400 may implement audio functionality through audio module 470, speaker 470A, receiver 470B, microphone 470C, headphone interface 470D, and an application processor, among others. Such as music playing, recording, etc.
The audio module 470 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 470 may also be used to encode and decode audio signals. In some embodiments, the audio module 470 may be disposed in the processor 410, or some functional modules of the audio module 470 may be disposed in the processor 410. Speaker 470A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. A receiver 470B, also referred to as a "earpiece," is used to convert the audio electrical signal into a sound signal. Microphone 470C, also referred to as a "microphone" or "microphone," is used to convert sound signals into electrical signals.
The headphone interface 470D is for connecting a wired headphone. Earphone interface 470D may be a USB interface 430 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The keys 490 include a power-on key, a volume key, etc. The keys 490 may be mechanical keys. Or may be a touch key. The motor 491 may generate a vibration cue. The motor 491 may be used for incoming call vibration alerting as well as for touch vibration feedback. The indicator 492 may be an indicator light, which may be used to indicate a state of charge, a change in charge, an indication message, a missed call, a notification, or the like. The SIM card interface 495 is used to connect to a SIM card. The SIM card may be inserted into the SIM card interface 495 or removed from the SIM card interface 495 to enable contact and separation with the electronic device 400. The electronic device 400 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 495 may support Nano SIM cards, micro SIM cards, etc.
The methods in the following embodiments may be implemented in the electronic device 400 having the above-described hardware structure.
The software system of the electronic device 400 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In this embodiment, taking an Android system with a layered architecture as an example, a software structure of the electronic device 400 is illustrated.
Fig. 5 is a software architecture block diagram of an electronic device 400 according to an embodiment of the invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 5, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 5, the application framework layer may include a window manager, a content provider, a view system, a call manager, a resource manager, a notification manager, a battery service (BatteryService), a battery statistics service (BatteryStatsService), and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the display screen, intercept the display screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display page may be composed of one or more views. For example, a display page including a text notification icon may include a view displaying text and a view displaying a picture.
The call manager is used to provide the communication functions of the electronic device 400. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification presented in the form of a chart or scroll bar text in the system top status bar, such as a notification of a background running application, or a notification presented in the form of a dialog window on a display screen. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
The power supply service (BatteryService) provides an interface for obtaining battery information, a charging state, etc., for example, obtaining charging plug state information, a current charging type and battery power information, where the charging plug state information indicates whether the electronic device and the charger are plugged in place. For example, in the embodiment of the present application, batteryService is further used to obtain the remaining power of the electronic device 400. The main function of the BatteryService is to monitor the battery information change message and forward the message to everywhere in the Android system in the form of system broadcast.
The power statistics service (BatteryStatsService) is mainly used for electricity statistics. For example, in the embodiment of the present application, batteryStatsService is further used to obtain a discharge current of the battery in the electronic device 400, that is, a current provided by the battery to the electronic device 400. The BatteryStatsService is also used to obtain the discharge current provided by the battery in the electronic device 400 to each application being run.
Android run time includes a core library and virtual machines. Android run is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer may contain display drivers, audio drivers, sensor drivers, etc. The kernel layer may also include battery related drivers and drivers related to charge and discharge events, such as charge protocol drivers, battery drivers, charge drivers, and the like. The kernel layer may also include a charge control logic module. The charging control logic module is used for realizing a charger type detection flow through the charging control logic module when the charger is inserted. The charging control logic module is further configured to implement a control logic flow for controlling the electronic device 400 not to charge the external device or rejecting the external electronic device to charge the electronic device 400 after obtaining the remaining power of the electronic device 400 and the remaining power of the external device or recognizing that the power consumption of the electronic device 400 is higher. The charging control logic module 400 is further configured to implement a charging role switching procedure.
As described above, the method for controlling charging provided in the embodiments of the present application is applicable to a case where two electronic devices are connected through a C-C cable, for example, a case where a mobile phone a and a mobile phone B are connected through a C-C cable. After the USB Type-C interface of the mobile phone a detects that the charging device is inserted, the mobile phone a may detect whether the charging device is a second electronic device that supports data transmission with the mobile phone a through a C-C cable and has the USB Type-C interface.
For example, after the USB Type-C interface of the mobile phone a detects that the charging device is plugged in, the identification procedure shown in fig. 6 is automatically performed.
In S601, when the Type-C interface of the mobile phone a detects that the charging device is plugged in, it is detected whether the charging device supports USB data transmission.
The charging device connected to the mobile phone a may be, for example, a Direct Current (DC) power adapter. The DC power adapter may charge handset a but does not support USB data transfer (does not support data transfer with handset a over the C-C cable). The charging device connected with the mobile phone a can support both USB data transmission (support data transmission with the mobile phone a through the C-C cable) and charging of the mobile phone a, for example. The charging device may be, for example, a mobile phone, a tablet, a personal notebook, a computer, etc.
If the mobile phone a detects that the connected charging device does not support USB data transmission, for example, the charging device is a DC power adapter, the mobile phone a may accept the DC power adapter to charge the mobile phone a. That is, this scheme is only applicable to the case that the mobile phone a is connected with the charging device having the USB Type-C interface. For the charging equipment which only supports charging of the mobile phone A through the C-C cable, the mobile phone A can be charged by the charging equipment according to the conventional charging technology because data transmission is not involved between the mobile phone A and the charging equipment.
If the mobile phone a detects that the connected charging device supports USB data transmission, the mobile phone a may further identify whether the charging device is a second electronic device with a USB Type-C interface, that is, the mobile phone a may continue to execute S602.
In S602, the mobile phone a detects whether the charging device is a second electronic device with a Type-C interface.
Specifically, the mobile phone a determines whether the charging device is a second electronic device having an USB Type-C interface by detecting whether the charging device supports a Power input (Power driver) PD protocol. The PD protocol is also referred to as USB PD protocol. The PD protocol is a power supply standard based on the USB Type-C interface. Detecting whether the charging device supports the PD protocol can identify whether the charging device has an USB Type-C interface. In this way, the case that the mobile phone a is connected to a charging device having an USB Type-a interface, an USB Type-B interface, or the like, or other types of USB interfaces can be eliminated.
If the mobile phone a recognizes that the connected charging device is a second electronic device with an USB Type-C interface, for example, the second electronic device is a mobile phone B with an USB Type-C interface, the mobile phone a may execute the method for controlling charging provided in the embodiment of the present application.
This is because after the mobile phone a is connected to the second electronic device having the USB Type-C interface through the C-C cable, the mobile phone a may not only transmit a charging signal but also transmit data between the mobile phone a and the electronic device. In order to avoid that the mobile phone a and the second electronic device charge each other when transmitting data, the mobile phone a may execute the method for controlling charging provided in the embodiment of the present application. When the mobile phone a recognizes that the mobile phone a and the mobile phone B are transmitting data through the C-C cable, for example, the mobile phone a acquires data from the mobile phone B through the C-C cable, the mobile phone a may stop charging the mobile phone B. Or when the mobile phone A recognizes that the mobile phone A and the mobile phone B transmit data through the C-C cable, for example, the mobile phone B acquires the data from the mobile phone A through the C-C cable, the mobile phone A refuses the mobile phone B to charge the mobile phone A. Thus, the above method may further comprise S603.
At S603, handset a initiates a control strategy.
The mobile phone a starts the control policy, that is, executes the method for controlling charging provided in the embodiment of the present application, such as the method shown in fig. 7 in S701-S703.
If the mobile phone a recognizes that the connected charging device is a charging device without an USB Type-C interface, the charging device may be, for example, a computer with an USB Type-a interface, and the mobile phone a may receive the computer to charge the mobile phone a. At this time, the computer can charge the mobile phone A, and can send data to the mobile phone A or copy data from the mobile phone A.
Further, the mobile phone a may also perform S604 to identify whether the charging device (second electronic device) is removed.
At S604, handset a detects a disconnection of the C-C connection with the second electronic device, and handset a stops the control strategy.
Handset a detects a disconnection of the C-C connection with the second electronic device, i.e. handset a detects that the second electronic device is removed. For example, when a user pulls the C-C cable out of the USB Type-C interface of handset A, handset A may detect that the charging device is removed. After detecting that the charging device is removed, the mobile phone a may stop the control policy, that is, stop executing the method for controlling charging provided in the embodiment of the present application. After the USB Type-C interface of the mobile phone a detects that the charging device is plugged again, the mobile phone a may automatically execute the identification procedure shown in fig. 6 again.
Handset a may include a first switch. After the user opens the first switch, the mobile phone a can execute the identification procedure shown in fig. 6. And after recognizing that the charging device connected to the handset a is a second electronic device having an USB Type-C interface, the method of S701-S703 shown in fig. 7 is performed.
The present application does not limit the position of the first switch. For example, the first switch may be located in a drop down list of handset a, or the first switch may be located in a setup interface of handset a.
Next, a method for controlling charging provided in the embodiment of the present application will be described with reference to fig. 7 by using a second electronic device as a mobile phone B.
Cell-phone A can have USB Type-C interface, and cell-phone B can have USB Type-C interface, and cell-phone A's USB Type-C interface passes through C-C cable with cell-phone B's USB Type-C interface and is connected.
In S701, after detecting that the usb C interface of the handset a is connected to the usb C interface of the handset B through the C cable, the handset a determines whether data transmission is performed between the handset a and the handset B through the C cable.
The universal serial bus C-Type interface is the USB Type-C interface. The C-Type cable is referred to as the aforementioned C-C cable, and in some embodiments, the C-Type cable is also referred to as a Type-C cable.
The mobile phone A can detect whether the mobile phone A is connected with the mobile phone B through a C-C cable according to the identification flow shown in fig. 6, wherein one end of the C-C cable is connected with the USB Type-C interface of the mobile phone A, and the other end of the C-C cable is connected with the USB Type-C interface of the mobile phone B. After detecting that the mobile phone A and the mobile phone B are connected through the C-C cable, the mobile phone A can judge whether the mobile phone A and the mobile phone B transmit data through the C-C cable.
The data transmission of the mobile phone A and the mobile phone B through the C-C cable comprises the steps that the mobile phone A obtains data from the mobile phone B through the C-C cable, the mobile phone B obtains data from the mobile phone A through the C-C cable, the mobile phone A sends data to the mobile phone B through the C-C cable, and the mobile phone B sends data to the mobile phone A through the C-C cable. In some implementations, acquiring the data may include copying the data, i.e., handset a may copy the data from handset B over a C-C cable, and handset B may copy the data from handset a over a C-C cable.
If the mobile phone a recognizes that data is being transmitted between the mobile phone a and the mobile phone B through the C-C cable, the mobile phone a may continue to execute S702.
If the mobile phone A recognizes that the data is not transmitted between the mobile phone A and the mobile phone B through the C-C cable. The mobile phone A can transmit a charging signal with the mobile phone B, and is charged according to a conventional charging method. At this time, the mobile phone a may charge the mobile phone B, and the mobile phone B may also charge the mobile phone a, which is not specifically limited in this application.
In S702, the mobile phone a acquires a charging role of the mobile phone a.
Before executing S703, the mobile phone a may acquire the charging role of the mobile phone a. As mentioned before, after the two electronic devices are connected by the C-C cable, the charging roles are randomly assigned. The mobile phone a may be a master device, and the mobile phone B may be a slave device, where the mobile phone a charges the mobile phone B. The mobile phone A can also be a slave device, the mobile phone B can also be a master device, and the mobile phone B charges the mobile phone A. The mobile phone a may execute S703 according to the charging role of the mobile phone a.
It should be understood that the embodiment of the present application does not limit the order in which the handset a performs S701 and S702. After S701, the mobile phone a may further execute S702 to obtain the charging role of the mobile phone a. The mobile phone a may also perform S702 to obtain the charging role of the mobile phone a, and then perform S701 to identify whether data is being transmitted between the mobile phone a and the mobile phone B through the C-C cable. After the handset a recognizes that the handset a and the handset B transmit data through the C-C cable, the handset a may execute S703 in case.
In S703, the mobile phone a controls the mobile phone a not to charge the mobile phone B or the mobile phone a refuses to charge the mobile phone B.
Specifically, the mobile phone A is a master device, the mobile phone B is a slave device, the mobile phone A recognizes that the mobile phone A and the mobile phone B are in data transmission through the C-C cable, and the mobile phone A controls the mobile phone A not to charge the mobile phone B.
Or, the mobile phone A is a slave device, the mobile phone B is a master device, and when the mobile phone A recognizes that the mobile phone A and the mobile phone B are in data transmission through the C-C cable, the mobile phone A refuses the mobile phone B to charge the mobile phone A.
That is, in the embodiment of the present application, as long as the mobile phone a recognizes that the mobile phone a and the mobile phone B are transmitting data through the C-C cable, the mobile phone a can control the mobile phone a not to charge the mobile phone B or reject the mobile phone B to charge the mobile phone a regardless of the transmission direction of the data party from the mobile phone a to the mobile phone B or from the mobile phone B to the mobile phone a. The mobile phone A and the mobile phone B only transmit data and are not mutually charged, and the electric quantity of the mobile phone A and the electric quantity of the mobile phone B are saved. Furthermore, the mobile phone a can also control the mobile phone a not to charge the mobile phone B or reject the mobile phone B to charge the mobile phone a according to the data transmission direction between the mobile phone a and the mobile phone B.
Specifically, the data transmission direction between the mobile phone a and the mobile phone B (hereinafter referred to as the data transmission direction) includes: handset a to handset B, and handset B to handset a. The mobile phone a to the mobile phone B may include the mobile phone a obtaining data from the mobile phone B and the mobile phone a sending data to the mobile phone B. Handset B to handset a may include handset B obtaining data from handset a, handset B sending data to handset a.
The mobile phone a may execute S703 according to the charging role of the mobile phone a and the data transmission direction between the mobile phone a and the mobile phone B. Specifically, the following four cases may be included.
The mobile phone A is a master device, the mobile phone B is a slave device, and the data acquisition direction is from the mobile phone A to the mobile phone B, for example, the mobile phone A copies data from the mobile phone B, at the moment, the power consumption of the mobile phone A is larger, and the mobile phone A controls the mobile phone A not to charge the mobile phone B. The electric quantity of the mobile phone A is saved, and data transmission failure caused by insufficient electric quantity of the mobile phone A is avoided.
The mobile phone A is a master device, the mobile phone B is a slave device, and the data acquisition direction is from the mobile phone B to the mobile phone A, for example, the mobile phone B copies data from the mobile phone A, and at the moment, the power consumption of the mobile phone B is larger, so that the mobile phone A can continue to charge the mobile phone B.
The mobile phone B is a master device, the mobile phone A is a slave device, and the data acquisition direction is from the mobile phone A to the mobile phone B, for example, the mobile phone A copies data from the mobile phone B, at the moment, the power consumption of the mobile phone A is larger, and the mobile phone B can continue to charge the mobile phone A.
The mobile phone B is a master device, the mobile phone A is a slave device, and the data acquisition direction is from the mobile phone B to the mobile phone A, for example, the mobile phone B copies data from the mobile phone A, and at the moment, the power consumption of the mobile phone B is larger. The mobile phone a may refuse the mobile phone B to charge the mobile phone a. The electric quantity of the mobile phone B is saved, and data transmission failure caused by insufficient electric quantity of the mobile phone B is avoided.
In summary, when the mobile phone a is the master device and the data transmission direction is from the mobile phone a to the mobile phone B, the mobile phone a may stop charging the mobile phone B. When the mobile phone B is the main device and the data transmission direction is from the mobile phone B to the mobile phone a, the mobile phone a can refuse the mobile phone B to charge the mobile phone a. The electric quantity of the mobile phone B is saved, and data transmission failure caused by insufficient electric quantity of the mobile phone B is avoided.
It should be understood that in the embodiment of the present application, that the mobile phone a does not charge the mobile phone B may be understood as that the mobile phone a decreases the charging current provided to the mobile phone B. As shown in fig. 1, during normal charging, the mobile phone A1 may provide a charging current of 500mA for the mobile phone B1. When the mobile phone A1 does not charge the mobile phone B1, the charging current provided by the mobile phone A1 for the mobile phone B1 may be less than 500mA, for example, the charging current at this time may be 100mA. The mobile phone a does not charge the mobile phone B, but can also be understood that the mobile phone a adjusts the charging current provided to the mobile phone B to zero. At this time, the mobile phone A only provides voltage for the mobile phone B, but does not provide current, so that the power consumption of the mobile phone A can be greatly reduced, and the rapid exhaustion of the electric quantity of the mobile phone A is avoided.
Similarly, the mobile phone a refuses the mobile phone B to charge the mobile phone a, which can be understood as that the mobile phone a limits the charging current of the mobile phone B for self charging, for example, the mobile phone a limits the mobile phone B to only provide 100mA of charging current for self. The mobile phone A refuses the mobile phone B to charge the mobile phone A can be understood as that the mobile phone A refuses to receive the charging current provided by the mobile phone B.
Thus, when the mobile phone A is the main equipment and the data transmission direction is from the mobile phone A to the mobile phone B, the mobile phone A can control the mobile phone A not to charge the mobile phone B, and the electric quantity and the power consumption of the mobile phone A are saved. When the mobile phone B is the main equipment and the data transmission direction is from the mobile phone B to the mobile phone A, the mobile phone A refuses the mobile phone B to charge the mobile phone A, and the electric quantity and the power consumption of the mobile phone B are saved. For example, when the mobile phone a is a master device and the mobile phone a obtains data from the data B, the mobile phone a may not charge the mobile phone B; when the mobile phone a is a slave device and the mobile phone B obtains data from the mobile phone a, the mobile phone a can refuse the mobile phone B to charge the mobile phone a. Therefore, the problem of data transmission failure caused by insufficient electric quantity of the mobile phone A when the mobile phone A acquires data from the mobile phone B can be avoided. Or, the problem of data transmission failure caused by insufficient electric quantity of the mobile phone B when the mobile phone B acquires data from the mobile phone A can be avoided.
In some embodiments, the mobile phone a is a master device, the mobile phone B is a slave device, and the mobile phone a can further detect whether the current power consumption of the mobile phone a is higher, and when the mobile phone a detects that the current power consumption of the mobile phone a is higher, the mobile phone a can control the mobile phone a not to charge the mobile phone B. The method for detecting whether the current power consumption of the mobile phone A is higher by the mobile phone A is not limited, and as an example, the mobile phone A can detect whether the mobile phone A is running a high-power-consumption application or not to determine whether the current power consumption of the mobile phone A is higher or not.
For example, as shown in fig. 8, after the mobile phone a performs S702 that it is identified that the mobile phone a is the master device, the mobile phone a may perform S703. Specifically, S703 may further include S801 and S802.
At S801, the mobile phone a identifies whether the mobile phone a is running the first application.
The first application is a preset application, and the preset application can be a high-power consumption application such as playing video or running games. The first application may also be an application having a power consumption greater than a preset power consumption threshold.
For example, the mobile phone a may directly identify whether the mobile phone a is executing a high power consumption application such as playing a video or running a game. For another example, the mobile phone a may obtain a value of a discharge current provided by a battery of the mobile phone a to an application running on the mobile phone a, and identify whether the application is an application with power consumption greater than a preset power consumption threshold based on the value of the discharge current of the application. Specifically, the mobile phone a may compare the obtained value of the discharge current of the application with a preset current threshold, and when the value of the discharge current is greater than the current threshold, the mobile phone a identifies the application as an application whose power consumption is greater than the preset power consumption threshold. For another example, the mobile phone a may calculate power consumption of the application based on the obtained discharge current of the application, so as to identify whether the application is an application whose power consumption is greater than a preset power consumption threshold.
If the mobile phone a recognizes that the mobile phone a executes the high power consumption application, the mobile phone a may execute S802 to control the mobile phone a not to charge the mobile phone B in order to save the electric quantity of the mobile phone a because the power consumption of the mobile phone a is higher.
If the mobile phone A recognizes that the mobile phone A is not executing the high power consumption application, the mobile phone A can charge the mobile phone B.
In S802, the mobile a controls the mobile a not to charge the mobile B.
That is, as long as the mobile phone a recognizes that the mobile phone a is the main device, the mobile phone a can control the mobile phone a not to charge the mobile phone B. Furthermore, the mobile phone a may further control the mobile phone a to not charge the mobile phone B after detecting that the mobile phone a is running the high power consumption application.
In other embodiments, the mobile phone a is a main device, and the mobile phone a may determine whether to control the mobile phone a not to charge the mobile phone B according to the remaining power of both the mobile phone a and the mobile phone B. For example, when the remaining power of the mobile phone a is smaller than that of the mobile phone B, the mobile phone a may control the mobile phone a not to charge the mobile phone B. When the remaining power of the mobile phone a is greater than the remaining power of the mobile phone B, the mobile phone a can continue to charge the mobile phone B.
For example, as shown in fig. 9, after the mobile phone a performs S702 to identify that the mobile phone a is the master device, the mobile phone a may perform S703 to control the mobile phone a not to charge the mobile phone B according to the remaining power of both sides. Specifically, S703 may further include S901 to S905.
In S901, the mobile phone a obtains the remaining power of the mobile phone a.
In S902, the mobile phone a sends a first acquisition instruction to the mobile phone B. The first obtaining instruction is used for obtaining the remaining capacity of the mobile phone B. For example, handset a may obtain the remaining power of the opposite terminal (handset B) based on the PD protocol. The first fetch instruction may be, for example, a "get_Battery_status" instruction.
S903, in response to receiving the first obtaining instruction, the mobile phone B sends the remaining power of the mobile phone B to the mobile phone A. For example, in response to receiving the "get_battery_status" instruction sent by the mobile phone a, the mobile phone B sends its current remaining power to the mobile phone a.
In S904, the mobile phone a determines whether to control the mobile phone a not to charge the mobile phone B according to the remaining power of the mobile phone a and the remaining power of the mobile phone B.
The mobile phone A can determine whether to control the mobile phone A not to charge the mobile phone B according to the residual electric quantity of the mobile phone A and the residual electric quantity of the mobile phone B. For example, the remaining power of the mobile phone a is larger than the remaining power of the mobile phone B, and the mobile phone a continues to charge the mobile phone B. The residual electric quantity of the mobile phone A is smaller than that of the mobile phone B, and the mobile phone A controls the mobile phone A not to charge the mobile phone B.
The mobile phone A can determine whether to control the mobile phone A not to charge the mobile phone B according to the residual electric quantity of the mobile phone A and the residual electric quantity of the mobile phone B, and can determine whether to control the mobile phone A not to charge the mobile phone B according to the residual electric quantity of the mobile phone A and the residual electric quantity range of the mobile phone B.
As an example, the remaining power of the mobile phone a has a first upper limit value and a first lower limit value. The remaining capacity of the mobile phone A is larger than the first upper limit value, which indicates that the electric quantity of the mobile phone A is sufficient, the mobile phone A does not need to be charged, and the mobile phone A can charge the mobile phone B. The remaining power of the mobile phone a is smaller than the first lower limit value, which indicates that the power of the mobile phone a is relatively lack, and the mobile phone B is required to charge the mobile phone a.
Similarly, the remaining power of the mobile phone B has a second upper limit value and a second lower limit value. When the remaining power of the mobile phone B is greater than the second upper limit value, it indicates that the power of the mobile phone B is sufficient, the mobile phone B does not need to be charged, and the mobile phone B can charge the mobile phone a. When the remaining power of the mobile phone B is smaller than the second lower limit value, the lack of the power of the mobile phone B is indicated, and the mobile phone a is required to charge the mobile phone B.
The first upper limit value and the second upper limit value may be the same value or different values, and the first lower limit value and the second lower limit value may be the same value or different values, which are not specifically limited in this application. Taking the example that the upper limit value of the residual electric quantity of the mobile phone A is 90%, the lower limit value is 10%, the upper limit value of the second electric quantity value of the mobile phone B is 80%, and the lower limit value is 20%.
The mobile phone A is used as a main device, and the mobile phone A determines whether to control the mobile phone A not to charge the mobile phone B according to the residual electric quantity of the mobile phone A and the residual electric quantity of the mobile phone B.
The remaining power of the mobile phone A is less than 10%, and the remaining power of the mobile phone B is less than 20%, which means that the power of the mobile phone A is very small. At this time, the mobile phone a can control the mobile phone a not to charge the mobile phone B.
The remaining power of the mobile phone A is smaller than 10%, and the remaining power of the mobile phone B is larger than 20%, which means that the power of the mobile phone A is small. At this time, the mobile phone a can control the mobile phone a not to charge the mobile phone B.
The remaining power of the mobile phone a is less than 90%, for example, between 10% and 90%, and the remaining power of the mobile phone B is less than 20%, which means that the power of the mobile phone B is less. At this time, the mobile phone a continues to charge the mobile phone B.
The residual electric quantity of the mobile phone A is between 10 and 90 percent, and the residual electric quantity of the mobile phone B is between 20 and 80 percent, which indicates that the electric quantity of the mobile phone A and the electric quantity of the mobile phone B are sufficient. At this point, handset a may continue to charge handset B.
The residual electric quantity of the mobile phone A is between 10% and 90%, and the residual electric quantity of the mobile phone B is more than 80%, which indicates that the electric quantity of the mobile phone B is sufficient. The mobile phone a can control the mobile phone a not to charge the mobile phone B.
The remaining power of the mobile phone A is larger than 90%, which indicates that the power of the mobile phone A is sufficient. At this time, no matter how much of the remaining power of the mobile phone B is, the mobile phone a can continue to charge the mobile phone B because the power of the mobile phone a is sufficient.
In summary, the mobile phone a recognizes that the mobile phone a and the mobile phone B transmit data through the C-C cable, and the mobile phone a is a main device, and the mobile phone a can control the mobile phone a not to charge the mobile phone B according to the remaining electric quantity of the mobile phone a and the mobile phone B. Specifically, when the remaining power of the mobile phone a is smaller than the first power threshold, the mobile phone a can control the mobile phone a not to charge the mobile phone B. The first power threshold may be a first lower limit value, that is, 10% of the remaining power of the mobile phone a. That is, when the power of the mobile phone a is low, the mobile phone a may not charge the mobile phone B. When the remaining power of the mobile phone a is smaller than the first power threshold and the remaining power of the mobile phone B is larger than the second threshold, the mobile phone a can also control the mobile phone a not to charge the mobile phone B. The first power threshold may be a first upper limit value of the remaining power of the mobile phone a, that is, 90%, and the second power threshold may be a first upper limit value of the remaining power of the mobile phone B, that is, 80%. That is, the mobile phone a is used as the main device to charge the mobile phone B, the remaining power of the mobile phone B has reached the upper limit, i.e. the remaining power of the mobile phone B is sufficient and does not need to be charged, and the power of the mobile phone a has not reached the upper limit, so that the mobile phone a can control the mobile phone a not to charge the mobile phone B.
After determining that the controlling handset a is not charging the handset B, the handset a may continue to execute S905.
In S905, the mobile phone a controls the mobile phone a not to charge the mobile phone B.
As can be seen from fig. 8 and 9, when the mobile phone a is used as the main device to charge the mobile phone B, the mobile phone a can only control the mobile phone a to not charge the mobile phone B after recognizing that the mobile phone a is executing the high power consumption application (the first application). The mobile phone a can also control the mobile phone a not to charge the mobile phone B only according to the residual electric quantity of the mobile phone a and the residual electric quantity of the mobile phone B.
In some embodiments, the mobile phone a may determine whether to charge the mobile phone B according to the remaining power of the mobile phone a and the remaining power of the mobile phone B. After the mobile phone a determines that the mobile phone B is charged, the mobile phone a can further identify whether the mobile phone a is executing the high power consumption application, and if the mobile phone a identifies that the mobile phone a is executing the high power consumption application, the mobile phone a can also control the mobile phone a not to charge the mobile phone B.
Specifically, as shown in fig. 10, in S904, after determining that the mobile phone a is not controlled to charge the mobile phone B according to the remaining power of the mobile phone a and the remaining power of the mobile phone B, the mobile phone a may further execute S704. For example, the remaining power of the mobile phone a is greater than the remaining power of the mobile phone B, and the mobile phone a may perform S704. For another example, after the mobile phone a determines to continue charging the mobile phone B when the remaining power of the mobile phone a is greater than 90%, or when the remaining power of the mobile phone a is between 10% -90% and the remaining power of the mobile phone B is between 20% -80%, or when the remaining power of the mobile phone a is between 10% -90% and the remaining power of the mobile phone B is less than 20%, the mobile phone a may execute S704 to further determine whether to control the mobile phone a not to charge the mobile phone B.
At S704, handset a identifies whether handset a is running a first application.
If the mobile phone a recognizes that the mobile phone a is running the first application, the mobile phone a may execute S705 to control the mobile phone a not to charge the mobile phone B in order to save the electric quantity of the mobile phone a because the power consumption of the mobile phone a is higher.
In S705, the mobile phone a controls the mobile phone a not to charge the mobile phone B.
If the mobile phone A recognizes that the mobile phone A is not running the first application, the mobile phone A can continue to charge the mobile phone B.
That is, if the mobile phone a recognizes that the mobile phone a is not controlled to charge the mobile phone B according to the remaining power of the mobile phone a and the remaining power of the mobile phone B, the mobile phone a can further recognize whether the mobile phone a is running the high power consumption application, and when the mobile phone a is running the high power consumption application, the mobile phone a can control the mobile phone a not to charge the mobile phone B even if the remaining power of the mobile phone a is sufficient.
In the foregoing, several implementations of controlling the mobile phone a to not charge the mobile phone B when the mobile phone a is the main device are described with reference to fig. 8, 9 and 10. In fig. 8, 9 and 10, the data transmission direction between the mobile phone a and the mobile phone B may be the mobile phone a to the mobile phone B or the mobile phone B to the mobile phone a, which is not limited in this application.
Next, in conjunction with fig. 11, an implementation manner in which the mobile phone a is a slave device and the mobile phone a refuses the mobile phone B to charge the mobile phone a is described.
As shown in fig. 11, the mobile phone a performs S702 to identify that the mobile phone a is a slave device, and the mobile phone a may perform S703 to refuse to charge the mobile phone B. Specifically, S703 may include S1101-S1105.
In S1101, the mobile phone a obtains the remaining power of the mobile phone a.
In S1102, the mobile phone a sends a second acquisition instruction to the mobile phone B. The second obtaining instruction is used for obtaining the remaining capacity of the mobile phone B.
In S1103, in response to receiving the second acquisition instruction, the mobile phone B sends the remaining power of the mobile phone B to the mobile phone a.
The foregoing has described the implementation manner of obtaining the remaining power of the mobile phone a and the remaining power of the mobile phone B by the mobile phone a, which is not described herein again.
In S1104, the mobile phone a determines whether to reject the mobile phone B to charge the mobile phone a according to the remaining power of the mobile phone a and the remaining power of the mobile phone B.
As an example, if the remaining power of the mobile phone a is greater than the remaining power of the mobile phone B, the mobile phone a may refuse to charge the mobile phone B for the mobile phone a; if the remaining power of the mobile phone a is smaller than that of the mobile phone B, the mobile phone a may not reject the mobile phone B to charge the mobile phone a.
As another example, the mobile phone a may also determine whether to refuse to charge the mobile phone B for the mobile phone a according to the range of the remaining power of the mobile phone a and the remaining power of the mobile phone B. Specifically, the following six cases may be included.
The residual electric quantity of the mobile phone B is less than 20%, and the residual electric quantity of the mobile phone A is less than 10%, which indicates that the electric quantity of the mobile phone B is very small. At this time, the mobile phone a refuses the mobile phone B to charge itself.
When the remaining power of the mobile phone B is less than 20% and the remaining power of the mobile phone a is greater than 10%, for example, the remaining power of the mobile phone a is between 10% -90% or greater than 90%, which indicates that the power of the mobile phone B is very small. At this time, the mobile phone a refuses the mobile phone B to charge the mobile phone a.
The residual electric quantity of the mobile phone B is between 20% and 90%, the residual electric quantity of the mobile phone A is smaller than 10%, the electric quantity of the mobile phone A is smaller, the electric quantity of the mobile phone B is sufficient, and at the moment, the mobile phone B continuously charges the mobile phone A.
When the residual electric quantity of the mobile phone B is between 20% and 80% and the residual electric quantity of the mobile phone A is between 10% and 90%, the electric quantity of the mobile phone A and the electric quantity of the mobile phone B are sufficient. At this point, handset B may continue to charge handset a.
The residual electric quantity of the mobile phone B is between 20% and 80%, and when the residual electric quantity of the mobile phone A is more than 90%, the electric quantity of the mobile phone A is sufficient. The mobile phone a may refuse the mobile phone B to charge the mobile phone a.
The remaining power of the mobile phone B is greater than 80%, which indicates that the power of the mobile phone B is sufficient. At this time, no matter how much the remaining power of the mobile phone a is, the mobile phone B can continue to charge the mobile phone a because the power of the mobile phone B is sufficient.
After determining to reject handset B to charge handset a, handset a may continue to execute S1105.
In S1105, handset a denies handset B to charge handset a.
In summary, the mobile phone a recognizes that the mobile phone a and the mobile phone B transmit data through the C-C cable, and the mobile phone a is a slave device, and the mobile phone a can reject that the mobile phone B does not charge the mobile phone a according to the remaining electric power of the mobile phone a and the mobile phone B. Specifically, when the electric quantity of the mobile phone B is smaller than the third threshold, the third threshold may be the first lower limit value of the remaining electric quantity of the mobile phone B, that is, 20%, and the electric quantity of the mobile phone B is smaller, so that the mobile phone a can refuse the mobile phone B to charge the mobile phone a. The third threshold may be 80% of the upper limit value of the remaining power of the mobile phone B. When the electric quantity value of the mobile phone B is smaller than 80% and the electric quantity value of the mobile phone a is larger than the fourth threshold, the mobile phone a can also refuse the mobile phone B to charge the mobile phone a. The fourth threshold is a first upper limit value of the remaining capacity of the mobile phone a. That is, the mobile phone B is used as the main device to charge the mobile phone a, and the remaining power of the mobile phone a reaches the upper limit, that is, the remaining power of the mobile phone a is sufficient and does not need to be charged, and the remaining power of the mobile phone B does not reach the upper limit, so that the mobile phone a can control the mobile phone B not to charge the mobile phone a.
In fig. 11, the data transmission direction between the mobile phone a and the mobile phone B may be the mobile phone a to the mobile phone B or the mobile phone B to the mobile phone a, which is not specifically limited in this application.
Furthermore, the mobile phone a is a main device, and after the mobile phone a is controlled not to charge the mobile phone B, the mobile phone a can also switch the charging roles. And switching the mobile phone A into slave equipment, switching the mobile phone B into master equipment, and charging the mobile phone A by the mobile phone B.
When the mobile phone A recognizes that the mobile phone A and the mobile phone B transmit data through the C-C cable and the mobile phone A is used as a main device, the mobile phone A can control the mobile phone A to stop charging the mobile phone B, and after the mobile phone A is controlled not to charge the mobile phone B, the mobile phone A can directly switch the charging roles and accept the mobile phone B to charge the mobile phone A.
In other embodiments, handset a controls handset a not to charge handset B and switches charging roles only in the cases as described above, accepting that handset B charges handset a.
For example, the remaining power of the mobile phone a is smaller than that of the mobile phone B, the mobile phone a stops charging the mobile phone B and the mobile phone a switches the charging roles, and the mobile phone B charges the mobile phone a.
For another example, when the remaining power of the mobile phone a is less than 10% and the remaining power of the mobile phone B is greater than 20%, the mobile phone a stops charging the mobile phone B and switches the charging roles, and the mobile phone B charges the mobile phone a.
For another example, when the remaining power of the mobile phone a is between 10% and 90% and the remaining power of the mobile phone B is greater than 80%, the mobile phone a stops charging the mobile phone B and switches the charging roles, and the mobile phone B charges the mobile phone a.
For another example, the mobile phone a recognizes that the mobile phone a is running a high power consumption application, and the mobile phone a stops charging the mobile phone B and switches the charging roles, and the mobile phone B charges the mobile phone a.
Similarly, the mobile phone a is a slave device, and after the mobile phone a refuses to charge the mobile phone B for the mobile phone a, the mobile phone a can also switch the charging roles. And switching the mobile phone A into a master device, switching the mobile phone B into a slave device, and charging the mobile phone B by the mobile phone A.
When the mobile phone A recognizes that the mobile phone A and the mobile phone B transmit data through the C-C cable and the mobile phone A is a slave device, the mobile phone A can refuse the mobile phone B to charge the mobile phone A, and after the mobile phone B is refused to charge the mobile phone A, the mobile phone A can directly switch the charging roles, and the mobile phone A charges the mobile phone B.
In other embodiments, handset a denies handset B to charge handset a and switches charging roles only in the cases as described above, and handset a charges handset B.
For example, the remaining power of the mobile phone a is larger than that of the mobile phone B, the mobile phone a refuses the mobile phone B to be the mobile phone a and switches the charging roles, and the mobile phone a charges the mobile phone B.
For another example, when the remaining power of the mobile phone B is less than 20% and the remaining power of the mobile phone a is greater than 10%, for example, the remaining power of the mobile phone a is between 10% -90% or greater than 90%, the mobile phone a refuses to charge the mobile phone B for the mobile phone a and switches the charging roles, and the mobile phone a charges the mobile phone B.
For another example, the remaining power of the mobile phone B is between 20% and 80%, the remaining power of the mobile phone a is greater than 90%, the mobile phone a refuses the mobile phone B to charge the mobile phone a and switches the charging roles, and the mobile phone a charges the mobile phone B.
The method for switching the charging roles of the mobile phone A is not limited. As one example, handset a may send a second instruction to handset B. The second instruction may be, for example, an rp_swap control instruction. The second instruction is for requesting a switch of charging roles.
Illustratively, the mobile a sends an rp_swap control command to the mobile B requesting to switch the charging roles. In response to receiving the control instruction, the mobile phone B determines whether to allow the charging role to be switched. If the charging role is allowed to be switched, the mobile phone B sends an Accept message to the mobile phone A, which indicates that the charging role can be switched. In response to receiving the Accept message, handset a switches itself from the master device to the slave device, switches handset B from the slave device to the master device, and charges handset a from handset B.
In some embodiments, the upper and lower values of the electrical quantity value of the electronic device relate to the type of electronic device.
Taking a notebook computer with an USB Type-C interface as an example, the battery capacity of the notebook computer is larger. The upper limit value of the electric power value of the notebook computer may be 60%, for example. That is, when the electric quantity value of the notebook computer is 60%, it means that the electric quantity of the notebook computer is sufficient, and the notebook computer can be charged without being charged, and can be charged with other external devices. The lower limit value of the electric power value of the notebook computer may be, for example, 5%. That is, when the electric quantity value of the notebook computer is 5%, it is indicated that the electric quantity of the notebook computer is relatively low, and the notebook computer needs to be charged.
Taking a smart watch with an USB Type-C interface as an example, the battery capacity of the smart watch is small. The upper limit value of the smart watch power value may be 90%, for example. That is, when the electricity value of the smart watch is 90%, it means that the electricity of the smart watch is sufficient, it may not be charged, and it may charge other external devices. The lower limit value of the power value of the smart watch may be 40%, for example. That is, when the electric quantity value of the smart watch is 40%, it is indicated that the electric quantity of the smart watch is relatively low, and the smart watch needs to be charged.
The method for controlling charging provided in the embodiment of the present application is described below by taking a second electronic device as an example of a notebook computer.
The mobile phone A is connected with the notebook computer through a C-C cable, charges the notebook computer, acquires data from the notebook computer, and controls the mobile phone A not to charge the notebook computer and switch charging roles according to the residual electric quantity of the mobile phone A and the residual electric quantity of the notebook computer. Mainly including the following 3 cases.
The remaining power of the mobile phone A is less than 10% (the first power threshold), and the remaining power of the notebook computer is less than 5%, which means that the power of the mobile phone A and the notebook computer are very small. The mobile phone A can be controlled not to charge the notebook computer. At this time, the mobile phone a does not charge the notebook computer, nor does the notebook computer charge the mobile phone a. The current value can be zero on the charging circuit of the mobile phone A and the notebook computer.
When the remaining power of the mobile phone A is smaller than 10% (the first power threshold), and the remaining power of the notebook computer is larger than 5%, the power of the mobile phone A is small, and the notebook computer can charge the mobile phone A. For example, the third electrical quantity value is between 5% -60% or greater than 60%. At this time, after the mobile phone A controls the mobile phone A not to charge the notebook computer, the mobile phone A can switch the mobile phone A into the slave device, switch the notebook computer into the master device, and charge the mobile phone A by the notebook computer, thereby saving the electric quantity of the mobile phone A and avoiding the depletion of the electric quantity of the mobile phone A for shutdown.
When the remaining power of the mobile phone a is less than 90% (the first power threshold), for example, between 10% and 90%, and the remaining power of the notebook computer is greater than 60% (the second threshold), it is indicated that the power of the notebook computer is sufficient. The mobile phone A controls the mobile phone A not to charge the notebook computer, and switches the mobile phone A into slave equipment, switches the notebook computer into master equipment, and charges the mobile phone A by the notebook computer.
That is, when the electric quantity of the mobile phone a is small, the mobile phone a can not charge the notebook computer, and further, when the electric quantity of the notebook computer is large, the mobile phone can be charged by the notebook computer; when the electric quantity of the notebook computer is also small, both sides do not charge the other side. When the residual electric quantity of the notebook computer reaches the upper limit of the electric quantity of the notebook computer, the electric quantity of the mobile phone A does not reach the upper limit of the mobile phone A, the mobile phone A can charge the notebook computer without charging the notebook computer and switching the charging roles, and the notebook computer charges the mobile phone A.
The embodiment of the application further provides an electronic device, for example, the electronic device may be the electronic device 400 shown in fig. 4, and the electronic device 400 may be the mobile phone a or the mobile phone B. Taking the mobile phone a as an example, as shown in fig. 12, the mobile phone a includes a control module, a charging management module, and a charging protocol module (PD module). The control module may be, for example, a processor.
The control module may obtain the device power of the mobile phone a (the remaining power of the mobile phone a). The control module can also obtain the electric quantity of the opposite terminal equipment connected with the mobile phone A (namely the residual electric quantity of the mobile phone B).
The control module can also obtain the device power consumption of the mobile phone A. The device power consumption of the mobile phone a may be a system power consumption of the mobile phone a. The control module can obtain the discharge current provided by the battery of the mobile phone A for the system, and calculate the system power consumption of the mobile phone A according to the discharge current.
The control module can also analyze whether the mobile phone A is executing high power consumption application based on the device power consumption of the mobile phone A.
The control module recognizes that the mobile phone a is running a high power consumption application, and then the control module may send an instruction for controlling the charging current to the charging management module. The control module can also send an instruction for controlling the charging current to the charging management module according to the remaining capacity of the mobile phone A and the remaining capacity of the mobile phone B. The instruction for controlling the charging current is used for controlling the mobile phone A not to charge the mobile phone B or controlling the mobile phone A to refuse the mobile phone B to charge the mobile phone A.
In response to receiving the instruction, the charge management module may control the charging current provided to handset B. For example, the charge management module may adjust the charge level provided to handset B to zero, and the charge management module may also adjust the charge current provided to handset B to a small value, such as from an original 500mA to 100mA.
In response to receiving the instruction, the charge management module may also refuse to receive a charging current provided by the mobile phone B for the mobile phone a.
Further, after controlling the mobile phone a to not charge the mobile phone B or the mobile phone a to reject the mobile phone B to charge the mobile phone a, the control module may further send an instruction for switching the charging role to the PD module. The instruction for switching the charging roles is used for switching the mobile phone A from the master equipment to the slave equipment and switching the mobile phone B from the slave equipment to the master equipment; or switching the mobile phone A from the slave device to the master device and switching the mobile phone B from the master device to the slave device.
In response to receiving the instruction, the PD module may send an rp_swap control instruction to handset B to switch charging roles based on the PD protocol.
Therefore, the method for controlling charging provided by the embodiment of the application can intelligently control the charging direction and intelligently adjust the on-line current, so that the purpose of power-saving transmission is achieved.
The embodiment of the application provides electronic equipment, which comprises: memory, USB Type-C interface, and one or more processors. The USB Type-C interface is used for establishing USB connection with the electronic equipment with the USB Type-C interface. The memory is coupled with the processor; wherein the memory is for storing computer program code, the computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device may perform the functions or steps performed by the mobile phone a in the method embodiments described above. The structure of the electronic device may refer to the structure of the electronic device 400 shown in fig. 4.
Embodiments of the present application also provide a computer storage medium including computer instructions that, when executed on an electronic device (e.g., electronic device 400 shown in fig. 4), cause the electronic device to perform the functions or steps of the method embodiments described above.
Embodiments of the present application also provide a computer program product which, when run on a computer, causes the computer to perform the functions or steps of the method embodiments described above.
Embodiments of the present application also provide a chip system including at least one processor and at least one interface circuit. The processors and interface circuits may be interconnected by wires. For example, the interface circuit may be used to receive signals from other devices (e.g., a memory of an electronic device, a microphone of an electronic device). For another example, the interface circuit may be used to send signals to other devices (e.g., processors). The interface circuit may, for example, read instructions stored in the memory and send the instructions to the processor. The instructions, when executed by a processor, may cause an electronic device to perform the various steps of the embodiments described above. Of course, the chip system may also include other discrete devices, which are not specifically limited in this embodiment of the present application.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of controlling charging, applied to a first electronic device having a first USB Type-C interface, the method comprising:
after the first electronic device detects that the first USB Type-C interface is connected with a second USB Type-C interface of a second electronic device through a Type-C cable, judging whether the first electronic device and the second electronic device are in data transmission through the Type-C cable;
and if the first electronic device and the second electronic device perform data transmission through the Type-C cable, the first electronic device controls the first electronic device not to charge the second electronic device or refuses the second electronic device to charge the first electronic device.
2. The method of claim 1, wherein the first electronic device charges the second electronic device through the Type-C cable after the first USB Type-C interface is connected to the second USB Type-C interface through the Type-C cable;
If the first electronic device and the second electronic device perform data transmission through the Type-C cable, the first electronic device controls the first electronic device not to charge the second electronic device, including:
if the first electronic device and the second electronic device are transmitting data through the Type-C cable, the data transmission direction is that the first electronic device obtains data from the second electronic device, and the first electronic device does not charge the second electronic device.
3. The method of claim 1, wherein if the first electronic device and the second electronic device are transmitting data through the Type-C cable, the first electronic device controlling the first electronic device not to charge the second electronic device comprises:
if the first electronic device and the second electronic device are transmitting data through the Type-C cable, the first electronic device identifies whether the first electronic device is running a first application; the first application is a preset application, or the first application is an application with power consumption larger than a preset power consumption threshold;
And if the first electronic device is running the first application, the first electronic device controls the first electronic device not to charge the second electronic device.
4. The method of any of claims 1-3, wherein if the first electronic device and the second electronic device are transmitting data through the Type-C cable, the first electronic device controlling the first electronic device not to charge the second electronic device comprises:
if the first electronic device and the second electronic device are in data transmission through the Type-C cable, the first electronic device obtains the residual electric quantity of the first electronic device and the residual electric quantity of the second electronic device;
and if the residual electric quantity of the first electronic device is smaller than a first electric quantity threshold value and/or the residual electric quantity of the second electronic device is larger than a second electric quantity threshold value, the first electronic device controls the first electronic device not to charge the second electronic device.
5. The method of claim 4, wherein after the first electronic device does not charge the second electronic device, the method further comprises:
The first electronic device and the second electronic device switch the charging roles, and the first electronic device receives the second electronic device to charge the first electronic device.
6. The method of claim 1, wherein the second electronic device charges the first electronic device through the Type-C cable after the first USB Type-C interface is connected to the second USB Type-C interface through the Type-C cable;
if the first electronic device and the second electronic device perform data transmission through the Type-C cable, the first electronic device refuses the second electronic device to charge the first electronic device, including:
and if the first electronic device and the second electronic device perform data transmission through the Type-C cable, the data transmission direction is that the second electronic device acquires data from the first electronic device, and the first electronic device refuses the second electronic device to charge the first electronic device.
7. The method of claim 1, wherein if the first electronic device and the second electronic device are transmitting data through the Type-C cable, the first electronic device refusing the second electronic device to charge the first electronic device comprises:
If the first electronic device and the second electronic device are in data transmission through the Type-C cable, the first electronic device obtains the residual electric quantity of the first electronic device and the residual electric quantity of the second electronic device;
and if the residual electric quantity of the second electronic device is smaller than a third electric quantity threshold value and/or the residual electric quantity of the first electronic device is larger than a fourth electric quantity threshold value, the first electronic device refuses the second electronic device to charge the first electronic device.
8. The method of claim 6 or 7, wherein after the first electronic device refuses the second electronic device to charge the first electronic device, the method further comprises:
the first electronic device and the second electronic device switch the charging roles, and the first electronic device charges the second electronic device through the Type-C cable.
9. An electronic device, the electronic device comprising: a memory, a USB Type-C interface, and one or more processors; the USB Type-C interface is used for establishing USB connection with the electronic equipment with the USB Type-C interface; the memory is coupled with the processor; wherein the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 1-8.
10. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-8.
CN202310520273.8A 2023-05-10 2023-05-10 Method for controlling charging and electronic equipment Active CN116231815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310520273.8A CN116231815B (en) 2023-05-10 2023-05-10 Method for controlling charging and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310520273.8A CN116231815B (en) 2023-05-10 2023-05-10 Method for controlling charging and electronic equipment

Publications (2)

Publication Number Publication Date
CN116231815A true CN116231815A (en) 2023-06-06
CN116231815B CN116231815B (en) 2023-09-08

Family

ID=86573574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310520273.8A Active CN116231815B (en) 2023-05-10 2023-05-10 Method for controlling charging and electronic equipment

Country Status (1)

Country Link
CN (1) CN116231815B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093515A (en) * 2023-10-09 2023-11-21 荣耀终端有限公司 Memory, terminal equipment and memory system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205544514U (en) * 2016-03-11 2016-08-31 深圳市普洛威电子有限公司 Take DATA TRANSFER FUNCTIONS's integrated charger
CN106026247A (en) * 2016-06-17 2016-10-12 上海与德通讯技术有限公司 Charging equipment and charging method thereof
CN106058979A (en) * 2016-06-27 2016-10-26 深圳维普创新科技有限公司 Charging method capable of stably realizing large-current charging based on TYPE-C interface
CN106299515A (en) * 2016-09-14 2017-01-04 北京小米移动软件有限公司 Charging method and device
CN107565650A (en) * 2017-09-30 2018-01-09 深圳传音通讯有限公司 Design of Compatibility method and circuit
CN110099150A (en) * 2019-05-24 2019-08-06 深圳市泰达讯科技有限公司 A kind of switching depressed place, adapting system and its forwarding method
US20190280504A1 (en) * 2016-08-12 2019-09-12 Lg Electronics Inc. Mobile terminal
CN211239378U (en) * 2019-12-10 2020-08-11 维沃移动通信有限公司 Charging circuit and electronic device
CN111969686A (en) * 2020-08-18 2020-11-20 上海乐今通信技术有限公司 Mobile terminal for concurrent USB OTG and charging and implementation method
WO2022012644A1 (en) * 2020-07-15 2022-01-20 华为技术有限公司 Data transmission method employing charging cable, and electronic devices
CN115864582A (en) * 2020-07-15 2023-03-28 华为技术有限公司 Data transmission method based on charging cable and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205544514U (en) * 2016-03-11 2016-08-31 深圳市普洛威电子有限公司 Take DATA TRANSFER FUNCTIONS's integrated charger
CN106026247A (en) * 2016-06-17 2016-10-12 上海与德通讯技术有限公司 Charging equipment and charging method thereof
CN106058979A (en) * 2016-06-27 2016-10-26 深圳维普创新科技有限公司 Charging method capable of stably realizing large-current charging based on TYPE-C interface
US20190280504A1 (en) * 2016-08-12 2019-09-12 Lg Electronics Inc. Mobile terminal
CN106299515A (en) * 2016-09-14 2017-01-04 北京小米移动软件有限公司 Charging method and device
CN107565650A (en) * 2017-09-30 2018-01-09 深圳传音通讯有限公司 Design of Compatibility method and circuit
CN110099150A (en) * 2019-05-24 2019-08-06 深圳市泰达讯科技有限公司 A kind of switching depressed place, adapting system and its forwarding method
CN211239378U (en) * 2019-12-10 2020-08-11 维沃移动通信有限公司 Charging circuit and electronic device
WO2022012644A1 (en) * 2020-07-15 2022-01-20 华为技术有限公司 Data transmission method employing charging cable, and electronic devices
CN115864582A (en) * 2020-07-15 2023-03-28 华为技术有限公司 Data transmission method based on charging cable and electronic equipment
CN111969686A (en) * 2020-08-18 2020-11-20 上海乐今通信技术有限公司 Mobile terminal for concurrent USB OTG and charging and implementation method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093515A (en) * 2023-10-09 2023-11-21 荣耀终端有限公司 Memory, terminal equipment and memory system

Also Published As

Publication number Publication date
CN116231815B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
CN111724775B (en) Voice interaction method and electronic equipment
US11683850B2 (en) Bluetooth reconnection method and related apparatus
CN114079893B (en) Bluetooth communication method, terminal device and computer readable storage medium
US20220360942A1 (en) Bluetooth-based object searching method and electronic device
CN114079892A (en) Bluetooth communication method, wearable device and system
CN111356222A (en) Transmission power adjustment method, terminal, storage medium, and electronic device
CN116231815B (en) Method for controlling charging and electronic equipment
CN116137639A (en) Cross-equipment audio data transmission method and electronic equipment
CN115119048B (en) Video stream processing method and electronic equipment
CN114079642B (en) Mail processing method and electronic equipment
CN114691248B (en) Method, device, equipment and readable storage medium for displaying virtual reality interface
WO2020024087A1 (en) Working method of touch control apparatus, and terminal
CN116703689B (en) Method and device for generating shader program and electronic equipment
CN116719376B (en) Voltage control method, device, equipment and storage medium
CN116709220B (en) Network connection method, network connection device, electronic equipment and computer readable storage medium
CN117271170B (en) Activity event processing method and related equipment
CN117013660B (en) Charging icon display method and electronic equipment
WO2024032430A1 (en) Memory management method and electronic device
CN114006969B (en) Window starting method and electronic equipment
CN117254539A (en) Charging method and electronic equipment
CN117708009A (en) Signal transmission method and electronic equipment
CN117119102A (en) Awakening method of voice interaction function and electronic equipment
CN117666819A (en) Mouse operation method, electronic device, mouse and computer-readable storage medium
CN117667506A (en) Drawing library cloning method, system and electronic equipment
CN117289807A (en) Communication method, communication system and mouse

Legal Events

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