Battery connection detection method, circuit, device, equipment, storage medium and chip

By obtaining the motherboard pin status information, determining the connection status of the battery connector and prompting the user to repair it in a timely manner, the low power supply efficiency and damage risks caused by the battery connector falling off are solved, ensuring the normal operation of the terminal equipment.

CN119001545APending Publication Date: 2024-11-22BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310565536.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

When the battery connector of the terminal device falls off, the user cannot know it in time, resulting in low battery power supply efficiency, increased heat concentration and risk of damage.

Method used

By obtaining the status information of different pins on the motherboard, determine the connection status between the connector and the motherboard, promptly prompt the user to perform repairs to avoid problems caused by the connector falling off.

Benefits of technology

It effectively avoids the problems of concentrated battery heat and low power supply efficiency, reduces the risk of battery damage, and ensures the normal operation of terminal equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119001545A_ABST
    Figure CN119001545A_ABST
Patent Text Reader

Abstract

The invention relates to a battery connection detection method, circuit, device and equipment, a storage medium and a chip, and provides a battery connection detection method which is applied to terminal equipment and comprises the following steps: acquiring state information of a first specified pin and / or a second specified pin; the state information is used for representing whether the connection between the first specified pin and / or the second specified pin and the battery is abnormal; and determining the connection state of the first connector and / or the second connector and the mainboard according to the state information of the first specified pin and / or the second specified pin. The connection state of the battery connector can be detected, the problems of battery heat concentration and low power supply efficiency caused by connector abnormity are avoided, and the risk of accidents caused by battery damage is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal device battery technology, and in particular to a battery connection detection method, circuit, device, equipment, storage medium and chip. Background Art

[0002] In the related art, the battery of the terminal device is connected to the mainboard through multiple connectors. If one of the connectors falls off, the battery can still supply power to the mainboard through other connectors, so that the terminal device can work normally, but the user cannot know it. When the user continues to use the mobile phone in this situation, the battery power supply current only flows to the mainboard through other connectors, which will lead to the risk of heat concentration, low power supply efficiency and battery damage accidents. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a battery connection detection method, circuit, device, equipment, storage medium and chip.

[0004] According to a first aspect of an embodiment of the present disclosure, a battery connection detection method is provided, which is applied to a terminal device, wherein the terminal device includes a battery and a mainboard, the battery includes a first connector and a second connector, the battery is connected to the mainboard through the first connector and the second connector, the mainboard includes a processing module, the processing module includes a first designated pin and a second designated pin, the first designated pin passes through the first connector to connect to the battery, and the second designated pin passes through the second connector to connect to the battery; the method includes:

[0005] Acquire status information of the first designated pin and / or the second designated pin, where the status information is used to indicate whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal;

[0006] The connection status between the first connector and / or the second connector and the mainboard is determined according to the status information of the first designated pin and / or the second designated pin.

[0007] Optionally, the processing module is a SOC chip, the first designated pin is a first GPIO pin of the SOC chip, the first GPIO pin is connected to one end of a first resistor in the battery through the first connector, and the other end of the first resistor is grounded; the second designated pin is an I2C pin of the SOC chip, the I2C pin is connected to a fuel gauge in the battery through the second connector; the first resistor and the fuel gauge are arranged in a battery protection board of the battery.

[0008] Optionally, the acquiring the state information of the first designated pin and / or the second designated pin includes:

[0009] Acquire a first voltage state of the first GPIO pin;

[0010] A transmission status of a communication signal between the I2C pin and the fuel gauge is obtained.

[0011] Optionally, determining the connection status of the first connector and / or the second connector with the mainboard according to the status information of the first designated pin and / or the second designated pin includes:

[0012] A connection state between the first connector and the second connector is determined according to a first voltage state of the first GPIO pin and a transmission state of a communication signal between the I2C pin and the fuel gauge.

[0013] Optionally, when the battery is in a power supply state, determining the connection state of the first connector and the second connector according to the first voltage state of the first GPIO pin and the transmission state of the communication signal between the I2C pin and the fuel gauge includes:

[0014] When the first voltage state is at a first level, determining that the first connector is abnormally connected;

[0015] When the first voltage state is at a second level, determining that the first connector is normally connected; wherein the first level is higher than the second level;

[0016] In any transmission cycle of the communication signal, when the communication signal transmission between the I2C pin and the electricity meter is normal, determining that the second connector is connected normally;

[0017] In a case where the communication signal transmission between the I2C pin and the electricity meter is abnormal within any transmission cycle of the communication signal, it is determined that the second connector is abnormally connected.

[0018] Optionally, when the battery is in a charging state, the first connector is used to charge the battery, and the second connector is used for the battery to power the mainboard; determining the connection state of the first connector and the second connector according to the first voltage state of the first GPIO pin and the transmission state of the communication signal between the I2C pin and the fuel gauge includes:

[0019] When the first voltage state is at a first level, determining that the first connector is abnormally connected;

[0020] In the case of determining that the first voltage state is a second level, determining that the first connector is normally connected; wherein the first level is higher than the second level;

[0021] In any transmission cycle of the communication signal, when the communication signal transmission between the I2C pin and the electricity meter is normal, determining that the second connector is connected normally;

[0022] When the terminal device is powered off, it indicates that the second connector is abnormally connected.

[0023] Optionally, the processing module is a SOC chip, the first designated pin is a first GPIO pin of the SOC chip, the second designated pin is a second GPIO pin of the SOC chip, the first GPIO pin and the second GPIO pin are connected by a connecting line, and the connecting line passes through the first connector, the battery protection board of the battery and the second connector in sequence.

[0024] Optionally, the acquiring the state information of the first designated pin and / or the second designated pin includes:

[0025] Controlling the first GPIO pin to output a first electrical level to the second GPIO pin through the connecting line according to a set output cycle;

[0026] The voltage state output by the first GPIO pin is detected through the second GPIO pin according to the output cycle, and the voltage state includes the first level or the second level, and the first level is higher than the second level.

