How to realize the charging blocking function

Contemporary mobile devices are usually able to work with the energy provided by rechargeable storage components (such as rechargeable batteries). Usually, the rechargeable battery is located inside the mobile device and cannot be seen from the outside. Some of these mobile devices, such as notebook computers, can be configured to be specially connected with power sockets, which are similar to wall-mounted AC sockets in homes and offices, and usually convert AC voltage into lower DC voltage suitable for mobile devices through chargers. When this connection with the external power supply voltage is established, the rechargeable battery can be charged. On the other hand, these mobile devices can usually be connected to other devices at the same time through multiple wired connections that are usually connected in series. Examples may include Universal Serial Bus (USB), which is extended to different types and versions, similar to high-speed USB, portable USB(0TG USB), high-speed portable USB (high-speed OTG USB) and even wireless USB, and IEEE 1394, which is called the trademark of Fireffire. These serial interfaces not only allow data communication and exchange between connected devices, but also provide power. On the other hand, the provided electric energy is used to provide the energy of the series connection itself, but other connected devices that do not provide electric energy for the series connection can further receive the provided electric energy. Therefore, devices connected to other devices that provide power in this way can operate with the power obtained from the connection, and can also charge their rechargeable batteries. This is also the "charge and play" function. A dedicated charging device can also be connected to a mobile device to be charged by using such a serial connection adapter. In fact, some mobile devices only provide a charging serial port connection interface, and there is no separate dedicated charging interface. However, in general, if a mobile device detects that it is connected through one of its serial data interfaces and the connected device is used to provide power, it will use the power to operate and charge its rechargeable battery. Usually, at least one connected device is needed to provide power for the connection of serial ports. Therefore, when only connected with mobile devices operating on their respective rechargeable batteries, devices that do not supply power to the serial port will charge their rechargeable batteries, without knowing that the devices that are supplying power are not connected to the wall outlet. Therefore, this creates a problem. In this case, the mobile device will charge itself from other batteries, and even the battery of the device that provides power may be completely exhausted. The published US patent application 2007/0046268A 1 discloses a port connectable to an external device with a battery, which receives energy from the external device through a connection; A judging unit for judging whether the external device is a device for contributing electric energy based on the detection result; And a controller for controlling the charging of the battery based on the judgment result. Therefore, it is an object of the present invention to be able to communicate with a mobile device that receives energy from a connection, and the energy provided to the device through the connection should be used conservatively.