Detection Method and Device for Device Status, Storage Medium and Electronic Device

By acquiring and analyzing the output level signal of the charging device to determine the interface status between the electrical device and the charging device, the problem of high detection costs in the prior art is solved, and a safe and economical charging process is achieved.

CN119758180BActive Publication Date: 2025-06-20ZHEJIANG HUAFEI INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510261693.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-20
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

In the prior art, the forward and reverse connection detection between the electrical equipment and the charging equipment requires the addition of additional power components at the electrical equipment end, resulting in high detection costs.

Method used

By acquiring the main control output level signal of the charging device, including the positive level signal and the negative level signal, the output voltage of the charging device is adjusted to determine whether the devices are in a reverse connection state, and an alarm message is issued when a reverse connection is detected and the output voltage is disabled.

Benefits of technology

It has achieved simplification of the charging system structure, reduced detection costs, ensured charging safety, reduced equipment costs and improved charging efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119758180B_ABST
    Figure CN119758180B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for detecting the state of a device, a storage medium, and an electronic device. Among them, the method includes: when both the positive-level signal and the negative-level signal are high-level signals, adjusting the output voltage of the charging device to a preset detection voltage to determine whether there is an inverse connection state between the charging device and the electrical device; when the positive-level signal and the negative-level signal are different, determining whether there is an inverse connection state between the charging device and the electrical device according to the level combination value of the main control output level signal; when there is an inverse connection state between the charging device and the electrical device, controlling the charging device to send a target alarm message and prohibiting the charging device from outputting voltage. The present application solves the technical problem that in the related art, additional power components need to be added at the electrical device end for the forward and reverse connection detection between the electrical device and the charging device, resulting in high detection costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular, to a method and device for detecting the state of a device, a storage medium, and an electronic device. Background Art

[0002] In the related art, the forward and reverse connection detection between an electrical device and a charging device usually relies on integrating additional power components, such as rectifier diodes or MOS transistors, at the electrical device end to implement the anti-reverse connection function. In other words, in the prior art, the forward and reverse connection detection relying on power components requires additional device materials, resulting in the technical problem of high cost for the forward and reverse connection detection between the electrical device and the charging device.

[0003] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention

[0004] Embodiments of the present application provide a method and device for detecting the state of a device, a storage medium, and an electronic device, so as to at least solve the technical problem that in the related art, additional power components need to be added at the electrical device end for the forward and reverse connection detection between the electrical device and the charging device, resulting in high detection cost.

[0005] According to one aspect of the embodiments of the present application, a method for detecting the state of a device is provided, including: in response to the establishment of a connection between a charging device and an electrical device, obtaining a main control output level signal of the charging device, where the main control output level signal includes a positive electrode level signal and a negative electrode level signal; in the case where both the positive electrode level signal and the negative electrode level signal are high level signals, adjusting the output voltage of the charging device to a preset detection voltage to determine whether the charging device and the electrical device are in a reverse connection state; in the case where the positive electrode level signal and the negative electrode level signal are different, determining whether the charging device and the electrical device are in the reverse connection state according to the level combination value of the main control output level signal, where the level combination value indicates that the value of the positive electrode level signal is a first value and the value of the negative electrode level signal is a second value, and the first value and the second value are different; in the case where the charging device and the electrical device are in the reverse connection state, controlling the charging device to send a target alarm message and prohibiting the charging device from outputting voltage, where the target alarm message is used to indicate that the electrical device cannot be normally charged.

[0006] According to another aspect of the embodiments of the present application, a detection device for the state of a device is further provided, including: an acquisition module, configured to acquire a main control output level signal of the charging device in response to the establishment of a connection between the charging device and the electrical device, where the main control output level signal includes a positive level signal and a negative level signal; a first determination module, configured to adjust the output voltage of the charging device to a preset detection voltage to determine whether there is a reverse connection state between the charging device and the electrical device when both the positive level signal and the negative level signal are high level signals; a second determination module, configured to determine whether there is a reverse connection state between the charging device and the electrical device according to the level combination value of the main control output level signal when the positive level signal and the negative level signal are different, where the level combination value indicates that the value of the positive level signal is a first value and the value of the negative level signal is a second value, and the first value and the second value are different; a processing module, configured to control the charging device to send a target alarm message and prohibit the charging device from outputting voltage when there is a reverse connection state between the charging device and the electrical device, where the target alarm message is used to indicate that the electrical device cannot be charged normally.

[0007] Optionally, the device is configured to determine whether there is a reverse connection state between the charging device and the electrical device according to the level combination value of the main control output level signal in the following manner when the positive level signal and the negative level signal are different: when the positive level signal is a low level signal and the negative level signal is a high level signal, adjust the output voltage of the charging device to a charging voltage, where the charging voltage represents the voltage required during the normal charging process of the electrical device, the first value is 0, and the second value is 1; when the positive level signal is a high level signal and the negative level signal is a low level signal, determine that there is a reverse connection state between the charging device and the electrical device, where the first value is 1 and the second value is 0.

[0008] Optionally, the device is configured to adjust the output voltage of the charging device to a preset detection voltage when both the positive-level signal and the negative-level signal are high-level signals, so as to determine whether there is a reverse connection state between the charging device and the electrical device. The method includes: when both the positive-level signal and the negative-level signal are high-level signals, adjusting the output voltage of the charging device to the preset detection voltage, and re-acquiring the main control output level signal; acquiring the updated positive-level signal and the updated negative-level signal in the main control output level signal; when the updated positive-level signal is a low-level signal and the updated negative-level signal is the high-level signal, adjusting the output voltage of the charging device to a charging voltage, where the charging voltage represents the voltage required during the normal charging process of the electrical device; when both the updated positive-level signal and the updated negative-level signal are the high-level signals, determining that there is a reverse connection state between the charging device and the electrical device.

[0009] Optionally, the device is further configured to: when both the positive-level signal and the negative-level signal are high-level signals, control the signal metal-oxide-semiconductor field-effect transistor in the charging device to receive a target control signal with a value of 1, so that the power metal-oxide-semiconductor field-effect transistor on the first branch stops working, where the first branch is the main branch for the charging device to output the charging voltage; control the charging device to output the detection voltage through the second branch to determine the updated main control output level signal, where the second branch is not provided with the power metal-oxide-semiconductor field-effect transistor, and the first branch and the second branch work alternately.

[0010] Optionally, the device is further configured to: when the updated positive-level signal is the low-level signal and the updated negative-level signal is the high-level signal, control the signal metal-oxide-semiconductor field-effect transistor to receive the target control signal with a value of 0, so that the power metal-oxide-semiconductor field-effect transistor starts to work; control the charging device to output a charging voltage, where the charging voltage represents the voltage required during the normal charging process of the electrical device.

[0011] Optionally, the device is further configured to: when the charging device and the electrical device are in the reverse connection state, determine the positive-level signal and the negative-level signal through a first optocoupler branch, where the charging device includes the first optocoupler branch, and the first optocoupler branch is provided with a first optocoupler device; when the charging device and the electrical device are not in the reverse connection state, determine the negative-level signal through the first optocoupler branch, and determine the positive-level signal through a second optocoupler branch, where the charging device includes the second optocoupler branch, the second optocoupler branch is provided with a second optocoupler device, and the first optocoupler device and the second optocoupler device are different.

[0012] Optionally, the device is further configured to: when the charging device and the electrical device are in the reverse connection state, the current loop between the electrical device and the charging device is a clamped freewheeling loop, where the clamped freewheeling loop includes a diode inside the electrical device and does not include the electrical energy storage unit inside the electrical device; when the charging device and the electrical device are not in the reverse connection state, the current loop is a power supply loop, where the power supply loop includes the electrical energy storage unit and does not include the diode.