[0027] Optionally, determining the connection status of the first connector and / or the second connector with the mainboard according to the status information of the first designated pin and / or the second designated pin includes:

[0028] In any output cycle in which the first GPIO pin outputs a level to the second GPIO pin, when the second GPIO pin detects that the first GPIO pin outputs a first level, keeping the current connector disconnection count unchanged;

[0029] When it is detected through the second GPIO pin that the output of the first GPIO pin is a second level, the connector disconnection count is increased by 1; wherein the first level is higher than the second level;

[0030] When the connector disconnection count is greater than a set quantity threshold, it is determined that at least one of the first connector and the second connector is abnormally connected to the mainboard.

[0031] Optionally, the method further comprises:

[0032] When it is determined that the connection state between the first connector and / or the second connector and the mainboard is abnormal, a prompt message is output, where the prompt message is used to remind the user that the battery connection is abnormal.

[0033] According to a second aspect of an embodiment of the present disclosure, a battery connection detection device is provided, which is applied to a terminal device, wherein the terminal device includes a battery and a mainboard, the battery includes a first connector and a second connector, the battery is connected to the mainboard through the first connector and the second connector, the mainboard includes a processing module, the processing module includes a first designated pin and a second designated pin, the first designated pin passes through the first connector to connect to the battery, and the second designated pin passes through the second connector to connect to the battery; the device includes:

[0034] an acquisition module, configured to acquire status information of the first designated pin and / or the second designated pin, wherein the status information is used to indicate whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal;

[0035] The detection module is configured to determine the connection status of the first connector and / or the second connector with the mainboard according to the status information of the first designated pin and / or the second designated pin.

[0036] According to a third aspect of an embodiment of the present disclosure, there is provided a battery connection detection circuit, which is applied to a terminal device, wherein the terminal device comprises a battery and a mainboard, and the battery is connected to the mainboard via the first connector and the second connector; the circuit comprises: a processing module, wherein the processing module is arranged on the mainboard, and the processing module comprises a first designated pin and a second designated pin; the first designated pin is used to connect to the battery through the first connector, and the second designated pin is used to connect to the battery through the second connector.

[0037] Optionally, the processing module is a SOC chip, the first designated pin is a first GPIO pin of the SOC chip, the first GPIO pin is connected to one end of a first resistor in the battery through the first connector, and the other end of the first resistor is grounded; the second designated pin is an I2C pin of the SOC chip, the I2C pin is connected to a fuel gauge in the battery through the second connector; the first resistor and the fuel gauge are arranged in a battery protection board of the battery;

[0038] The SOC chip is used to obtain a first voltage state of the first GPIO pin, and to obtain a transmission state of a communication signal between the I2C pin and the fuel gauge, wherein the first voltage state and the transmission state are used to determine a connection state between the first connector and the second connector, wherein the connection state includes a normal connection or an abnormal connection.

[0039] Optionally, the processing module is a SOC chip, the first designated pin is a first GPIO pin of the SOC chip, the second designated pin is a second GPIO pin of the SOC chip, the first GPIO pin and the second GPIO pin are connected via a connecting line, and the connecting line passes through the first connector, the battery protection board of the battery, and the second connector in sequence;

[0040] The SOC chip is used to control the first GPIO pin to output a first level to the second GPIO pin through the connecting line according to a set output cycle, and detect a voltage state output by the first GPIO pin through the second GPIO pin according to the output cycle, the voltage state is used to update a connector disconnection count, and the connector disconnection count is used to determine a connection state between the first connector and the second connector, the connection state including a normal connection or an abnormal connection; the voltage state includes the first level or the second level, and the first level is higher than the second level.

[0041] According to a fourth aspect of an embodiment of the present disclosure, a terminal device is provided, the terminal device comprising a battery and a mainboard, the battery comprising a first connector and a second connector, the battery being connected to the mainboard through the first connector and the second connector, the mainboard comprising a processing module, the processing module comprising a first designated pin and a second designated pin, the first designated pin being connected to the battery through the first connector, and the second designated pin being connected to the battery through the second connector; comprising:

[0042] processor;

[0043] a memory for storing processor-executable instructions;

[0044] Wherein, the processor is configured to: implement the steps of any one of the methods described in the first aspect above when executing the executable instructions.

[0045] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, wherein the program instructions, when executed by a processor, implement the steps of any one of the methods described in the first aspect above.

[0046] According to a sixth aspect of an embodiment of the present disclosure, a chip is provided, comprising a processor and an interface; the processor is used to read instructions to execute the steps of any one of the methods described in the first aspect above.

[0047] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0048] In the above technical solution, a battery connection detection method is provided, which is applied to a terminal device, the terminal device includes a battery and a mainboard, the battery includes a first connector and a second connector, the battery is connected to the mainboard through the first connector and the second connector, the mainboard includes a processing module, the processing module includes a first designated pin and a second designated pin, the first designated pin passes through the first connector to connect to the battery, and the second designated pin passes through the second connector to connect to the battery; the method includes: obtaining the state information of the first designated pin and / or the second designated pin, the state information is used to characterize whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal; according to the state information of the first designated pin and / or the second designated pin, determining the connection state of the first connector and / or the second connector and the mainboard. Through the above technical solution, by obtaining the pin state information of different pins of the processing module on the mainboard, the connection state of different connectors and the mainboard can be determined, thereby determining the connection state of the connector, and when the user encounters a battery connector falling off when using the terminal device, the user can be promptly prompted to perform maintenance, which can effectively avoid the problems of battery heat concentration and low power supply efficiency caused by the connector falling off, and reduce the risk of battery damage accidents.

[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0051] Figure 1 It is a structural diagram of a terminal device applicable to the embodiment of the present disclosure.

[0052] Figure 2 The figure is a flow chart showing a battery connection detection method according to an exemplary embodiment.

[0053] Figure 3 is a structural diagram of a battery connection detection circuit according to an exemplary embodiment.

[0054] Figure 4 The figure is a flow chart showing a battery connection detection method according to an exemplary embodiment.

[0055] Figure 5 The figure is a flow chart showing a battery connection detection method according to an exemplary embodiment.