[0013] Optionally, the device is further configured to: when the electrical device cannot obtain a charging voltage from the charging device, obtain the main control output level signal, where the charging voltage represents the voltage required during the normal charging process of the electrical device; when the positive-level signal in the main control output level signal is the high-level signal and the negative-level signal is the low-level signal, control the charging device to send an application alarm message and prohibit the charging device from outputting voltage, where the application alarm message indicates that the charging bus between the charging device and the electrical device is reversely connected.

[0014] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above-mentioned device state detection method when running.

[0015] According to another aspect of the embodiments of the present application, there is provided a computer program product or a computer program, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the device state detection method as described above.

[0016] According to another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the above-mentioned device state detection method through the computer program.

[0017] In the embodiments of the present application, in response to the establishment of a connection between a charging device and an electrical device, the main control output level signals of the charging device are automatically obtained, including the positive electrode level signal and the negative electrode level signal. In the abnormal case where both the positive electrode level signal and the negative electrode level signal are high level signals, the output voltage of the charging device is automatically adjusted to a pre-set lower detection voltage (such as 30V) to safely detect the connection state of the battery interface of the electrical device and avoid device damage caused by outputting a high voltage in an uncertain connection state. When the values of the positive electrode level signal and the negative electrode level signal are different, that is, the level combination value is one high level and one low level, it is possible to directly determine whether the charging device and the electrical device are in a correct connection state based on this level combination.

[0018] Generally speaking, through the intelligent judgment and control of the charging device itself, rather than relying on additional power components added on the electrical device side, the purpose of simplifying the charging system structure and reducing the detection cost is achieved. Thus, the technical effects of reducing the device cost and improving the charging efficiency while ensuring charging safety are realized, and further the technical problem that in the related art, the forward and reverse connection detection between the electrical device and the charging device requires adding additional power components on the electrical device side, resulting in a high detection cost, is solved, and the charging safety and economy are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0020] Figure 1 is a schematic diagram of an application environment of an optional device state detection method according to the embodiments of the present application;

[0021] Figure 2 is a schematic flowchart of an optional device state detection method according to the embodiments of the present application;

[0022] Figure 3 is a schematic diagram of an optional device state detection method according to the embodiments of the present application;

[0023] Figure 4 is a schematic diagram of another optional device state detection method according to the embodiments of the present application;

[0024] Figure 5It is a schematic diagram of another optional method for detecting the device state according to an embodiment of the present application;

[0025] Figure 6 It is a schematic diagram of another optional method for detecting the device state according to an embodiment of the present application;

[0026] Figure 7 It is a schematic diagram of another optional method for detecting the device state according to an embodiment of the present application;

[0027] Figure 8 It is a schematic diagram of another optional method for detecting the device state according to an embodiment of the present application;

[0028] Figure 9 It is a schematic diagram of another optional method for detecting the device state according to an embodiment of the present application;

[0029] Figure 10 It is a schematic diagram of another optional method for detecting the device state according to an embodiment of the present application;

[0030] Figure 11 It is a schematic diagram of the structure of an optional device state detection device according to an embodiment of the present application;

[0031] Figure 12 It is a schematic diagram of the structure of an optional device state detection product according to an embodiment of the present application;

[0032] Figure 13 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. Detailed implementation manners

[0033] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0034] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0035] The following describes this application in conjunction with embodiments:

[0036] According to one aspect of the embodiments of this application, a method for detecting the device state is provided. Optionally, in this embodiment, the above-mentioned method for detecting the device state can be applied to, for example, Figure 1 the hardware environment composed of the server 101 and the terminal device 103 as shown. As Figure 1 shown, the server 101 is connected to the terminal device 103 through a network, and can be used to provide services for the terminal device or the application 107 installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 can be set up on the server or independently of the server to provide data storage services for the server 101. For example, a game data storage server. The above-mentioned network can include, but is not limited to: a wired network, a wireless network. Among them, the wired network includes: a local area network, a metropolitan area network, and a wide area network. The wireless network includes: Bluetooth, WIFI, and other networks that implement wireless communication. The terminal device 103 can be a terminal configured with an application, and can include, but is not limited to, at least one of the following: a mobile phone (such as an Android mobile phone, an iOS mobile phone, etc.), a laptop computer, a tablet computer, a handheld computer, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a mixed reality (MR) terminal, and other computer devices. The above-mentioned server can be a single server, a server cluster composed of multiple servers, or a cloud server.

[0037] Combined with Figure 1As shown, the above method for detecting the device state can be executed by an electronic device, which can be a terminal device or a server. The above method for detecting the device state can be implemented separately by the terminal device or the server, or jointly implemented by the terminal device and the server.

[0038] The above is only an example, and this embodiment does not make specific limitations.

[0039] Optionally, as an alternative implementation, as Figure 2 shown, the above method for detecting the device state includes:

[0040] S202, in response to the charging device and the electrical device establishing a connection, obtain the main control output level signal of the charging device, where the main control output level signal includes a positive electrode level signal and a negative electrode level signal;

[0041] Optionally, in the embodiments of the present application, the above positive electrode level signal and negative electrode level signal refer to the level states on the positive and negative electrodes of the charging device detected by the electrical device when the charging device is connected to the electrical device, and can be represented by different level values. For example, a high level represents 1 or presence, and a low level represents 0 or absence. This includes but is not limited to using 3.3V to represent a high level and 0V to represent a low level, or other voltage values to distinguish the two states.

[0042] It should be noted that there are various ways to obtain the main control output level signal of the above charging device, such as through a dedicated detection pin or directly monitoring the level state of the charging interface. At the same time, the logical states (such as 1 or 0) represented by the high and low levels of the positive and negative electrode level signals can also be determined according to specific designs, and the present application does not make limitations in this regard.

[0043] S204, in the case where both the positive electrode level signal and the negative electrode level signal are high level signals, adjust the output voltage of the charging device to a preset detection voltage to determine whether there is a reverse connection state between the charging device and the electrical device;

[0044] Optionally, in the embodiments of the present application, the situation where both the positive electrode level signal and the negative electrode level signal are high level signals refers to a special state where high level signals exist simultaneously on the positive and negative electrode interfaces of the charging device detected by the electrical device when the charging device is connected to the electrical device, that is, the battery management system (BMS) of the electrical device is in a closed or non-responsive state.

[0045] It should be noted that in practical applications, there can be various choices for the specific voltage value of the high-level signal, such as the common 5V, 3.3V, etc. The purpose is to determine the connection status of the charging interface through the recognition of the level. The preset detection voltage can be adjusted according to the specific requirements of the electrical device and the capabilities of the charging device, including but not limited to 30V, 12V, etc. It is mainly used to safely detect whether the interfaces of the electrical device and the charging device are reversely connected under uncertain connection states, so as to avoid damage to the device caused by the direct input of high voltage due to misoperation. This application does not make any limitations in this regard.

[0046] S206, when the positive-level signal and the negative-level signal are different, determine whether the charging device and the electrical device are in a reverse connection state according to the level combination value of the main control output level signal. Here, the level combination value means that the value of the positive-level signal is the first value, and the value of the negative-level signal is the second value, and the first value and the second value are different;

[0047] Optionally, in the embodiments of this application, when the positive-level signal and the negative-level signal are different, it refers to the situation where the positive and negative level signals detected by the electrical device are inconsistent when the charging device and the electrical device are connected. The level combination value of the main control output level signal, that is, the combination of the first value of the positive-level signal and the second value of the negative-level signal, is used to determine whether the charging device and the electrical device are correctly connected, including but not limited to high and low level combinations (such as 1 / 0 or 0 / 1).

[0048] It should be noted that the specific level states of the first value and the second value can be diversified, and the logic of level detection can also be adjusted according to actual needs. For example, it can be set that when the positive-level signal is at a high level, it is the first value, and when the negative-level signal is at a low level, it is the second value, and vice versa. The implementation of this application is not limited to specific level values or logical combinations, but rather focuses on quickly and accurately determining whether the charging interface is reversely connected through the difference in level signals, so as to take timely measures to avoid potential damage before charging. This application does not make any limitations in this regard.