[0056] Figure 6 The figure is a flow chart showing a battery connection detection method according to an exemplary embodiment.

[0057] Figure 7 The figure is a flow chart showing a battery connection detection method according to an exemplary embodiment.

[0058] Figure 8 is a structural diagram of another battery connection detection circuit according to an exemplary embodiment.

[0059] Fig. 9 The figure is a flow chart showing a battery connection detection method according to an exemplary embodiment.

[0060] Fig.10 The figure is a flow chart showing a battery connection detection method according to an exemplary embodiment.

[0061] Fig.11 is a block diagram of a battery connection detection device 1100 according to an exemplary embodiment.

[0062] Fig.12 It is a block diagram of an apparatus 1200 of a terminal device according to an exemplary embodiment. DETAILED DESCRIPTION

[0063] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0064] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0065] First, the application scenarios of the present disclosure are described. Figure 1 is a schematic diagram of a terminal device applicable to the embodiment of the present disclosure, such as Figure 1As shown, the terminal device may include: a battery 20 and a mainboard 10, the battery 10 includes a first connector 22 and a second connector 23, the battery 20 is connected to the mainboard 10 through the first connector 22 and the second connector 23, the mainboard 10 includes a processing module 11, the processing module 11 includes a first designated pin 12 and a second designated pin 13, the first designated pin 12 is used to pass through the first connector 22 to connect to the battery 20, and the second designated pin 13 is used to pass through the second connector 23 to connect to the battery 20. It can be understood that Figure 1 The structure shown in is a partial structure in the terminal device. The embodiments of the present disclosure do not limit other structures in the terminal device except the battery and the mainboard.

[0066] Figure 2 is a flow chart of a battery connection detection method according to an exemplary embodiment. This embodiment is illustrated by applying the battery connection detection method to a terminal device, wherein the terminal device may be Figure 1 The terminal equipment shown. Figure 2 As shown, the method may include the following steps:

[0067] In step S11, status information of the first designated pin and / or the second designated pin is obtained, where the status information is used to indicate whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal.

[0068] In step S12, the connection status between the first connector and / or the second connector and the mainboard is determined according to the status information of the first designated pin and / or the second designated pin.

[0069] For example, in various embodiments of the present disclosure, the terminal device may be a mobile phone, a tablet, a computer, or a computer that may have Figure 1 Other electronic devices related to the structure shown. In addition, it can be understood that the battery 20 may be a built-in battery or a detachable battery.

[0070] In the above technical solution, by obtaining the status information of the first designated pin and / or the second designated pin, the status information is used to characterize whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal; according to the status information of the first designated pin and / or the second designated pin, the connection status of the first connector and / or the second connector and the mainboard is determined. Through the above technical solution, by obtaining the pin status information of different pins of the processing module on the mainboard, the connection status of different connectors and the mainboard can be determined, thereby determining the connection status of the connector. When the user encounters a battery connector falling off when using the terminal device, the user can be promptly prompted to perform maintenance, which can effectively avoid the problems of battery heat concentration and low power supply efficiency caused by the connector falling off, and reduce the risk of accidents caused by battery damage.

[0071] Figure 3 is a structural diagram of a battery connection detection circuit according to an exemplary embodiment. In one implementation, Figure 1 The battery connection detection circuit structure in the terminal device shown can be as follows Figure 3 As shown, including:

[0072] The processing module 11 can be a SOC (called system on chip, or system-level chip) chip, and the first designated pin 12 can be a first GPIO pin 12' of the SOC chip 11, and the first GPIO pin 12' is connected to one end of the first resistor 24 in the battery 20 through the first connector 22, and the other end of the first resistor 24 is grounded; the second designated pin 13 is an I2C pin 13' of the SOC chip 11, and the I2C pin 13' is connected to the fuel gauge 25 in the battery through the second connector 23; the first resistor 24 and the fuel gauge 25 are arranged in the battery protection board 21 of the battery 20.

[0073] For example, a SOC chip (System on Chip) integrates the entire information processing system on a chip. In simple terms, a SOC chip is a large-scale integrated circuit that expands audio and video functions and dedicated interfaces on the basis of a central processing unit (CPU). It is the "brain" of smart devices. The most common application is mobile applications, including smartphones, smart watches or tablets, etc. Other applications include signal voice processing, PC interfaces, and data communications. A SOC chip contains multiple pins. Pins refer to the wiring from the internal circuit of the SOC chip to the peripheral circuit. Pins constitute the interface of the SOC chip, where different pins have different functions, which may generally include main power supply, multi-function I / O port, control, strobe and reset, etc.

[0074] Figure 4 is a flow chart of a battery connection detection method according to an exemplary embodiment. Figure 4 As shown, it can be applied to Figure 3 The structure diagram of the battery connection detection circuit shown in step S11 includes the following steps:

[0075] In step S111, a first voltage state of the first GPIO pin is acquired.

[0076] For example, GPIO (General Purpose Input Output) is a general purpose input and output pin of a SOC. The output and input of the GPIO pin can be controlled by software. When the GPIO pin is used as an input port, the state of the pin can be read through it. When the GPIO pin is used as an output port, the connected peripheral device can be controlled by outputting a high level or a low level. In a digital circuit, the voltage is represented by a logic level, which includes a high level and a low level. The digital circuits formed by different components have different logic levels corresponding to the voltage. In a possible circuit, a voltage greater than 3.5 volts can be defined as a high level, represented by the number 1; a voltage less than 0.3 volts can be defined as a low level, represented by the number 0.

[0077] For example, for the terminal device, the first GPIO pin can be selected according to actual needs. For example, an idle GPIO pin of the SOC chip can be selected as the GPIO pin. The first GPIO pin can be used as an input port. The logic level of the first GPIO pin includes high level and low level, represented by 1 and 0 respectively. The terminal device can read the voltage state of the first GPIO pin through the SOC chip. When the read voltage state is 1, it indicates that the voltage state of the first GPIO pin is a high level; when the read voltage state is 0, it indicates that the voltage state of the first GPIO pin is a low level.

[0078] In step S112, the transmission status of the communication signal between the I2C pin and the fuel meter is obtained.

[0079] For example, the fuel gauge can monitor the battery voltage, current, and temperature, and can also predict the remaining capacity percentage, remaining empty time, remaining full time, or battery health of the battery. I2C (Inter-Integrated Circuit) is mainly used for short-distance, low-speed communication between chips. The fuel gauge communicates with the SOC chip through I2C, and the pins used by the SOC to communicate with the fuel gauge are I2C pins. For the terminal device, the communication status between the SOC chip and the fuel gauge can be read through the SOC chip.

[0080] Figure 5 is a flow chart of a battery connection detection method according to an exemplary embodiment. Figure 5 As shown, it can be applied to Figure 3 The structure diagram of the battery connection detection circuit shown in FIG. 1 , step S12 may include the following steps:

[0081] In step S121, the connection state between the first connector and the second connector is determined according to the first voltage state of the first GPIO pin and the transmission state of the communication signal between the I2C pin and the fuel gauge.

[0082] Exemplarily, the first GPIO pin is connected to the first resistor through the first connector, which can be understood as connecting the first GPIO pin and one end of the first resistor through a lead, and the lead passes through the first connector; if the first connector falls off, the lead passing through the first connector will be disconnected, thereby causing the voltage state of the first GPIO pin to change, so the voltage state of the first GPIO pin can be used to determine the connection state of the first connector and the motherboard. The I2C pin is connected to the fuel gauge through the second connector, and the I2C pin passes through the second connector and the first GPIO pin passes through the first connector. Similarly, if the second connector falls off, the lead passing through the second connector will be disconnected, thereby causing the transmission of the communication signal between the I2C pin and the fuel gauge to be interrupted, so the transmission state of the communication signal between the I2C pin and the fuel gauge can be used to determine the connection state of the second connector and the motherboard.

[0083] Figure 6 is a flow chart of a battery connection detection method according to an exemplary embodiment. Figure 6 As shown, it can be applied to Figure 3 The structure diagram of the battery connection detection circuit shown in FIG. 1 shows that when the battery 20 is in the power supply state, step S121 includes the following steps:

[0084] In step S1211, when the first voltage state is at the first level, it is determined that the first connector is abnormally connected.

[0085] In step S1212, when the first voltage state is at a second level, it is determined that the first connector is connected normally, wherein the first level is higher than the second level.

[0086] Exemplarily, for a terminal device, when the battery is in a power supply state, the battery supplies power to the mainboard through a first connector, and the first level may be a high level, represented by 1; the second level may be a low level, represented by 0, and the terminal device may read the first voltage state of the first GPIO pin through a SOC chip. When the read first voltage state is 0, it indicates that the connection state between the first connector and the mainboard is normal; when the read voltage state is 1, it indicates that the connection state between the first connector and the mainboard is abnormal, and the abnormal state may include situations such as the connector falling off or the connector having poor contact. After determining that the connection state between the first connector and the mainboard is abnormal, the SOC chip may send a first connector connection abnormality prompt message to the terminal device, so that the terminal device can prompt the user that the first connector is abnormally connected and repair it in time.

[0087] In step S1213, when the communication signal transmission between the I2C pin and the electricity meter is normal within any transmission cycle of the communication signal, it is determined that the second connector is connected normally.

[0088] In step S1214, when the communication signal transmission between the I2C pin and the electricity meter is abnormal during any transmission cycle of the communication signal, it is determined that the second connector is abnormally connected.

[0089] Exemplarily, for the terminal device, when the battery is in the power supply state, the battery supplies power to the mainboard through the second connector, and the communication signal between the SOC chip and the fuel meter can be transmitted periodically. In any periodic transmission process, the terminal device can read the communication signal between the SOC chip and the fuel meter through the SOC chip. When the SOC chip obtains that the communication signal transmission is normal, it indicates that the connection status of the second connector with the mainboard is normal; when the SOC chip obtains that the communication signal transmission is abnormal, it indicates that the connection status of the second connector with the mainboard is abnormal, and the communication signal transmission abnormality may include not receiving communication information or receiving erroneous communication information. After determining that the connection status between the second connector and the mainboard is abnormal, the SOC chip can send a second connector connection abnormality prompt information to the terminal device, so that the terminal device can prompt the user that the second connector connection is abnormal and repair it in time.

[0090] For example, when the first voltage state of the first connector is 0, it is determined that the first connector is connected normally, and when the communication signal transmission between the I2C pin and the fuel gauge is normal, it is determined that the second connector is connected normally. At this time, the battery supplies power to the mainboard through the first connector and the second connector at the same time. When the first voltage state of the first connector is 1, it is determined that the first connector is abnormally connected, and when the communication signal transmission between the I2C pin and the fuel gauge is normal, it is determined that the second connector is connected normally. At this time, the battery supplies power to the mainboard through the second connector, and the first connector connection abnormality prompt information can be sent to the terminal device to prompt the user of the terminal device that the first connector is abnormally connected and repaired in time. When the first voltage state of the first connector is 0, it is determined that the first connector is connected normally, and when the communication signal transmission between the I2C pin and the fuel gauge is abnormal, it is determined that the second connector is connected abnormally. At this time, the battery supplies power to the mainboard through the first connector, and the second connector connection abnormality prompt information can be sent to the terminal device to prompt the user of the terminal device that the second connector is abnormally connected and repaired in time. When the connection states of the first connector and the second connector are both abnormal, the terminal device is powered off and cannot be turned on.

[0091] Figure 7 is a flow chart of a battery connection detection method according to an exemplary embodiment. Figure 7 As shown, it can be applied to Figure 3 The structure diagram of the battery connection detection circuit shown in FIG. 1 shows that when the battery 20 is in the power supply state, step S121 includes the following steps:

[0092] In step S1215, when the first voltage state is at the first level, it is determined that the first connector is abnormally connected.

[0093] In step S1216, when it is determined that the first voltage state is at a second level, it is determined that the first connector is connected normally, wherein the first level is higher than the second level.