[0049] S208, when the charging device and the electrical device are in a reverse connection state, control the charging device to send a target alarm message and prohibit the charging device from outputting voltage. Here, the target alarm message is used to indicate that the electrical device cannot be charged normally.

[0050] Optionally, in the embodiments of the present application, when the charging device and the electrical device are in a reverse connection state, it means that the electrical device detects that the connection method of the positive and negative interfaces of the charging device to its own interface is incorrect, that is, the positive and negative interfaces are reversed. The above-mentioned target alarm message includes but is not limited to intuitive warning methods such as sound alarm, LED flashing, and display screen prompt. At the same time, when the reverse connection state is detected, the charging device will immediately cut off the output to prevent incorrect voltage from being input into the electrical device, thereby avoiding device damage.

[0051] It should be noted that the specific form of the above-mentioned target alarm message can be designed according to different application scenarios and device characteristics. For example, for automatic charging devices such as drones or robots, remote alarms can be sent through wireless signals or specific flashing modes of LED lights, while for desktop or in-vehicle chargers, users may be directly notified through sound signals or error messages on the display screen. In addition, the control mechanism for cutting off the output voltage can also be diversified, including but not limited to directly controlling the switch of the charging output circuit through the main controller, or controlling through power components such as power MOS transistors. The implementation of the present application is not limited to a specific alarm method or voltage output control mechanism, but rather focuses more on being able to timely and effectively prevent voltage output and issue a warning when the reverse connection state is detected to ensure charging safety. The present application does not make any limitations in this regard.

[0052] In an exemplary embodiment, Figure 3 is a schematic diagram of an optional method for detecting the device state according to the embodiments of the present application. The circuit connection between the charging device and the electrical device can be as shown in Figure 3 shown. Further, use MCU_BAT_DET+ to represent the positive electrode level signal and MCU_BAT_DET- to represent the negative electrode level signal. The detection process includes but is not limited to:

[0053] S1, Connect the charging device and the electrical device;

[0054] S2, Determine whether the electrical device is powered on through MCU_BAT_DET+ and MCU_BAT_DET- of the charging device (when MCU_BAT_DET+ / - is 1 / 0 or 0 / 1, it is determined that the electrical device is powered on; when MCU_BAT_DET+ / - is 1 / 1, it is determined that the electrical device is not powered on);

[0055] S3-a, When the electrical device is powered on, determine whether there is a reverse connection state between the electrical device and the charging device according to the specific values of MCU_BAT_DET+ and MCU_BAT_DET-. Specifically:

[0056] S3-a-1, MCU_BAT_DET+ is at high level 1, MCU_BAT_DET- is at low level 0. The electrical device and the charging device are in an anti-connected state. The charging device emits an alarm prompt sound. The current flows from BAT_DET+ through the first optocoupler device U118, MCU_BAT_DET+ is 1, and MCU_BAT_DET- is 0;

[0057] S3-a-2, MCU_BAT_DET+ is 0, MCU_BAT_DET- is 1. The electrical device and the charging device are not in an anti-connected state. Control the charging device to supply power to the electrical device. BAT_DET+ passes through the second optocoupler device U117, MCU_BAT_DET+ is 0, and MCU_BAT_DET- is 1;

[0058] S4, when the electrical device is not powered on, control the target control signal MCU_CHARG_CTR to output 1, turn off the power metal-oxide-semiconductor field-effect transistor MOS26 of the charging device, and output 30V voltage (the above detection voltage). Again, obtain the current MCU_BAT_DET+ and MCU_BAT_DET-, and determine whether the electrical device and the charging device are in an anti-connected state. Specifically:

[0059] S4-b-1, when the output levels of MCU_BAT_DET+ and MCU_BAT_DET- are both at high level 1, the electrical device and the charging device are in an anti-connected state. The charging device emits an alarm prompt sound. The current flows from the signal metal-oxide-semiconductor field-effect transistor MOS28 to R17, then to BAT+, PAC+, and the D19 diode, and does not pass through the electrical energy storage unit inside the electrical device. Then it passes through PAC-, BAT-. At this time, there is no current input to BAT_DET+ / BAT_DET-, and MCU_BAT_DET+ and MCU_BAT_DET- are 1 and 1 respectively;

[0060] S4-b-2, when MCU_BAT_DET+ and MCU_BAT_DET- are 0 and 1 respectively, the electrical device and the charging device are not in an anti-connected state. Control the charging device to supply power to the electrical device. The current flows from BAT+ to PAC+, passes through the battery inside the charging device, flows to PAC-, and then from PAC- to BAT-. BAT_DET+ reaches MCU_BAT_DET+ through U117 and is 0, and MCU_BAT_DET- is 1.

[0061] S5. If it is found during actual application that the electrical device cannot be charged, then detect MCU_BAT_DET+ and MCU_BAT_DET-. If MCU_BAT_DET+ is 1 and MCU_BAT_DET- is 0, it means that the charging device recognizes that the connection of the electrical device is incorrect, and further troubleshoot.

[0062] Through the embodiments of the present application, in response to the establishment of a connection between the charging device and the electrical device, the main control output level signals of the charging device are automatically obtained, including the positive electrode level signal and the negative electrode level signal. In the abnormal situation where both the positive electrode level signal and the negative electrode level signal are high level signals, the output voltage of the charging device is automatically adjusted to a pre-set lower detection voltage (such as 30V), so as to safely detect the connection state of the battery interface of the electrical device and avoid damage to the device caused by outputting a high voltage in an uncertain connection state. When the values of the positive electrode level signal and the negative electrode level signal are different, that is, the level combination value is one high level and one low level, it is possible to directly determine whether the charging device and the electrical device are in the correct connection state according to this level combination.

[0063] Generally speaking, through the intelligent judgment and control of the charging device itself, rather than relying on additional power components added at the electrical device end, the purpose of simplifying the charging system structure and reducing the detection cost is achieved, thereby realizing the technical effects of reducing the device cost and improving the charging efficiency while ensuring charging safety, and further solving the technical problem in the related art that the positive and negative connection detection between the electrical device and the charging device requires adding additional power components at the electrical device end, resulting in high detection cost, and significantly improving its charging safety and economy.

[0064] As an optional solution, in the case where the positive electrode level signal and the negative electrode level signal are different, determining whether the charging device and the electrical device are in the reverse connection state according to the level combination value of the main control output level signal includes: when the positive electrode level signal is a low level signal and the negative electrode level signal is the high level signal, adjusting the output voltage of the charging device to the charging voltage, where the charging voltage represents the voltage required during the normal charging process of the electrical device, the first value is 0, and the second value is 1; when the positive electrode level signal is the high level signal and the negative electrode level signal is the low level signal, determining that the charging device and the electrical device are in the reverse connection state, where the first value is 1 and the second value is 0.

[0065] Optionally, in the embodiments of the present application, when the positive electrode level signal and the negative electrode level signal are different, it refers to the state where the positive and negative electrode level signals detected when the charging device establishes a connection with the electrical device are inconsistent. Determining the reverse connection state between the charging device and the electrical device according to the level combination value of the main control output level signal involves judging whether there is a reverse connection based on the first value (0) of the positive electrode level signal and the second value (1) of the negative electrode level signal, or vice versa (the first value is 1 and the second value is 0), including but not limited to using the level combination of 0 / 1 to intelligently judge the connection method of the charging interface.

[0066] It should be noted that in practical applications, the specific voltage values of the low-level signal and the high-level signal can be diverse, and the setting of the charging voltage will also vary according to different electrical devices and charging requirements, including but not limited to 12V, 24V, 48V, etc. The present application does not make any limitations in this regard.