[0094] In step S1217, when the communication signal transmission between the I2C pin and the electricity meter is normal within any transmission cycle of the communication signal, it is determined that the second connector is connected normally.

[0095] In step S1218, when the terminal device is powered off, it is indicated that the second connector is abnormally connected.

[0096] Exemplarily, for the terminal device, when the battery is in a charging state, the first connector is used to charge the battery, and the second connector is used to power the mainboard. In another possible embodiment, when the battery is in a charging state, the second connector is used to charge the battery, and the first connector is used to power the mainboard.

[0097] For example, when the battery is in a charging state, the first connector is used to charge the battery, and the second connector is used to power the mainboard. When the first voltage state of the first connector is 0, it is determined that the first connector is connected normally, and when the communication signal transmission between the I2C pin and the fuel gauge is normal, it is determined that the second connector is connected normally. At this time, the first connector is used to charge the battery, and the second connector is used to power the mainboard. When the first voltage state of the first connector is 1, it is determined that the first connector is abnormally connected, and when the communication signal transmission between the I2C pin and the fuel gauge is normal, it is determined that the second connector is connected normally. At this time, the second connector supplies power to the mainboard, but the terminal device is abnormally charged. A first connector connection abnormality prompt message can be sent to the terminal device to prompt the user of the terminal device that the first connector is abnormally connected and repaired in time. When the first voltage state of the first connector is 0, it is determined that the first connector is connected normally. When the communication signal transmission between the I2C pin and the fuel gauge is abnormal, since in the charging state, only the battery supplies power to the mainboard only through the second connector, when the second connector is abnormal, the terminal device is powered off and cannot be turned on. Optionally, after the terminal device is powered off due to an abnormality in the second connector, the charging state of the terminal device can be disconnected and the first connector can be switched to power the mainboard. A second connector connection abnormality prompt message can be sent to the terminal device to prompt the user of the terminal device that the second connector connection is abnormal and to perform timely repairs.

[0098] In the above technical solution, a battery connection detection method is provided, which is applied to a terminal device, and the method includes: obtaining the status information of the first designated pin and / or the second designated pin, and the status information is used to characterize whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal; according to the status information of the first designated pin and / or the second designated pin, determining the connection status of the first connector and / or the second connector and the mainboard. Through the above technical solution, by obtaining the pin status information of different pins of the processing module on the mainboard, the connection status of different connectors and the mainboard can be determined, thereby determining the connection status of the connector. When the user encounters a battery connector falling off when using the terminal device, the user can be promptly prompted to perform maintenance, which can effectively avoid the problems of battery heat concentration and low power supply efficiency caused by the connector falling off, and reduce the risk of accidents caused by battery damage.

[0099] Figure 8 is a structural diagram of another battery connection detection circuit according to an exemplary embodiment. In another implementation, Figure 1 The battery connection detection circuit structure in the terminal device shown can be as follows Figure 8 As shown, including:

[0100] The processing module 11 is a SOC chip, the first designated pin 12 is a first GPIO pin 12'' of the SOC chip 11, the second designated pin 13 is a second GPIO pin 13'' of the SOC chip 11, the first GPIO pin 12'' and the second GPIO pin 13'' are connected by a connecting line, and the connecting line passes through the first connector 22, the battery protection board 21 of the battery 20 and the second connector 23 in sequence. That is, the connecting line serves as a short-circuit line to short-circuit the first GPIO pin 12'' and the second GPIO pin 13''.

[0101] Fig. 9 is a flow chart of a battery connection detection method according to an exemplary embodiment. Fig. 9 As shown, it can be applied to Figure 8 The structure diagram of the battery connection detection circuit shown in step S11 includes the following steps:

[0102] In step S113, the first GPIO pin is controlled to output a first electrical level to the second GPIO pin through the connecting line according to a set output cycle.

[0103] In step S114, the voltage state output by the first GPIO pin is detected according to the output cycle through the second GPIO pin, and the voltage state includes the first level or the second level, and the first level is higher than the second level.

[0104] Exemplarily, the first GPIO pin serves as an output port and the second GPIO pin serves as an input port. The logic levels of the first GPIO pin and the second GPIO pin include a first level and a second level, wherein the first level may be a high level, represented by the number 1; and the second level may be a low level, represented by the number 0.

[0105] For example, the first GPIO pin is used as an output port and the second GPIO pin is used as an input port. In an output cycle, the first GPIO pin sends a high level of 1 to the second GPIO pin, which passes through the first connector, the battery protection board and the second connector respectively. The high level of 1 is detected at the second GPIO pin, and the detection result may be a high level 1 or a low level 0.

[0106] Fig.10 is a flow chart of a battery connection detection method according to an exemplary embodiment. Fig.10 As shown, it can be applied to Figure 8 The structure diagram of the battery connection detection circuit shown in FIG. 1 includes the following steps:

[0107] In step S122, in any output cycle in which the first GPIO pin outputs a level to the second GPIO pin, when the second GPIO pin detects that the first GPIO pin outputs a first level, the current connector disconnection count is kept unchanged.

[0108] Exemplarily, the connector disconnection count may be used to indicate that, within a plurality of transmission cycles, the first connector or the second connector may be disconnected, and the initial value of the connector disconnection count is 0.

[0109] For example, the first GPIO pin is used as an output port and the second GPIO pin is used as an input port. In the previous output cycle, the value of the connector disconnection count is 3. In the current output cycle, the first GPIO pin sends a high level of 1 to the second GPIO pin, and the second GPIO pin detects the high level of 1. When the detection result is high level 1, the current connector disconnection count is kept unchanged, that is, the current connector disconnection count value is 3.

[0110] In step S123, when it is detected through the second GPIO pin that the output of the first GPIO pin is a second level, the disconnection count of the connector is increased by 1; wherein the first level is higher than the second level.

[0111] For example, the first GPIO pin is used as an output port and the second GPIO pin is used as an input port. In the previous output cycle, the value of the connector disconnection count is 4. In the current output cycle, the first GPIO pin sends a high level of 1 to the second GPIO pin, and the second GPIO pin detects the high level of 1. When the detection result is a low level 0, the current connector disconnection count is increased by 1, that is, the current connector disconnection count is 5.