[0067] In an exemplary embodiment, assume the charging process of a drone. When the drone is connected to the charging device, the charging device detects that the positive electrode level signal of the electrical device is a low level (0) and the negative electrode level signal is a high level (1). Then, the main controller determines that the interface connection is correct based on this level combination value, and immediately adjusts the output voltage of the charging device to the charging voltage required by the drone, such as 48V, to allow normal charging. On the contrary, if it is detected that the positive electrode level signal is a high level (1) and the negative electrode level signal is a low level (0), it is determined that the interface is reversely connected. The charging device will immediately cut off the output and simultaneously send a target alarm message to remind the user or the system that the interface is connected reversely, so as to avoid potential damage caused by subsequent charging operations.

[0068] Through the embodiments of the present application, by adopting an intelligent level detection and response mechanism, the technical effect of accurately judging the front and back of the interface when establishing a connection between the electrical device and the charging device is achieved, and the purpose of improving the charging efficiency and user experience while ensuring charging safety is achieved. It avoids the complexity and high cost of the need for additional power components in the traditional solution, making the reverse connection detection simpler and more reliable, and applicable to various automatic charging scenarios, such as the fast and safe charging of drones, robots, etc.

[0069] As an alternative solution, when both the above-mentioned positive-level signal and the above-mentioned negative-level signal are high-level signals, adjusting the output voltage of the above-mentioned charging device to a preset detection voltage to determine whether there is a reverse connection state between the above-mentioned charging device and the above-mentioned electrical device includes: when both the above-mentioned positive-level signal and the above-mentioned negative-level signal are high-level signals, adjusting the output voltage of the above-mentioned charging device to a preset detection voltage, and re-obtaining the above-mentioned main control output level signal; obtaining the updated positive-level signal and the updated negative-level signal in the above-mentioned main control output level signal; when the above-mentioned updated positive-level signal is a low-level signal and the above-mentioned updated negative-level signal is the above-mentioned high-level signal, adjusting the output voltage of the above-mentioned charging device to a charging voltage, where the above-mentioned charging voltage represents the voltage required during the normal charging process of the above-mentioned electrical device; when both the above-mentioned updated positive-level signal and the above-mentioned updated negative-level signal are the above-mentioned high-level signals, determining that there is the above-mentioned reverse connection state between the above-mentioned charging device and the above-mentioned electrical device.

[0070] Optionally, in the embodiments of the present application, when both the positive-level signal and the negative-level signal are high-level signals, it refers to the interface level state detected by the charging device when the battery management system of the electrical device is in the off or unresponsive state. Adjusting the output voltage of the charging device to a preset detection voltage is to safely perform a further forward / reverse connection state judgment under an uncertain interface state (i.e., interface detection in the BMS off state). Re-obtaining the main control output level signal, that is, after adjusting the output voltage, detecting the interface level state again to verify the actual situation of the interface forward / reverse connection.

[0071] It should be noted that in practical applications, the specific value of the detection voltage can be diversified. For example, it can be 12V, 24V, etc., and its setting should be within the safe voltage range that will not cause damage to the electrical device. The acquisition of the updated positive-level signal and the updated negative-level signal can be achieved through a dedicated detection circuit, or through software logic by the microprocessor inside the charging device. The setting of the charging voltage will vary according to different electrical devices and charging requirements, and can be 12V, 24V, 48V, etc., and the present application does not limit this.

[0072] In an exemplary embodiment, it is assumed that before a drone is charged, its battery management system is in a closed state. When the charging device is connected to the drone and it is detected that both the positive and negative pole level signals are high-level, the charging device will automatically adjust the output voltage to a pre-set safety detection voltage, such as 12V, and detect the interface level status again. If the updated positive pole level signal is low-level (0) and the negative pole level signal is high-level (1), it indicates that the interface is correctly connected. The charging device then adjusts the output voltage to the charging voltage required by the drone, such as 48V, and allows normal charging to start. On the contrary, if the updated positive and negative pole level signals are still both high-level, it is determined that the interface is reversely connected. The charging device will immediately cut off the output and send a target alarm message to remind the user or the automatic system to take measures to avoid possible charging accidents.

[0073] Through the embodiment of the present application, by adopting the intelligent mechanism of adjusting the detection voltage and detecting the level signal again, the technical effect of accurately judging the reverse connection state of the interface in the case where the battery management system of the electrical device does not respond or is in a closed state is achieved, and the purpose of ensuring the smooth progress of the charging process while guaranteeing the safety of the electrical device and the charging device is achieved.

[0074] As an optional solution, the above method further includes: in the case where both the above positive pole level signal and the above negative pole level signal are the above high-level signals, controlling the signal metal-oxide-semiconductor field-effect transistor in the above charging device to receive a target control signal with a value of 1, so that the power metal-oxide-semiconductor field-effect transistor on the first branch stops working, where the above first branch is the main branch for the above charging device to output the above charging voltage; controlling the above charging device to output the above detection voltage through the second branch and determining the above updated main control output level signal, where the above second branch is not provided with the power metal-oxide-semiconductor field-effect transistor, and the above first branch and the above second branch work alternately.

[0075] Optionally, in the embodiment of the present application, in the case where both the positive pole level signal and the negative pole level signal are high-level signals, it refers to the interface level status detected by the charging device when the battery management system of the electrical device is in a closed or unresponsive state. The signal metal-oxide-semiconductor field-effect transistor (signal MOS) is used to receive the target control signal to make the above power metal-oxide-semiconductor field-effect transistor conduct or cut off. The power metal-oxide-semiconductor field-effect transistor on the first branch refers to the power MOS on the main charging branch for controlling current and voltage. The reception of the control signal 1 makes the power MOS stop working, that is, cuts off the main charging branch, including but not limited to implementing this operation through a microprocessor or a control circuit.

[0076] It should be noted that in practical applications, the specific types and parameters of the signal MOS and the power MOS can be selected according to the specific circuit design and working conditions. The output of the detection voltage can be achieved through the second branch, and there are also various possibilities for the construction and control methods of the second branch, including but not limited to using diodes, resistors, or other switching elements for construction, which are not limited in this application. The alternating working mode of the first branch and the second branch can be controlled by the main controller of the charging device through a preset logic or program to ensure that the charging device does not output dangerous voltage or current to the electrical device during the reverse connection state detection.

[0077] In an exemplary embodiment, when the charging device attempts to connect to a drone in the BMS off state, it is detected that the positive and negative electrode voltages of the interface are both high levels. At this time, the main controller in the charging device sends the target control signal 1 to the signal MOS to control its conduction, and at the same time stops the power MOS on the first branch from working, cutting off the output of the main charging branch. Meanwhile, the charging device outputs a preset detection voltage, such as 12V, through the second branch without a deployed power MOS, and detects the level state of the interface again. If the updated level state shows a low positive level and a high negative level, it is determined that the interface is correctly connected, and then the first branch resumes work to output the normal charging voltage; if the updated level state is still a high level for both the positive and negative electrodes, it is determined as the reverse connection state, and the charging device immediately stops the voltage output and issues an alarm.

[0078] Through the embodiments of this application, by adopting the control of the signal MOS and the power MOS and the detection voltage output mechanism of the second branch, the technical effect of accurately detecting the reverse connection state of the charging interface when the battery management system of the electrical device does not respond is achieved, and the purpose of intelligently identifying and processing the interface connection problem in the automatic charging process while ensuring safety is achieved. It effectively avoids high-power output in an uncertain state, reduces the damage risk of the electrical device and the charging device, is applicable to various automatic charging scenarios including drones and robots, and improves the safety and reliability of the charging operation.

[0079] As an alternative solution, the above method further includes: when the above updated positive electrode level signal is the above low level signal and the above updated negative electrode level signal is the above high level signal, controlling the above signal metal-oxide-semiconductor field-effect transistor to receive the above target control signal with a value of 0, so that the above power metal-oxide-semiconductor field-effect transistor starts to work; controlling the above charging device to output a charging voltage, where the above charging voltage represents the voltage required during the normal charging process of the above electrical device.

[0080] In an exemplary embodiment, when the charging device is connected to a robot, the initially detected positive and negative pole level signals are both high levels, indicating that the BMS system of the robot battery may be in a closed state. The charging device then outputs a detection voltage and detects the interface level state again. If the updated positive pole level signal is low and the negative pole level signal is high, it is determined that the interface connection is correct. At this time, the main controller of the charging device sends a target control signal with a value of 0 to the signal MOS to cut it off, while the power MOS starts to work and turns on the first branch. Subsequently, the charging device outputs a corresponding charging voltage (such as 24V) according to the charging requirements of the robot and starts the normal charging process to ensure safe and effective charging of the battery.

[0081] Through the embodiment of the present application, by adopting the state control of the signal MOS and the start-stop mechanism of the power MOS, the technical effect of confirming the interface connection state through the detection voltage output and the level signal feedback is achieved in the case where the battery management system of the electrical device does not respond, and the purpose of intelligently adjusting the output of the charging device while ensuring charging safety is achieved, so that the electrical device can start normal charging, effectively improving the safety and intelligence level of charging and avoiding equipment damage caused by incorrect interface connection.

[0082] As an alternative solution, the above method further includes: when the charging device and the electrical device are in the reverse connection state, determining the positive pole level signal and the negative pole level signal through the first optocoupler branch, where the charging device includes the first optocoupler branch and the first optocoupler device is deployed on the first optocoupler branch; when the charging device and the electrical device are not in the reverse connection state, determining the negative pole level signal through the first optocoupler branch and determining the positive pole level signal through the second optocoupler branch, where the charging device includes the second optocoupler branch and the second optocoupler device is deployed on the second optocoupler branch, and the first optocoupler device and the second optocoupler device are different.

[0083] Optionally, in the embodiments of the present application, when the charging device and the electrical device are in a reverse connection state, determining the positive-level signal and the negative-level signal through the first optocoupler branch means that when the interface between the electrical device and the charging device is reversely connected, the charging device uses the built-in first optocoupler branch to detect the level state of the interface, ensuring that even in the reverse connection state, the correct level information can be obtained. The first optocoupler branch is deployed with a first optocoupler device, which may include, but is not limited to, an opto-coupler, for isolating and transmitting the level signal of the electrical device interface to the control circuit of the charging device. When the charging device and the electrical device are not in a reverse connection state, the negative-level signal is determined through the first optocoupler branch, and the positive-level signal is determined through the second optocoupler branch. The second optocoupler branch is deployed with a second optocoupler device, and the first optocoupler device and the second optocoupler device are different. They can be opto-couplers of different types or parameters, for detecting the positive and negative level signals respectively in the normal connection state.

[0084] It should be noted that in actual applications, the specific construction and working logic of the first optocoupler branch and the second optocoupler branch can be diversified, including but not limited to using signal sources with different frequencies, adopting different circuit designs, or distinguishing the signals received by the optocoupler devices through software algorithms. The charging device may include multiple optocoupler devices to adapt to different electrical device interface standards and charging scenario requirements, which are not limited in this application.

[0085] In an exemplary embodiment, assume that a charging station is attempting to charge a robot, and during the connection process, the interface between the robot and the charging station is reversely connected. At this time, the main control system of the charging station will use the first optocoupler branch, that is, the branch deployed with a specific first optocoupler device, to detect the level signals of both the positive and negative poles simultaneously to confirm the reverse connection state. If the charging station detects that the interface is not reversely connected, that is, it is in a normal connection, it will switch the working mode, only detect the negative-level signal through the first optocoupler branch, and at the same time enable the second optocoupler branch to detect the positive-level signal. The second optocoupler branch is deployed with a second optocoupler device different from the first optocoupler device to ensure accurate signal identification and processing. In this way, the charging station can be unaffected by the reverse connection of the interface and always obtain accurate level signal information for subsequent charging control.

[0086] Through the embodiments of the present application, by the flexible cooperation of the first optocoupler branch and the second optocoupler branch, the technical effect of accurate level signal detection in the forward and reverse connection states of the electrical device interface is achieved, and the purpose of intelligent judgment and processing of the charging process in any connection state is achieved.

[0087] As an alternative solution, the above method further includes: when the charging device and the electrical device are in the reverse connection state, the current loop between the electrical device and the charging device is a clamped freewheeling loop, where the clamped freewheeling loop includes a diode inside the electrical device and does not include the electrical energy storage unit inside the electrical device; when the charging device and the electrical device are not in the reverse connection state, the current loop is a power supply loop, where the power supply loop includes the electrical energy storage unit and does not include the diode.

[0088] Optionally, in the embodiments of the present application, the reverse connection state between the charging device and the electrical device refers to the situation where the interface of the electrical device and the charging device is wrongly connected, resulting in the reversal of the positive and negative positions. The clamped freewheeling loop means that in the reverse connection state, the diode inside the electrical device will conduct forward, forming a current loop that does not include the electrical energy storage unit in the electrical device, such as a battery, but provides freewheeling and clamping functions through the diode to ensure that the electrical device will not be damaged when reversely connected. The power supply loop refers to the situation where when the positive and negative poles are correctly connected, the electrical energy storage unit inside the electrical device participates in the operation, forming the current loop required for normal charging, and at this time the diode does not participate in this loop.

[0089] In an exemplary embodiment, assume that before charging, the interface of a drone and a charging station is reversely connected, that is, the positive pole of the charging station is wrongly connected to the negative pole of the drone, and the negative pole of the charging station is wrongly connected to the positive pole of the drone. At this time, the diode inside the drone will conduct forward, forming a clamped freewheeling loop to ensure that even in the reverse connection state, no current will directly pass through the battery, avoiding battery damage or safety risks. On the contrary, if the interface of the drone and the charging station is correctly connected, that is, the positive and negative poles are aligned, at this time the diode will not participate in the operation, and the current of the charging station will directly pass through the electrical energy storage unit inside the drone, forming a power supply loop to start the normal charging process, ensuring that the battery can be charged efficiently and safely.

[0090] Through the embodiments of the present application, by adopting the strategy of forming a clamped freewheeling loop with the diode inside the electrical device and forming a power supply loop with the electrical energy storage unit in the correct connection state, the technical effect of ensuring that the electrical device will not be damaged due to wrong connection regardless of the forward or reverse connection state between the charging device and the electrical device is achieved, and the purpose of intelligently protecting the electrical device, preventing charging accidents, and ensuring charging safety and the service life of the device in various connection situations is achieved.

[0091] As an alternative solution, the above method further includes: when the above electrical device fails to obtain a charging voltage from the above charging device, obtaining the above main control output level signal, where the above charging voltage represents the voltage required during the normal charging process of the above electrical device; when the above positive-level signal in the above main control output level signal is the above high-level signal and the above negative-level signal is the low-level signal, controlling the above charging device to send an application alarm message and prohibiting the above charging device from outputting voltage, where the above application alarm message indicates that the charging bus between the above charging device and the above electrical device is reversely connected.

[0092] Optionally, in the embodiments of the present application, the situation where the electrical device fails to obtain a charging voltage from the charging device means that after the electrical device is connected to the charging device, the expected charging voltage input fails to be detected, which may be caused by various reasons such as reverse connection of the interface, charging device failure, and internal circuit problems of the electrical device. The main control output level signal refers to the level signal output by the main controller of the electrical device, which reflects the positive and negative pole states of the charging interface, including but not limited to the signals detected through components such as diodes and optocouplers. The situation where the positive-level signal is the high-level signal and the negative-level signal is the low-level signal indicates that the detection circuit of the electrical device is working properly and the positive and negative poles of the interface are correctly connected, but the voltage cannot be obtained from the charging device. Therefore, it is necessary to trigger an alarm mechanism to prevent potential device damage.