[0112] In step S124, when the connector disconnection count is greater than a set quantity threshold, it is determined that at least one of the first connector and the second connector is abnormally connected to the mainboard.

[0113] Exemplarily, the threshold value of the number of connector disconnection counts is the maximum value that the connector disconnection count is allowed to reach, and may be preset by the terminal device.

[0114] For example, the first GPIO pin is used as an output port, the second GPIO pin is used as an input port, the threshold value of the connector disconnection count is 5, and in the previous output cycle, the value of the connector disconnection count is 5. In the current output cycle, the first GPIO pin sends a high level of 1 to the second GPIO pin, and the second GPIO pin detects the high level of 1. When the detection result is a low level 0, the current connector disconnection count is increased by 1, that is, the current connector disconnection count value is 6. At this time, the value of the connector disconnection count 6 is greater than the threshold value of the connector disconnection count 5, and a connector connection abnormality prompt message is sent to the terminal device, and the value of the connector disconnection count is modified to 0; or, in another possible case, after user maintenance, the value of the connector disconnection count is modified to 0.

[0115] In the above technical solution, a battery connection detection method is provided, which is applied to a terminal device, and the method includes: obtaining the status information of the first designated pin and / or the second designated pin, and the status information is used to characterize whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal; according to the status information of the first designated pin and / or the second designated pin, determining the connection status of the first connector and / or the second connector and the mainboard. Through the above technical solution, by obtaining the pin status information of different pins of the processing module on the mainboard, the connection status of different connectors and the mainboard can be determined, thereby determining the connection status of the connector. When the user encounters a battery connector falling off when using the terminal device, the user can be promptly prompted to perform maintenance, which can effectively avoid the problems of battery heat concentration and low power supply efficiency caused by the connector falling off, and reduce the risk of accidents caused by battery damage.

[0116] Fig.11 is a block diagram of a battery connection detection device 1100 according to an exemplary embodiment. This embodiment is illustrated by applying the battery connection detection device to a terminal device. The structure of the terminal device can refer to Figure 1 The embodiment shown. Fig.11 The device includes an acquisition module 1110 and a detection module 1120.

[0117] The acquisition module 1110 is configured to acquire status information of the first designated pin and / or the second designated pin, where the status information is used to indicate whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal.

[0118] The detection module 1120 is configured to determine the connection status of the first connector and / or the second connector with the mainboard according to the status information of the first designated pin and / or the second designated pin.

[0119] Optionally, the device 1100 includes Figure 3 In the circuit shown, the processing module is a SOC chip, the first designated pin is a first GPIO pin of the SOC chip, the first GPIO pin passes through the first connector and is connected to one end of a first resistor in the battery, and the other end of the first resistor is grounded; the second designated pin is an I2C pin of the SOC chip, the I2C pin passes through the second connector and is connected to a fuel gauge in the battery; the first resistor and the fuel gauge are arranged in a battery protection board of the battery.

[0120] Accordingly, the acquisition module 1110 includes: a first acquisition submodule and a second acquisition submodule;

[0121] The first acquisition submodule is configured to acquire a first voltage state of the first GPIO pin;

[0122] The second acquisition submodule is configured to acquire a transmission status of a communication signal between the I2C pin and the fuel gauge.

[0123] Optionally, the device 1100 includes Figure 3 When the circuit shown, the detection module 1120 includes: a first detection submodule;

[0124] The first detection submodule is configured to determine a connection state between the first connector and the second connector according to a first voltage state of the first GPIO pin and a transmission state of a communication signal between the I2C pin and the fuel gauge.

[0125] Optionally, the first detection submodule, when the battery is in a power supply state, is configured to:

[0126] When the first voltage state is at a first level, determining that the first connector is abnormally connected;

[0127] When the first voltage state is at a second level, determining that the first connector is connected normally; wherein the first level is higher than the second level;

[0128] In any transmission cycle of the communication signal, when the communication signal transmission between the I2C pin and the electricity meter is normal, determining that the second connector is connected normally;

[0129] In the case where the communication signal transmission between the I2C pin and the electricity meter is abnormal during any transmission cycle of the communication signal, it is determined that the second connector is abnormally connected.

[0130] Optionally, when the battery is in a charging state, the first connector is used to charge the battery, and the second connector is used for the battery to supply power to the mainboard; when the battery is in a charging state, the first detection submodule is configured as follows:

[0131] When the first voltage state is at a first level, determining that the first connector is abnormally connected;

[0132] When the first voltage state is at a second level, determining that the first connector is connected normally; wherein the first level is equal to the second level;

[0133] In any transmission cycle of the communication signal, when the communication signal transmission between the I2C pin and the electricity meter is normal, determining that the second connector is connected normally;

[0134] When the terminal device is powered off, it indicates that the second connector is abnormally connected.

[0135] Optionally, the device 1100 includes Figure 8 When the circuit shown in the figure is used, the acquisition module 1110 includes: a first signal output submodule and a first signal detection submodule;

[0136] The first signal output submodule is configured to control the first GPIO pin to output a first level to the second GPIO pin through the connecting line according to a set output cycle;

[0137] The first signal detection submodule is configured to detect a voltage state output by the first GPIO pin through the second GPIO pin according to the output cycle, where the voltage state includes the first level or the second level, and the first level is higher than the second level.

[0138] Optionally, the device 1100 includes Figure 8 In the circuit shown, the processing module is a SOC chip, the first designated pin is the first GPIO pin of the SOC chip, the second designated pin is the second GPIO pin of the SOC chip, the first GPIO pin and the second GPIO pin are connected by a connecting line, and the connecting line passes through the first connector, the battery protection board of the battery and the second connector in sequence.

[0139] Accordingly, the detection module 1120 includes: a second detection submodule;

[0140] The second detection submodule is configured to keep the current connector disconnection count unchanged when it is detected through the second GPIO pin that the first GPIO pin outputs a first level in any output cycle of the first GPIO pin outputting a level to the second GPIO pin;