[0093] It should be noted that in actual applications, the specific value of the charging voltage may vary depending on the type of electrical device and the charging requirements, and the present application does not limit this. The detection and judgment logic of the main control output level signal can be implemented by the microprocessor of the electrical device through a preset program or algorithm. The sending of the application alarm message can be in the form of sound and light alarm, wireless signal transmission, etc., to remind the user or the automatic control system to pay attention to the abnormal state of the charging interface and take timely measures to avoid possible device damage.

[0094] In an exemplary embodiment, assume that a drone fails to detect the voltage input from a charging station due to an operation error or equipment failure when attempting to obtain a charging voltage. At this time, the main controller of the drone will detect the level signal of the charging interface. If the detected positive-level signal is high (e.g., 5V) and the negative-level signal is low (e.g., 0V), it indicates that the positive and negative poles of the charging interface of the drone are correctly connected, but the voltage cannot be obtained from the charging station. In this case, the drone will send an application alarm message to the charging station, indicating that the charging bus between the charging station and the drone may be reversed. At the same time, the main controller of the drone will prohibit the charging station from continuing to output voltage to prevent charging under unclear interface conditions and avoid potential safety risks. Once the alarm message is received, the charging station will stop voltage output and send an alarm prompt to the user or the automatic control system, requesting to check and confirm the connection status of the charging interface.

[0095] Through the embodiments of the present application, by adopting the detection mechanism of the main control output level signal and the sending strategy of the application alarm message, the technical effect of intelligently judging the connection status of the charging interface when an electrical device fails to obtain a charging voltage from a charging device is achieved, and the purpose of actively alarming and preventing unsafe charging behaviors in case of interface abnormalities to ensure the safety of the electrical device and the charging device is achieved.

[0096] In an exemplary embodiment, a method with battery charging reverse connection prevention is implemented, which includes two modules: a charging device and an electrical device. It is mainly applied to the automatic charging scenarios of related products such as drones and robots.

[0097] It should be noted that with the popularization of current robots, drones, and various charging devices, charging safety accidents of batteries occur frequently, and charging safety is particularly important; during the production process, due to process production and quality inspection negligence, wire connection errors often occur, such as reverse connection of the charging wire, and the consequence is accidents during function detection, resulting in equipment damage; during the use of equipment, many devices with lithium batteries, such as robots and drones, may have reverse connection situations during charging, and the final result is equipment damage and significant losses.

[0098] To solve the above problems, in the prior art, rectifying diodes or MOS reverse connection prevention are often added at the device end, but in high-power charging devices, the temperature rise and heat generation of the devices, installation space, and cost all need to be considered additionally. And the embodiments of the present application implement a simple reverse connection prevention circuit, which has low cost, is safe, and has no heat generation hidden danger.

[0099] Exemplarily, Figure 4 is a schematic diagram of another optional device state detection method according to the embodiments of the present application, and the charging device and the charging power control part are as Figure 4 shown.

[0100] Exemplarily, Figure 5 is a schematic diagram of another optional method for detecting the device state according to an embodiment of the present application. The charging device detects the electrical device forward and reverse connection detection module as Figure 5 shown.

[0101] Exemplarily, Figure 6 is a schematic diagram of another optional method for detecting the device state according to an embodiment of the present application. The electrical device reverse connection clamping and freewheeling module as Figure 6 shown.

[0102] Exemplarily, Figure 7 is a schematic diagram of another optional method for detecting the device state according to an embodiment of the present application. As Figure 7 shown, including but not limited to:

[0103] When the charging device is connected to the electrical device and the battery BMS of the electrical device is turned on, that is, when the electrical device is powered on: At this time, the electrical device is connected to the charging device, and the forward and reverse connection detection module starts to work. When the positive level signal MCU_BAT_DET+ and the negative level signal MCU_BAT_DET- are 0 and 1 respectively, the charging device recognizes that the electrical device is correctly connected, will establish communication with the electrical device, and charge according to requirements. When MCU_BAT_DET+ and MCU_BAT_DET- are 1 and 0 respectively, the charging device recognizes that the electrical device is incorrectly connected, and the charging device alarms to prompt reverse connection. When the battery BMS of the electrical device is turned off, that is, when the electrical device is not powered on: MCU_BAT_DET+ and MCU_BAT_DET- are 1 and 1 respectively. Since the battery of the electrical device is not powered on at this time, it is necessary to further determine whether there is a reverse connection.

[0104] Further, MCU_CHARG_CTR outputs 1, and the power MOS of the charging device turns off the charger output of 30V voltage for a secondary judgment. When MCU_BAT_DET+ and MCU_BAT_DET- are 0 and 1 respectively, the charging device recognizes that the electrical device is correctly connected, and the charging device sets MCU_CHARG_CTR to output 0, will establish communication with the electrical device, and charge according to requirements.

[0105] On the one hand, when MCU_BAT_DET+ and MCU_BAT_DET- are 1 and 0 respectively, the clamping and freewheeling diode of the electrical device conducts forward, providing a loop. The charging device recognizes that the electrical device is incorrectly connected, and the charging device alarms to prompt reverse connection.

[0106] On the other hand, when the charging device and the charging bus are connected reversely, the clamping freewheeling diode of the battery device conducts forward, providing a loop. MCU_BAT_DET+ and MCU_BAT_DET- are 1 and 0 respectively. The charging device recognizes that the electrical device is connected incorrectly and gives an alarm prompt for reverse connection, thus protecting the charging device and the electrical device.

[0107] Through the embodiments of the present application, when the charging port of the electrical device is electrified (that is, the battery management system BMS of the battery can control the charging and discharging process of the battery, including starting and stopping charging, and adjusting the charging current and voltage to turn on), Figure 8 It is a schematic diagram of another optional method for detecting the device state according to the embodiments of the present application. The simplified schematic diagrams of the electrical device and the charging device are as Figure 8 shown, automatically judge whether the charging interface of the charging device and the charging interface of the electrical device are reversely connected, and according to the required charging function; when the charging port of the electrical device is not electrified (that is, the battery BMS is turned off), Figure 9 It is a schematic diagram of another optional method for detecting the device state according to the embodiments of the present application. The simplified schematic diagrams of the electrical device and the charging device are as Figure 9 shown, automatically judge whether the charging interface of the charging device and the charging interface of the electrical device are reversely connected, and wake up the BMS system of the electrical device, according to the required charging function; when the charging line of the charging device is reversely connected (when charging the device, the positive and negative poles of the charging line are not correctly matched with the charging interface of the device, that is, the positive pole (+) is connected to the position where the negative pole (-) should be connected, or the negative pole (-) is connected to the position where the positive pole (+) should be connected)), Figure 10 It is a schematic diagram of another optional method for detecting the device state according to the embodiments of the present application. The simplified schematic diagrams of the electrical device and the charging device are as Figure 10 shown, the electrical device will not be damaged when charging, the detection cost required for reverse connection detection is lower, more reliable, can support high-power charging, there are no power devices in the bus part, and there is no heat dissipation risk. In automatic charging devices such as drones or robots, in complex application scenarios, it is safer and more reliable.

[0108] It can be understood that in the specific implementation manners of the present application, data related to user information, etc. are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0109] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0110] According to another aspect of the embodiments of the present application, there is also provided a device state detection device for implementing the above-mentioned device state detection method. As Figure 11 shown, the device includes:

[0111] An acquisition module 1102, configured to acquire the main control output level signal of the charging device in response to the establishment of a connection between the charging device and the electrical device, where the main control output level signal includes a positive level signal and a negative level signal;

[0112] A first determination module 1104, configured to adjust the output voltage of the charging device to a preset detection voltage when both the positive level signal and the negative level signal are high level signals, so as to determine whether the charging device and the electrical device are in a reverse connection state;

[0113] A second determination module 1106, configured to determine whether the charging device and the electrical device are in a reverse connection state according to the level combination value of the main control output level signal when the positive level signal and the negative level signal are different, where the level combination value means that the value of the positive level signal is a first value and the value of the negative level signal is a second value, and the first value and the second value are different;

[0114] A processing module 808, configured to control the charging device to send a target alarm message and prohibit the charging device from outputting voltage when the charging device and the electrical device are in a reverse connection state, where the target alarm message is used to indicate that the electrical device cannot be charged normally.

[0115] As an optional solution, the above device is used to determine whether the charging device and the electrical device are in a reverse connection state according to the level combination value of the main control output level signal when the positive level signal and the negative level signal are different in the following manner: when the positive level signal is a low level signal and the negative level signal is a high level signal, adjust the output voltage of the charging device to the charging voltage, where the charging voltage represents the voltage required during the normal charging process of the electrical device, the first value is 0, and the second value is 1; when the positive level signal is a high level signal and the negative level signal is a low level signal, determine that the charging device and the electrical device are in a reverse connection state, where the first value is 1 and the second value is 0.

[0116] As an alternative solution, the above device is used to adjust the output voltage of the charging device to a preset detection voltage when both the positive-level signal and the negative-level signal are high-level signals, so as to determine whether there is a reverse connection state between the charging device and the electrical device: when both the positive-level signal and the negative-level signal are high-level signals, adjust the output voltage of the charging device to the preset detection voltage, and re-obtain the main control output level signal; obtain the updated positive-level signal and the updated negative-level signal in the main control output level signal; when the updated positive-level signal is a low-level signal and the updated negative-level signal is a high-level signal, adjust the output voltage of the charging device to the charging voltage, where the charging voltage represents the voltage required during the normal charging process of the electrical device; when both the updated positive-level signal and the updated negative-level signal are high-level signals, determine that there is a reverse connection state between the charging device and the electrical device.

[0117] As an alternative solution, the above device is further used to: when both the positive-level signal and the negative-level signal are high-level signals, control the signal metal-oxide-semiconductor field-effect transistor in the charging device to receive a target control signal with a value of 1, so that the power metal-oxide-semiconductor field-effect transistor on the first branch stops working, where the first branch is the main branch for the charging device to output the charging voltage; control the charging device to output the detection voltage through the second branch, determine the updated main control output level signal, where the second branch is not equipped with a power metal-oxide-semiconductor field-effect transistor, and the first branch and the second branch work alternately.

[0118] As an alternative solution, the above device is further used to: when the updated positive-level signal is a low-level signal and the updated negative-level signal is a high-level signal, control the signal metal-oxide-semiconductor field-effect transistor to receive a target control signal with a value of 0, so that the power metal-oxide-semiconductor field-effect transistor starts to work; control the charging device to output the charging voltage, where the charging voltage represents the voltage required during the normal charging process of the electrical device.

[0119] As an alternative solution, the above device is further used to: when there is a reverse connection state between the charging device and the electrical device, determine the positive-level signal and the negative-level signal through the first optocoupler branch, where the charging device includes the first optocoupler branch, and the first optocoupler branch is equipped with a first optocoupler device; when there is no reverse connection state between the charging device and the electrical device, determine the negative-level signal through the first optocoupler branch and determine the positive-level signal through the second optocoupler branch, where the charging device includes the second optocoupler branch, the second optocoupler branch is equipped with a second optocoupler device, and the first optocoupler device and the second optocoupler device are different.

[0120] As an alternative solution, the above device is further configured to: when the charging device and the electrical device are in a reverse connection state, the current loop between the electrical device and the charging device is a clamped freewheeling loop, where the clamped freewheeling loop includes a diode inside the electrical device and does not include the electrical energy storage unit inside the electrical device; when the charging device and the electrical device are not in a reverse connection state, the current loop is a power supply loop, where the power supply loop includes the electrical energy storage unit and does not include the diode.

[0121] As an alternative solution, the above device is further configured to: when the electrical device cannot obtain a charging voltage from the charging device, obtain a main control output level signal, where the charging voltage represents the voltage required during the normal charging process of the electrical device; when the positive level signal in the main control output level signal is a high level signal and the negative level signal is a low level signal, control the charging device to send an application alarm message and prohibit the charging device from outputting voltage, where the application alarm message indicates that the charging bus between the charging device and the electrical device is reversely connected.

[0122] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the function of the module or unit.

[0123] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0124] According to one aspect of the present application, a computer program product is provided, and the computer program product includes a computer program.

[0125] The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages and disadvantages of the embodiments.

[0126] Figure 12 The computer system architecture block diagram of the electronic device for implementing the embodiments of the present application is schematically shown.

[0127] It should be noted that Figure 12 The computer system 1200 of the electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.

[0128] Such as Figure 12As shown, the computer system 1200 includes a central processing unit 1201 (CPU), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1202 (ROM) or a program loaded from a storage section 1208 into a random access memory 1203 (RAM). In the random access memory 1203, various programs and data required for system operation are also stored. The central processing unit 1201, the read-only memory 1202, and the random access memory 1203 are connected to each other via a bus 1204. An input / output interface 1205 (Input / Output interface, i.e., I / O interface) is also connected to the bus 1204.

[0129] The following components are connected to the input / output interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a local area network card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the input / output interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed so that a computer program read from it can be installed into the storage section 1208 as needed.

[0130] In particular, according to an embodiment of the present application, the processes described in each method flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from the removable medium 1211. When the computer program is executed by the central processing unit 1201, various functions defined in the system of the present application are executed.

[0131] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from the removable medium 1211. When the computer program is executed by the central processing unit 1201, various functions provided by the embodiment of the present application are executed.

[0132] According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above-mentioned method for detecting device status. The electronic device may be Figure 1 the terminal device or server shown. In this embodiment, the electronic device is taken as an example of the terminal device for illustration. As Figure 13 shown, the electronic device includes a memory 1302 and a processor 1304. A computer program is stored in the memory 1302, and the processor 1304 is configured to execute the steps in any of the above method embodiments through the computer program.

[0133] Optionally, in this embodiment, the above-mentioned electronic device may be at least one network device among multiple network devices in a computer network.

[0134] Optionally, in this embodiment, the above-mentioned processor may be configured to execute the methods in the embodiments of the present application through a computer program.

[0135] Optionally, those of ordinary skill in the art can understand that Figure 13 the structure shown is only schematic, Figure 13 and it does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, etc.) than those shown in Figure 13 , or have a different configuration from that shown in Figure 13 .

[0136] Among them, the memory 1302 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for detecting device status in the embodiments of the present application. The processor 1304 executes various functional applications and data processing by running the software programs and modules stored in the memory 1302, that is, implements the above-mentioned method for detecting device status. The memory 1302 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 1302 may further include a memory remotely set relative to the processor 1304, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and their combinations. Among them, the memory 1302 may specifically but not limitedly be used to store information such as target alarm messages. As an example, as Figure 13 shown, the above-mentioned memory 1302 may include but are not limited to the acquisition module 1102, the first determination module 1104, the second determination module 1106, and the processing module 11011 in the above-mentioned device status detection device. In addition, it may further include but are not limited to other module units in the above-mentioned device status detection device, which will not be elaborated in this example.

[0137] Optionally, the above-mentioned transmission device 1306 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1306 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable, so as to communicate with the Internet or a local area network. In one example, the transmission device 1306 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0138] In addition, the above-mentioned electronic device further includes: a display 13011, which is used to display the above-mentioned target alarm message; and a connection bus 1313, which is used to connect each module component in the above-mentioned electronic device.