[0141] When the second GPIO pin detects that the output of the first GPIO pin is a second level, the disconnection count of the connector is increased by 1; wherein the first level is higher than the second level;

[0142] When the disconnection count of the connector is greater than a set quantity threshold, it is determined that at least one of the first connector and the second connector is abnormally connected to the mainboard.

[0143] Optionally, the device 1100 may further include: an output module configured to:

[0144] When it is determined that the connection state between the first connector and / or the second connector and the mainboard is abnormal, a prompt message is output, where the prompt message is used to remind the user that the battery connection is abnormal.

[0145] In the above technical solution, a battery connection detection device is provided, which obtains the status information of the first designated pin and / or the second designated pin, and the status information is used to characterize whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal; according to the status information of the first designated pin and / or the second designated pin, the connection status of the first connector and / or the second connector and the mainboard is determined. Through the above technical solution, by obtaining the pin status information of different pins of the processing module on the mainboard, the connection status of different connectors and the mainboard can be determined, thereby determining the connection status of the connector. When the user encounters a battery connector falling off when using the terminal device, the user can be prompted to perform maintenance in time, which can effectively avoid the problems of battery heat concentration and low power supply efficiency caused by the connector falling off, and reduce the risk of accidents caused by battery damage.

[0146] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0147] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon. When the program instructions are executed by a processor, the steps of the battery connection detection method provided by the present disclosure are implemented.

[0148] Fig.12 1 is a block diagram of a terminal device 1200 according to an exemplary embodiment. For example, the device 1200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0149] Reference Fig.12The terminal device 1200 may include one or more of the following components: a processing component 1202 , a memory 1204 , a power component 1206 , a multimedia component 1208 , an audio component 1210 , an input / output interface 1212 , a sensor component 1214 , and a communication component 1216 .

[0150] The processing component 1202 generally controls the overall operation of the terminal device 1200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1202 may include one or more processors 1220 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1202 may include one or more modules to facilitate the interaction between the processing component 1202 and other components. For example, the processing component 1202 may include a multimedia module to facilitate the interaction between the multimedia component 1208 and the processing component 1202.

[0151] The memory 1204 is configured to store various types of data to support operations on the terminal device 1200. Examples of such data include instructions for any application or method operating on the terminal device 1200, contact data, phone book data, messages, pictures, videos, etc. The memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0152] The power supply component 1206 provides power to various components of the terminal device 1200. The power supply component 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the terminal device 1200.

[0153] The multimedia component 1208 includes a screen that provides an output interface between the terminal device 1200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1208 includes a front camera and / or a rear camera. When the terminal device 1200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0154] The audio component 1210 is configured to output and / or input audio signals. For example, the audio component 1210 includes a microphone (MIC), and when the terminal device 1200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1204 or sent via the communication component 1216. In some embodiments, the audio component 1210 also includes a speaker for outputting audio signals.

[0155] The input / output interface 1212 provides an interface between the processing component 1202 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0156] The sensor assembly 1214 includes one or more sensors for providing various aspects of status assessment for the terminal device 1200. For example, the sensor assembly 1214 can detect the open / closed state of the terminal device 1200, the relative positioning of the components, such as the display and keypad of the terminal device 1200, and the sensor assembly 1214 can also detect the position change of the terminal device 1200 or a component of the terminal device 1200, the presence or absence of contact between the user and the terminal device 1200, the orientation or acceleration / deceleration of the terminal device 1200, and the temperature change of the terminal device 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1214 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0157] The communication component 1216 is configured to facilitate wired or wireless communication between the terminal device 1200 and other devices. The terminal device 1200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0158] In an exemplary embodiment, the terminal device 1200 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned battery connection detection method.

[0159] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1204 including instructions, and the instructions can be executed by a processor 1220 of a terminal device 1200 to complete the above-mentioned battery connection detection method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0160] In addition to being an independent electronic device, the terminal device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC, system on chip or system-level chip), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned battery connection detection method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip including a processor, a memory, and an interface for communicating with other devices. The executable instruction may be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned battery connection detection method is implemented; alternatively, the integrated circuit or chip may receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned battery connection detection method.

[0161] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device. The computer program has a code portion for executing the above-mentioned battery connection detection method when executed by the programmable device.

[0162] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0163] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A battery connection detection method, characterized in that: Applied to a terminal device, the terminal device includes a battery and a mainboard, the battery includes a first connector and a second connector, the battery is connected to the mainboard through the first connector and the second connector, the mainboard includes a processing module, the processing module includes a first designated pin and a second designated pin, the first designated pin passes through the first connector to connect to the battery, and the second designated pin passes through the second connector to connect to the battery; the method includes: Acquire status information of the first designated pin and / or the second designated pin, where the status information is used to indicate whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal; The connection status between the first connector and / or the second connector and the mainboard is determined according to the status information of the first designated pin and / or the second designated pin.

2. The method according to claim 1, characterized in that The processing module is a SOC chip, the first designated pin is a first GPIO pin of the SOC chip, the first GPIO pin is connected to one end of a first resistor in the battery through the first connector, and the other end of the first resistor is grounded; the second designated pin is an I2C pin of the SOC chip, the I2C pin is connected to a fuel gauge in the battery through the second connector; the first resistor and the fuel gauge are arranged in a battery protection board of the battery.

3. The method according to claim 2, characterized in that The acquiring the state information of the first designated pin and / or the second designated pin includes: Acquire a first voltage state of the first GPIO pin; A transmission status of a communication signal between the I2C pin and the fuel gauge is obtained.

4. The method according to claim 2, characterized in that: The determining, according to the state information of the first designated pin and / or the second designated pin, the connection state between the first connector and / or the second connector and the mainboard includes: A connection state between the first connector and the second connector is determined according to a first voltage state of the first GPIO pin and a transmission state of a communication signal between the I2C pin and the fuel gauge.