[0139] In other embodiments, the above-mentioned terminal device or server may be a node in a distributed system. Among them, the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes can form a peer-to-peer network, and any form of computing device, such as an electronic device such as a server or a terminal, can become a node in the blockchain system by joining the peer-to-peer network.

[0140] According to one aspect of the present application, there is provided a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the device state detection method provided in various optional implementation manners of the above-mentioned device state detection.

[0141] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be set to store the methods for executing the embodiments of the present application.

[0142] Optionally, in this embodiment, those of ordinary skill in the art can understand that all or part of the steps in the above-mentioned various methods can be completed by instructing the relevant hardware of the terminal device through a program, and the program can be stored in a computer-readable storage medium. The storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disc, etc.

[0143] The serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0144] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage media. Based on such understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing one or more electronic devices to execute all or part of the steps of the methods described in the various embodiments of this application.

[0145] In the above embodiments of this application, the descriptions of the various embodiments each have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0146] In the several embodiments provided by this application, it should be understood that the disclosed application program can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the units or modules can be in electrical or other forms.

[0147] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, the functional units in the various embodiments of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0149] The above are only the preferred embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of this application.

Claims

1. A method for detecting a device status, characterized in that: include: In response to the charging device and the electrical device establishing a connection, obtaining a main control output level signal of the charging device, wherein the main control output level signal includes a positive level signal and a negative level signal; When both the positive level signal and the negative level signal are high level signals, the output voltage of the charging device is adjusted to a preset detection voltage to determine whether the charging device and the electrical device are in a reverse connection state; In the case where the positive level signal and the negative level signal are different, determining whether the charging device and the electrical device are in the reverse connection state according to the level combination value of the master control output level signal, wherein the level combination value indicates that the value of the positive level signal is a first value, and the value of the negative level signal is a second value, and the first value and the second value are different; When the charging device and the electrical device are in the reverse connection state, controlling the charging device to issue a target alarm message and prohibiting the charging device from outputting a voltage, wherein the target alarm message is used to indicate that the electrical device cannot be charged normally; The method also includes: when the positive level signal is the high level signal and the negative level signal is the low level signal, determining that the charging device and the electrical device are in the reverse connection state, wherein the first value is 1 and the second value is 0; when both the positive level signal and the negative level signal are the high level signals, adjusting the output voltage of the charging device to a preset detection voltage and reacquiring the main control output level signal; acquiring an updated positive level signal and an updated negative level signal in the main control output level signal; and when both the updated positive level signal and the updated negative level signal are the high level signals, determining that the charging device and the electrical device are in the reverse connection state.

2. The method according to claim 1, characterized in that In the case where the positive electrode level signal and the negative electrode level signal are different, determining whether the charging device and the electrical device are in the reverse connection state according to the level combination value of the main control output level signal includes: When the positive level signal is the low level signal and the negative level signal is the high level signal, the output voltage of the charging device is adjusted to a charging voltage, wherein the charging voltage represents the voltage required for the normal charging process of the electrical device, the first value is 0, and the second value is 1.

3. The method according to claim 1, characterized in that When both the positive level signal and the negative level signal are high level signals, adjusting the output voltage of the charging device to a preset detection voltage to determine whether the charging device and the electrical device are in a reverse connection state comprises: When the updated positive level signal is the low level signal and the updated negative level signal is the high level signal, the output voltage of the charging device is adjusted to a charging voltage, wherein the charging voltage represents a voltage required during normal charging of the electrical device.

4. The method according to claim 3, characterized in that The method further comprises: When both the positive electrode level signal and the negative electrode level signal are the high level signals, controlling the signal metal oxide semiconductor field effect transistor in the charging device to receive a target control signal with a value of 1, so that the power metal oxide semiconductor field effect transistor on the first branch stops working, wherein the first branch is a main branch for the charging device to output the charging voltage; The charging device is controlled to output the detection voltage through a second branch, and the update main control output level signal is determined, wherein the power metal oxide semiconductor field effect transistor is not deployed in the second branch, and the first branch and the second branch work alternately.

5. The method according to claim 4, characterized in that The method further comprises: When the updated positive electrode level signal is the low level signal and the updated negative electrode level signal is the high level signal, controlling the signal metal oxide semiconductor field effect transistor in the charging device to receive the target control signal with a value of 0, so that the power metal oxide semiconductor field effect transistor on the first branch starts to work; The charging device is controlled to output a charging voltage, wherein the charging voltage represents a voltage required during normal charging of the electrical device.

6. The method according to claim 1, characterized in that The method further comprises: In the case where the charging device and the electrical device are in the reverse connection state, the positive electrode level signal and the negative electrode level signal are determined by a first optocoupler branch, wherein the charging device includes the first optocoupler branch, and the first optocoupler branch is equipped with a first optocoupler device; When the charging device and the electrical device are not in the reverse connection state, the negative electrode level signal is determined by the first optocoupler branch, and the positive electrode level signal is determined by the second optocoupler branch, wherein the charging device includes the second optocoupler branch, the second optocoupler branch is disposed with a second optocoupler device, and the first optocoupler device and the second optocoupler device are different.

7. The method according to claim 1, characterized in that The method further comprises: When the charging device and the electrical device are in the reverse connection state, the current loop between the electrical device and the charging device is a clamped freewheeling loop, wherein the clamped freewheeling loop includes a diode inside the electrical device but does not include an electric energy storage unit inside the electrical device; When the charging device and the electrical device are not in the reverse connection state, the current loop is a power supply loop, wherein the power supply loop includes the electric energy storage unit but does not include the diode.

8. The method according to claim 1, characterized in that The method further comprises: In the case where the electrical device cannot obtain the charging voltage from the charging device, obtaining the main control output level signal, wherein the charging voltage represents the voltage required by the electrical device during normal charging; When the positive level signal in the main control output level signal is the high level signal and the negative level signal is the low level signal, the charging device is controlled to issue an application alarm message and prohibit the charging device from outputting voltage, wherein the application alarm message indicates that the charging bus between the charging device and the electrical device is connected reversely.

9. A device for detecting a device status, characterized in that: include: an acquisition module, configured to acquire a main control output level signal of the charging device in response to the charging device and the electrical device establishing a connection, wherein the main control output level signal includes a positive level signal and a negative level signal; A first determination module, configured to adjust the output voltage of the charging device to a preset detection voltage when both the positive electrode level signal and the negative electrode level signal are high level signals, so as to determine whether the charging device and the electrical device are in a reverse connection state; a second determination module, configured to determine whether the charging device and the electrical device are in the reverse connection state according to a level combination value of the main control output level signal when the positive level signal and the negative level signal are different, wherein the level combination value indicates that the value of the positive level signal is a first value, and the value of the negative level signal is a second value, and the first value and the second value are different; a processing module, configured to control the charging device to issue a target alarm message and prohibit the charging device from outputting a voltage when the charging device and the electrical device are in the reverse connection state, wherein the target alarm message is used to indicate that the electrical device cannot be charged normally; The device is also used for: when the positive level signal is the high level signal and the negative level signal is the low level signal, determining that the charging device and the electrical device are in the reverse connection state, wherein the first value is 1 and the second value is 0; when both the positive level signal and the negative level signal are the high level signals, adjusting the output voltage of the charging device to a preset detection voltage and reacquiring the main control output level signal; acquiring an updated positive level signal and an updated negative level signal in the main control output level signal; and when both the updated positive level signal and the updated negative level signal are the high level signals, determining that the charging device and the electrical device are in the reverse connection state.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method described in any one of claims 1 to 8.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.

12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 8 through the computer program.

Citation Information

Patent Citations

  • Detection circuitry that rechargeable battery positive and negative electrode joins conversely

    CN204631181U

  • Charging reverse connection detection circuit

    CN217689353U