5. The method according to claim 4, characterized in that When the battery is in a power supply state, determining the connection state of the first connector and the second connector according to the first voltage state of the first GPIO pin and the transmission state of the communication signal between the I2C pin and the fuel gauge includes: When the first voltage state is at a first level, determining that the first connector is abnormally connected; When the first voltage state is at a second level, determining that the first connector is normally connected; wherein the first level is higher than the second level; In any transmission cycle of the communication signal, when the communication signal transmission between the I2C pin and the electricity meter is normal, determining that the second connector is connected normally; In a case where the communication signal transmission between the I2C pin and the electricity meter is abnormal within any transmission cycle of the communication signal, it is determined that the second connector is abnormally connected.

6. The method according to claim 4, characterized in that When the battery is in a charging state, the first connector is used to charge the battery, and the second connector is used for the battery to power the mainboard; determining the connection state of the first connector and the second connector according to the first voltage state of the first GPIO pin and the transmission state of the communication signal between the I2C pin and the fuel gauge, includes: When the first voltage state is at a first level, determining that the first connector is abnormally connected; In the case of determining that the first voltage state is a second level, determining that the first connector is normally connected; wherein the first level is higher than the second level; In any transmission cycle of the communication signal, when the communication signal transmission between the I2C pin and the electricity meter is normal, determining that the second connector is connected normally; When the terminal device is powered off, it indicates that the second connector is abnormally connected.

7. The method according to claim 1, characterized in that The processing module is a SOC chip, the first designated pin is a first GPIO pin of the SOC chip, the second designated pin is a second GPIO pin of the SOC chip, the first GPIO pin and the second GPIO pin are connected by a connecting line, and the connecting line passes through the first connector, the battery protection board of the battery and the second connector in sequence.

8. The method according to claim 7, characterized in that The acquiring the state information of the first designated pin and / or the second designated pin includes: Controlling the first GPIO pin to output a first electrical level to the second GPIO pin through the connecting line according to a set output cycle; The voltage state output by the first GPIO pin is detected through the second GPIO pin according to the output cycle, and the voltage state includes the first level or the second level, and the first level is higher than the second level.

9. The method according to claim 7, characterized in that: The determining, according to the state information of the first designated pin and / or the second designated pin, the connection state between the first connector and / or the second connector and the mainboard includes: In any output cycle in which the first GPIO pin outputs a level to the second GPIO pin, when the second GPIO pin detects that the first GPIO pin outputs a first level, keeping the current connector disconnection count unchanged; When it is detected through the second GPIO pin that the output of the first GPIO pin is a second level, the connector disconnection count is increased by 1; wherein the first level is higher than the second level; When the connector disconnection count is greater than a set quantity threshold, it is determined that at least one of the first connector and the second connector is abnormally connected to the mainboard.

10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: When it is determined that the connection state between the first connector and / or the second connector and the mainboard is abnormal, a prompt message is output, where the prompt message is used to remind the user that the battery connection is abnormal.

11. A battery connection detection device, characterized in that: Applied to a terminal device, the terminal device includes a battery and a mainboard, the battery includes a first connector and a second connector, the battery is connected to the mainboard through the first connector and the second connector, the mainboard includes a processing module, the processing module includes a first designated pin and a second designated pin, the first designated pin passes through the first connector to connect to the battery, and the second designated pin passes through the second connector to connect to the battery; the device includes: an acquisition module, configured to acquire status information of the first designated pin and / or the second designated pin, wherein the status information is used to indicate whether the connection between the first designated pin and / or the second designated pin and the battery is abnormal; The detection module is configured to determine the connection status of the first connector and / or the second connector with the mainboard according to the status information of the first designated pin and / or the second designated pin.

12. A battery connection detection circuit, characterized in that: Applied to a terminal device, the terminal device includes a battery and a mainboard, the battery is connected to the mainboard via the first connector and the second connector; the circuit includes: a processing module, the processing module is used to be set on the mainboard, the processing module includes a first designated pin and a second designated pin; the first designated pin is used to connect to the battery through the first connector, and the second designated pin is used to connect to the battery through the second connector.

13. The battery connection detection circuit according to claim 12, characterized in that: The processing module is a SOC chip, the first designated pin is a first GPIO pin of the SOC chip, the first GPIO pin is connected to one end of a first resistor in the battery through the first connector, and the other end of the first resistor is grounded; the second designated pin is an I2C pin of the SOC chip, the I2C pin is connected to a fuel gauge in the battery through the second connector; the first resistor and the fuel gauge are arranged in a battery protection board of the battery; the SOC chip is used to obtain a first voltage state of the first GPIO pin, and to obtain a transmission state of a communication signal between the I2C pin and the fuel gauge, the first voltage state and the transmission state are used to determine a connection state between the first connector and the second connector, the connection state including a normal connection or an abnormal connection; And / or, the processing module is a SOC chip, the first designated pin is a first GPIO pin of the SOC chip, the second designated pin is a second GPIO pin of the SOC chip, the first GPIO pin and the second GPIO pin are connected by a connecting line, and the connecting line passes through the first connector, the battery protection board of the battery and the second connector in sequence; the SOC chip is used to control the first GPIO pin to output a first level to the second GPIO pin through the connecting line according to a set output cycle, and to detect a voltage state output by the first GPIO pin through the second GPIO pin according to the output cycle, the voltage state is used to update the connector disconnection count, and the connector disconnection count is used to determine the connection state of the first connector and the second connector, and the connection state includes normal connection or abnormal connection; the voltage state includes the first level or the second level, and the first level is higher than the second level.

14. A terminal device, characterized in that: The terminal device includes a battery and a mainboard, the battery includes a first connector and a second connector, the battery is connected to the mainboard through the first connector and the second connector, the mainboard includes a processing module, the processing module includes a first designated pin and a second designated pin, the first designated pin is connected to the battery through the first connector, and the second designated pin is connected to the battery through the second connector; the terminal device also includes: processor; a memory for storing processor-executable instructions; The processor is configured to: execute the executable instructions to implement the steps of the method in any one of claims 1 to 10.

15. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.

16. A chip, characterized in that: The method comprises a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 10.