Charging state detection method and device, equipment and storage medium
By combining magnetic field strength and acceleration data to detect the charging state of the smart watch, the problem of low charging state detection accuracy in the prior art is solved, and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202311348904.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-17
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, the charging status detection accuracy of smart watches is low and cannot meet the needs of users.
The charging state of the electronic device is determined based on these data by collecting acceleration data of the electronic device in response to the currently acquired magnetic field intensity and acceleration data, and detecting the charging voltage on the charging PIN.
It realizes a comprehensive judgment based on the magnetic field strength inside the electronic device and the charging voltage on the charging PIN, improves the accuracy of charging state detection and meets the needs of users.
Smart Images

Figure CN119853200A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to a charging status detection method, device, equipment and storage medium. Background Art
[0002] With the advancement of terminal technology, people use more and more types of electronic devices in their daily lives, including smart watches. In related technologies, smart watches can be charged by magnetic wired charging, that is, magnets are set in both the smart watch and the charging stand so that when the charging stand and the smart watch are close, the charging PINs of the two can be automatically aligned. On this basis, smart watches usually determine the charging status of smart watches by detecting the voltage of the charging PIN. However, the above charging status detection method has low accuracy and cannot meet the needs of users. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the embodiments of the present disclosure provide a charging status detection method, device, equipment and storage medium to solve the defects in the related art.
[0004] According to a first aspect of an embodiment of the present disclosure, a charging state detection method is provided, the method comprising:
[0005] In response to the first magnetic field strength currently acquired satisfying a preset first magnetic field strength condition, collecting acceleration data of the electronic device, wherein the first magnetic field strength includes the magnetic field strength inside the electronic device, and the acceleration data includes acceleration data of the electronic device within a first time range, wherein the first time range includes: a time range of a first set time length before a current moment, and / or a time range of a second set time length after the current moment;
[0006] In response to the acceleration data satisfying a preset acceleration condition, detecting a first charging voltage on a charging PIN of the electronic device;
[0007] A charging state of the electronic device is determined based on the first charging voltage.
[0008] In some embodiments, the method further comprises:
[0009] In response to the acceleration data satisfying the preset acceleration condition, it is determined that the electronic device is in a charging stand in-place state.
[0010] In some embodiments, determining the charging state of the electronic device based on the first charging voltage includes:
[0011] In response to the first charging voltage not satisfying a preset voltage condition, determining that the electronic device is in a state where the charging base is in place but the charging PIN has poor contact;
[0012] or,
[0013] In response to the first charging voltage satisfying the preset voltage condition, it is determined that the electronic device is in a normal charging state.
[0014] In some embodiments, the method further comprises:
[0015] In response to the electronic device being in a state where the charging seat is in place but the charging PIN is in poor contact, continuously detecting a second charging voltage on the charging PIN of the electronic device;
[0016] In response to the second charging voltage satisfying the preset voltage condition, it is determined that the electronic device returns to a normal charging state.
[0017] In some embodiments, the method further comprises:
[0018] In response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact, a preset prompt message is generated, where the prompt message is used to prompt that the charging base is not installed in place, and the preset form includes at least one of a text form, a pattern form, and a sound form.
[0019] According to a second aspect of an embodiment of the present disclosure, a charging state detection method is provided, the method comprising:
[0020] In response to detecting that a first charging voltage on a charging PIN of an electronic device disappears during a charging process, obtaining a second magnetic field strength inside the electronic device, where the second magnetic field strength includes acceleration data of the electronic device within a second time range, where the second time range includes: a time range of a third set time length before a current moment, and / or a fourth set time length after the current moment;
[0021] A charging state of the electronic device is determined based on the second magnetic field strength.
[0022] In some embodiments, determining the charging state of the electronic device based on the second magnetic field strength includes:
[0023] In response to the second magnetic field strength satisfying a preset second magnetic field strength condition, determining that the charging state of the electronic device is a charging stand normal removal state;
[0024] or,
[0025] In response to the second magnetic field strength not satisfying the preset second magnetic field strength condition, it is determined that the electronic device is in a state where the charging seat is in place but the charging PIN has poor contact.
[0026] In some embodiments, the method further comprises:
[0027] In response to the electronic device being in a state where the charging seat is in place but the charging PIN is in poor contact, continuously detecting a second charging voltage on the charging PIN of the electronic device;
[0028] In response to the second charging voltage satisfying the preset voltage condition, it is determined that the electronic device returns to a normal charging state.
[0029] In some embodiments, the method further comprises:
[0030] In response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact, a preset prompt message is generated, where the prompt message is used to prompt that the charging base is not installed in place, and the preset form includes at least one of a text form, a pattern form, and a sound form.
[0031] According to a third aspect of an embodiment of the present disclosure, a charging state detection device is provided, the device comprising:
[0032] A speed data acquisition module, configured to acquire acceleration data of the electronic device in response to the first magnetic field strength currently acquired satisfying a preset first magnetic field strength condition, wherein the first magnetic field strength includes the magnetic field strength inside the electronic device, and the acceleration data includes the acceleration data of the electronic device within a first time range, wherein the first time range includes: a time range of a first set time length before a current moment, and / or a time range of a second set time length after the current moment;
[0033] A first voltage detection module, configured to detect a first charging voltage on a charging PIN of the electronic device in response to the acceleration data satisfying a preset acceleration condition;
[0034] The first state determination module is used to determine the charging state of the electronic device based on the first charging voltage.
[0035] In some embodiments, the apparatus further comprises:
[0036] The in-place state determination module is used to determine that the electronic device is in a charging stand in-place state in response to the acceleration data satisfying the preset acceleration condition.
[0037] In some embodiments, the first state determination module is further used to determine that the electronic device is in a state where the charging base is in place but the charging PIN has poor contact in response to the first charging voltage not satisfying a preset voltage condition;
[0038] or,
[0039] The first state determination module is further configured to determine that the electronic device is in a normal charging state in response to the first charging voltage satisfying the preset voltage condition.
[0040] In some embodiments, the apparatus further comprises a resume charging determination module;
[0041] The charging resumption determination module includes:
[0042] A second voltage detection unit, configured to continuously detect a second charging voltage on the charging PIN of the electronic device in response to the electronic device being in a state where the charging base is in place but the charging PIN has poor contact;
[0043] The charging resumption determination unit is used to determine that the electronic device resumes a normal charging state in response to the second charging voltage satisfying the preset voltage condition.
[0044] In some embodiments, the apparatus further comprises:
[0045] The prompt information generation module is used to generate a preset prompt information in response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact. The prompt information is used to prompt that the charging base is not installed in place, and the preset form includes at least one of a text form, a pattern form, and a sound form.
[0046] According to a fourth aspect of an embodiment of the present disclosure, a charging state detection device is provided, the device comprising:
[0047] A magnetic field strength acquisition module, configured to acquire a second magnetic field strength inside the electronic device in response to detecting that a first charging voltage on a charging PIN of the electronic device disappears during the charging process, wherein the second magnetic field strength includes acceleration data of the electronic device within a second time range, wherein the second time range includes: a time range of a third set time length before a current moment, and / or a time range of a fourth set time length after the current moment;
[0048] The second state determination module is used to determine the charging state of the electronic device based on the second magnetic field strength.
[0049] In some embodiments, the second state determination module is further used to determine that the charging state of the electronic device is a normal removal state of the charging stand in response to the second magnetic field strength satisfying a preset second magnetic field strength condition;
[0050] or,
[0051] The second state determination module is further configured to determine that the electronic device is in a state where the charging seat is in place but the charging PIN has poor contact, in response to the second magnetic field strength not satisfying the preset second magnetic field strength condition.
[0052] In some embodiments, the apparatus further comprises a resume charging determination module;
[0053] The charging resumption determination module includes:
[0054] A second voltage detection unit, configured to continuously detect a second charging voltage on the charging PIN of the electronic device in response to the electronic device being in a state where the charging base is in place but the charging PIN has poor contact;
[0055] The charging resumption determination unit is used to determine that the electronic device resumes a normal charging state in response to the second charging voltage satisfying the preset voltage condition.
[0056] In some embodiments, the apparatus further comprises:
[0057] The prompt information generation module is used to generate a preset prompt information in response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact. The prompt information is used to prompt that the charging base is not installed in place, and the preset form includes at least one of a text form, a pattern form, and a sound form.
[0058] According to a fifth aspect of an embodiment of the present disclosure, an electronic device is provided, the device comprising:
[0059] A magnetic sensor, an acceleration sensor, a processor, and a memory for storing a computer program;
[0060] Wherein, the magnetic sensor device is used to detect the magnetic field strength inside the electronic device;
[0061] The acceleration sensor is used to detect acceleration data of the electronic device;
[0062] The processor is configured to implement the charging status detection method described in any one of the first aspect or the second aspect when executing the computer program.
[0063] According to a sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the charging status detection method described in any one of the first aspect or the second aspect is implemented.
[0064] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0065] The present disclosure collects acceleration data of an electronic device in response to a currently acquired first magnetic field strength satisfying a preset first magnetic field strength condition, and detects a first charging voltage on a charging PIN of the electronic device in response to the acceleration data satisfying the preset acceleration condition, and then determines the charging state of the electronic device based on the first charging voltage. This can achieve a comprehensive judgment of the charging state of the electronic device based on the magnetic field strength inside the electronic device and the charging voltage on the charging PIN. Compared with the method of detecting the charging state of the electronic device based only on the voltage of the charging PIN in the related art, the accuracy of the charging state detection can be improved to meet the needs of users.
[0066] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0068] Figure 1 is a flow chart of a charging state detection method according to an exemplary embodiment of the present disclosure;
[0069] Figure 2 is a flow chart of a charging state detection method according to another exemplary embodiment of the present disclosure;
[0070] Figure 3 is a flowchart showing how to perform charging status detection when the charging PIN is in poor contact according to an exemplary embodiment of the present disclosure;
[0071] Figure 4A is a block diagram of an internal structure of an electronic device according to another exemplary embodiment of the present disclosure;
[0072] Figure 4B is a flow chart showing a method of detecting a charging state in an uncharged state according to an exemplary embodiment of the present disclosure;
[0073] Figure 4C is a flow chart showing a method of performing charging state detection in a charging state according to an exemplary embodiment of the present disclosure;
[0074] Figure 5 is a block diagram of a charging state detection device according to an exemplary embodiment of the present disclosure;
[0075] Figure 6 is a block diagram of another charging state detection device according to an exemplary embodiment of the present disclosure;
[0076] Figure 7is a block diagram of another charging state detection device according to an exemplary embodiment of the present disclosure;
[0077] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0078] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0079] With the advancement of terminal technology, people use more and more electronic devices in their daily lives, including smart watches. In related technologies, smart watches can be charged by magnetic wired charging, that is, magnets are set in both the smart watch and the charging stand so that when the charging stand and the smart watch are close, the charging PINs of the two can be automatically aligned. Furthermore, smart watches usually determine the charging status of smart watches by detecting the voltage of the charging PIN, that is, if the charging voltage VBUS is greater than a certain threshold, the charging status of the smart watch is judged as "charging status", otherwise it is judged as "non-charging status".
[0080] However, when the charging stand is improperly installed, poor contact will occur between the smart watch and the charging PIN of the charging stand, but the above-mentioned charging status detection method in the related art cannot accurately detect this status, and thus cannot meet the user's demand for accuracy of charging status detection.
[0081] In view of this, the present disclosure provides the following charging status detection method, device, equipment and storage medium to solve the above-mentioned drawbacks in the related art.
[0082] Figure 1 is a flow chart of a charging status detection method according to an exemplary embodiment; the method of this embodiment can be executed by a charging status detection device, which can be configured in an electronic device that uses a magnetic wired charging method for charging, such as a server, a workstation, a personal computer, a mobile terminal (such as a mobile phone, a tablet computer, etc.), a wearable device (such as glasses, a watch, etc.), etc. Specifically, Figure 1 As shown, the method includes the following steps S101-S103:
[0083] In step S101, in response to the currently acquired first magnetic field strength satisfying a preset first magnetic field strength condition, acceleration data of the electronic device is collected.
[0084] In this embodiment, the electronic device can collect the above-mentioned first magnetic field strength based on a preset magnetic sensor, and detect whether the first magnetic field strength meets the preset first magnetic field strength condition (for example, the first magnetic field strength can be compared with a preset magnetic field strength threshold. If the first magnetic field strength is greater than or equal to the preset magnetic field strength threshold, it can be determined that it meets the preset first magnetic field strength condition). Then, when it is detected that the first magnetic field strength meets the preset first magnetic field strength condition, the acceleration data of the electronic device is collected based on the preset acceleration sensor.
[0085] Among them, the above-mentioned first magnetic field strength may include the magnetic field strength inside the electronic device, and the above-mentioned acceleration data may include acceleration data of the electronic device within a first time range, and the first time range includes: a first set time length before the current moment (that is, the moment when the first magnetic field strength is detected to meet the preset first magnetic field strength condition), and / or a second set time length after the current moment.
[0086] As an example, the first set time length and the second set time length mentioned above can be set based on actual needs, such as both being set to 2 seconds, etc., and this embodiment does not limit this.
[0087] As an example, the magnetic sensor may be a Hall effect sensor disposed inside the electronic device, which may use the Hall element to measure the magnetic field inside the electronic device. Alternatively, the magnetic sensor may also be other sensors disposed inside the electronic device, such as a magnetoresistive sensor, a magnetic inductive sensor, etc., which are not limited in this embodiment.
[0088] In step S102, in response to the acceleration data satisfying a preset acceleration condition, a first charging voltage on a charging PIN of the electronic device is detected.
[0089] In this embodiment, after the acceleration data of the electronic device is collected, it can be determined whether the acceleration data meets the preset acceleration condition. For example, the acceleration data can be compared with the preset acceleration threshold. If the acceleration data is greater than or equal to the preset acceleration threshold, it can be determined that it meets the preset acceleration condition. On this basis, the first charging voltage (i.e., VBUS voltage) on the charging PIN of the electronic device can be detected.
[0090] In some embodiments, the electronic device may also determine that the electronic device is in the charging cradle in place state in response to the acceleration data satisfying the preset acceleration condition. On this basis, the first charging voltage may be used to further determine that the charging state of the electronic device is a normal charging state (e.g., the charging cradle is in place and the charging PIN is in good contact), or that the charging cradle is in place but the charging PIN is in poor contact.
[0091] On the contrary, the electronic device may also determine that the electronic device is in a charging stand not-in-place state in response to the acceleration data not satisfying the preset acceleration condition.
[0092] In step S103, a charging state of the electronic device is determined based on the first charging voltage.
[0093] In this embodiment, after detecting the first charging voltage on the charging PIN of the electronic device, the charging state of the electronic device can be determined based on the first charging voltage.
[0094] For example, the first charging voltage can be compared with a preset voltage threshold. If the first charging voltage is greater than or equal to the preset voltage threshold, it can be considered that the first charging voltage satisfies the preset voltage condition, and thus it can be determined that the electronic device is in a normal charging state (e.g., the charging base is in place and the charging PIN is in good contact). If the first charging voltage is less than the preset voltage threshold, it can be considered that the first charging voltage does not satisfy the preset voltage condition, and thus it can be determined that the electronic device is in a state where the charging base is in place but the charging PIN is in poor contact.
[0095] In some embodiments, the electronic device may also continuously detect a second charging voltage on the charging PIN of the electronic device in response to the electronic device being in a charging dock but having poor contact with the charging PIN, and then determine that the electronic device has returned to a normal charging state in response to the second charging voltage satisfying the preset voltage condition. For details, please refer to the following Figure 3 The illustrated embodiment will not be described in detail here.
[0096] In other embodiments, the electronic device may also generate a preset prompt message in response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact, wherein the prompt message can be used to prompt that the charging base is not installed in place. As an example, the above preset form may include at least one of a text form, a pattern form, and a sound form. That is to say, when it is detected that the electronic device is in a state where the charging base is in place but the charging PIN is in poor contact, the electronic device may prompt the user to reinstall the charging base by generating the above prompt message so that the charging base is in good contact with the charging PIN of the watch, thereby avoiding charging failure of the electronic device, improving the charging quality of the electronic device, and further improving the user experience.
[0097] From the above description, it can be seen that the method of this embodiment collects acceleration data of the electronic device in response to the currently acquired first magnetic field strength satisfying the preset first magnetic field strength condition, and detects the first charging voltage on the charging PIN of the electronic device in response to the acceleration data satisfying the preset acceleration condition, and then determines the charging status of the electronic device based on the first charging voltage. It can realize comprehensive judgment of the charging status of the electronic device based on the magnetic field strength inside the electronic device and the charging voltage on the charging PIN. Compared with the method of detecting the charging status of the electronic device based only on the voltage of the charging PIN in the related art, the accuracy of charging status detection can be improved to meet the needs of users.
[0098] Figure 2 is a flowchart of a charging status detection method according to another exemplary embodiment of the present disclosure; the method of this embodiment can be executed by a charging status detection device, and the charging status detection device can be configured in an electronic device that adopts a magnetic wired charging method for charging, such as a server, a workstation, a personal computer, a mobile terminal (such as a mobile phone, a tablet computer, etc.), a wearable device (such as glasses, a watch, etc.), etc. Specifically, Figure 2 As shown, the method includes the following steps S201-S204:
[0099] In step S201, in response to detecting that a first charging voltage on a charging PIN of an electronic device disappears during a charging process, a second magnetic field strength inside the electronic device is acquired.
[0100] In this embodiment, after determining that the electronic device is in a normal charging state, the first charging voltage may continue to be detected, and then when it is detected that the first charging voltage disappears, the second magnetic field strength inside the electronic device may be acquired.
[0101] Among them, the above-mentioned second magnetic field strength includes acceleration data of the electronic device within a second time range, and the second time range includes: a time range of a third set time length before the current moment (i.e., the moment when the first charging voltage disappears), and / or a time range of a fourth set time length after the current moment.
[0102] As an example, the third set time length and the fourth set time length can be set based on actual needs, such as both being set to 2 seconds, etc., which is not limited in this embodiment.
[0103] In step S202, it is determined whether the second magnetic field strength meets a preset second magnetic field strength condition: if so, step S203 is executed; if not, step S204 is executed.
[0104] In this embodiment, after obtaining the second magnetic field strength inside the electronic device, it can be determined whether the second magnetic field strength meets the preset second magnetic field strength condition, for example, by comparing the second magnetic field strength with a second magnetic field strength threshold (the threshold is, for example, 0). When the second magnetic field is not equal to the second magnetic field strength threshold, it can be determined that the second magnetic field strength meets the preset second magnetic field strength condition, and then step S203 is executed; and when the second magnetic field is equal to the second magnetic field strength threshold, it can be determined that the second magnetic field strength does not meet the preset second magnetic field strength condition, and then step S204 is executed.
[0105] In step S203, it is determined that the charging state of the electronic device is a normal removal state of the charging base.
[0106] In this embodiment, when it is detected that the first charging voltage disappears during the charging process and the second magnetic field strength is not equal to the second magnetic field strength threshold (for example, the second magnetic field strength is not equal to 0), it can be determined that the charging state of the electronic device is the normal removal state of the charging base.
[0107] In step S204, it is determined that the electronic device is in a state where the charging dock is in place but the charging PIN has poor contact.
[0108] In this embodiment, when it is detected that the first charging voltage disappears during the charging process and the second magnetic field strength is equal to the second magnetic field strength threshold (for example, the second magnetic field strength is equal to 0), it can be determined that the electronic device is in a state where the charging base is in place but the charging PIN has poor contact.
[0109] In some embodiments, the electronic device may also continuously detect a second charging voltage on the charging PIN of the electronic device in response to the electronic device being in a charging dock but having poor contact with the charging PIN, and then determine that the electronic device has returned to a normal charging state in response to the second charging voltage satisfying the preset voltage condition. For details, please refer to the following Figure 3 The illustrated embodiment will not be described in detail here.
[0110] In other embodiments, the electronic device may also generate a preset prompt message in response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact, wherein the prompt message can be used to prompt that the charging base is not installed in place. As an example, the above preset form may include at least one of a text form, a pattern form, and a sound form. That is to say, when it is detected that the electronic device is in a state where the charging base is in place but the charging PIN is in poor contact, the electronic device may prompt the user to reinstall the charging base by generating the above prompt message so that the charging base is in good contact with the charging PIN of the watch, thereby avoiding charging failure of the electronic device, improving the charging quality of the electronic device, and further improving the user experience.
[0111] It can be seen from the above description that this embodiment obtains the second magnetic field strength inside the electronic device in response to detecting that the first charging voltage disappears during the charging process, and determines that the charging state of the electronic device is a normal removal state of the charging base in response to the second magnetic field strength satisfying a preset second magnetic field strength condition, and determines that the electronic device is in a state where the charging base is in place but the charging PIN has poor contact in response to the second magnetic field strength not satisfying the preset second magnetic field strength condition. This can detect the charging state of the electronic device during the charging process, improve the accuracy of charging state detection, and meet user needs.
[0112] Figure 3 It is a flowchart showing how to detect the charging status when the charging PIN has poor contact according to an exemplary embodiment of the present disclosure; based on the above embodiment, this embodiment uses how to detect the charging status when the charging PIN has poor contact as an example to illustrate.
[0113] like Figure 3 As shown, after determining that the electronic device is in a charging PIN poor contact state (that is, the charging seat in the above embodiment is in place but the charging PIN poor contact state), the charging state detection may be performed based on the following steps S301-S302:
[0114] In step S301, in response to the electronic device being in a state where the charging seat is in place but the charging PIN has poor contact, a second charging voltage on the charging PIN of the electronic device is continuously detected.
[0115] In this embodiment, after it is determined that the electronic device is in a poor charging PIN contact state, the second charging voltage on the charging PIN of the electronic device can be continuously detected, for example, the VBUS voltage on the charging PIN of the electronic device is detected multiple times based on a set period (named the second charging voltage for easy distinction).
[0116] In step S302, in response to the second charging voltage satisfying the preset voltage condition, it is determined that the electronic device returns to a normal charging state.
[0117] In this embodiment, after obtaining the second charging voltage on the charging PIN of the electronic device, it can be determined whether the second charging voltage meets the preset voltage condition. For example, the second charging voltage can be compared with the preset voltage threshold. If the second charging voltage is greater than or equal to the preset voltage threshold, it can be considered that the second charging voltage meets the preset voltage condition, and then it can be determined that the electronic device has returned to a normal charging state. Otherwise, if the second charging voltage is less than the preset voltage threshold, it can be considered that the second charging voltage does not meet the preset voltage condition, and then it can be determined that the electronic device is in a non-charging state.
[0118] It can be seen from the above description that this embodiment, in response to the electronic device being in a state where the charging dock is in place but the charging PIN has poor contact, continuously detects the second charging voltage on the charging PIN of the electronic device, and in response to the second charging voltage satisfying the preset voltage condition, determines that the electronic device has returned to a normal charging state. This can realize charging state detection when it is determined that the electronic device is in a state where the charging PIN has poor contact, thereby improving the accuracy of charging state detection and meeting user needs.
[0119] The present disclosure is described below with reference to a specific embodiment, but is not intended to limit the scope of the present disclosure.
[0120] Figure 4A FIG. 1 is a block diagram of the internal structure of an electronic device according to another exemplary embodiment of the present disclosure. Figure 4A As shown, the electronic device (such as a smart watch, etc.) of this embodiment may include a main chip, a Hall sensor, an acceleration sensor, a charging chip, a charging PIN, a magnet, a screen, a speaker and other units. When charging the electronic device, the charging stand can provide the electronic device with a charging voltage through the charging PIN, and the magnet in the charging stand will change the magnetic field strength inside the electronic device, thereby changing the output of the Hall sensor (the output of the Hall sensor changes from 1 to 0); when the charging stand contacts the electronic device, a collision will occur due to the magnetic attraction of the magnet, and the instantaneous vibration of the electronic device caused by the collision can be identified by the acceleration sensor; on this basis, the algorithm in the main chip can combine the data of the Hall sensor, the acceleration sensor and the charging PIN to accurately determine the charging status of the electronic device.
[0121] Specifically, Figure 4B FIG. 1 is a flow chart showing a method of detecting a charging state in an uncharged state according to an exemplary embodiment of the present disclosure. Figure 4B As shown, the process of performing charging state detection in the uncharged state includes the following steps S411-S419:
[0122] In step S411, the electronic device is currently in an uncharged state;
[0123] In step S412, the electronic device is connected to a charging dock;
[0124] In step S413, the output of the Hall sensor changes from 1 to 0;
[0125] When the magnet in the charging cradle increases the magnetic field strength inside the electronic device and exceeds the threshold of the Hall sensor, the Hall sensor output changes from 1 to 0.
[0126] In step S414, whether the acceleration sensor detects vibration;
[0127] When the main chip detects the output change of the Hall sensor, it can collect the data of the acceleration sensor within 2 seconds and determine whether vibration occurs: if there is no vibration, execute step S415; if there is vibration, execute step S416;
[0128] In step S415, it is determined that there is no charging dock connected (i.e., the charging dock is not in place);
[0129] In step S416, it is determined that the charging cradle is connected (i.e., the charging cradle is in place), and then the VBUS voltage on the charging PIN is detected to see whether it reaches the charging threshold: if it reaches the threshold, step S417 is executed; if it does not reach the threshold, step S418 is executed;
[0130] In step S417, the electronic device starts charging, and a charging icon is displayed on the screen of the electronic device, and it is determined that the electronic device is currently in a charging state;
[0131] In step S418, it is determined that the charging status of the electronic device is that the charging seat has poor contact (i.e., the charging seat is in place but the charging PIN has poor contact);
[0132] In step S419, a prompt message is generated on the screen of the electronic device, and / or a ring is sounded through a speaker to remind the user that the charging stand is not installed properly and to determine that the electronic device is currently in an uncharged state.
[0133] Further, Figure 4C FIG. 1 is a flow chart showing a method of detecting a charging state in a charging state according to an exemplary embodiment of the present disclosure. Figure 4C As shown, the process of performing charging state detection in the charging state includes the following steps S421-S429:
[0134] In step S421, the electronic device is in a charging state;
[0135] In step S422, it is detected that the VBUS voltage disappears;
[0136] When the electronic device is in a charging state, the VBUS voltage is continuously detected, and when it is detected that the VBUS voltage disappears, the following steps are continued.
[0137] In step S423, wait for 2 seconds;
[0138] In step S424, it is detected whether the output of the Hall sensor is 0: if not, step S425 is executed; if yes, step S426 is executed;
[0139] In step S425, it is determined that the charging state of the electronic device is that the charging base is normally removed;
[0140] In step S426, it is determined that the charging status of the electronic device is that the charging dock is still in place, but the charging PIN is not in good contact;
[0141] In step S427, a prompt message is generated on the screen of the electronic device, and / or a ring is sounded through a speaker to remind the user that the charging stand is not installed properly;
[0142] In step S428, it is detected whether the VBUS voltage on the charging PIN reaches the charging threshold: if it reaches the threshold, step S429 is executed; if it does not reach the threshold, it is determined that the electronic device is in a non-charging state.
[0143] In step S429, the electronic device starts charging, and a charging icon is displayed on the screen of the electronic device, and it is determined that the electronic device is currently in a charging state.
[0144] From the above description, it can be seen that this embodiment adds analysis of Hall sensor and acceleration sensor data in charging status detection, and combines VBUS voltage to judge the charging status of the electronic device. It can determine whether the charging base is installed properly. When the charging base is not installed properly and cannot be charged, the user is reminded in time to avoid accidental non-charging problems, thereby enhancing the user experience and meeting user needs.
[0145] Figure 5 is a block diagram of a charging status detection device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be configured in an electronic device that uses a magnetic wired charging method for charging, such as a smart watch, smart glasses, an electric toothbrush, a tablet computer, etc. Specifically, as Figure 5 As shown, the device may include: a speed data acquisition module 110, a first voltage detection module 120 and a first state determination module 130, wherein:
[0146] The speed data acquisition module 110 is used to collect acceleration data of the electronic device in response to the first magnetic field strength currently acquired satisfying a preset first magnetic field strength condition, wherein the first magnetic field strength includes the magnetic field strength inside the electronic device, and the acceleration data includes the acceleration data of the electronic device within a first time range, and the first time range includes: a time range of a first set time length before a current moment, and / or a time range of a second set time length after the current moment;
[0147] A first voltage detection module 120, configured to detect a first charging voltage on a charging PIN of the electronic device in response to the acceleration data satisfying a preset acceleration condition;
[0148] The first state determination module 130 is configured to determine a charging state of the electronic device based on the first charging voltage.
[0149] From the above description, it can be seen that the device of this embodiment collects acceleration data of the electronic device in response to the currently acquired first magnetic field strength satisfying the preset first magnetic field strength condition, and detects the first charging voltage on the charging PIN of the electronic device in response to the acceleration data satisfying the preset acceleration condition, and then determines the charging status of the electronic device based on the first charging voltage. It can realize comprehensive judgment of the charging status of the electronic device based on the magnetic field strength inside the electronic device and the charging voltage on the charging PIN. Compared with the method of detecting the charging status of the electronic device based only on the voltage of the charging PIN in the related art, the accuracy of the charging status detection can be improved to meet the needs of users.
[0150] Figure 6 is a block diagram of another charging state detection device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be configured in an electronic device that adopts a magnetic wired charging method for charging, such as a smart watch, smart glasses, an electric toothbrush, a tablet computer, etc. Among them, the speed data acquisition module 210, the first voltage detection module 220 and the first state determination module 230 are the same as the aforementioned Figure 5 The functions of the speed data acquisition module 110 , the first voltage detection module 120 and the first state determination module 130 in the illustrated embodiment are the same and will not be described in detail herein.
[0151] like Figure 6 As shown, the device of this embodiment may further include:
[0152] The in-place state determination module 240 is used to determine that the electronic device is in a charging stand in-place state in response to the acceleration data satisfying the preset acceleration condition.
[0153] In some embodiments, the first state determination module 230 can also be used to determine that the electronic device is in a state where the charging base is in place but the charging PIN has poor contact in response to the first charging voltage not satisfying the preset voltage condition; or, the first state determination module 230 can also be used to determine that the electronic device is in a normal charging state in response to the first charging voltage satisfying the preset voltage condition.
[0154] In some embodiments, the above apparatus may further include a resume charging determination module 250;
[0155] The charging resumption determination module 250 may include:
[0156] A second voltage detection unit 251 is used for continuously detecting a second charging voltage on the charging PIN of the electronic device in response to the electronic device being in a state where the charging base is in place but the charging PIN has poor contact;
[0157] The charge resumption determination unit 252 is configured to determine that the electronic device resumes a normal charging state in response to the second charging voltage satisfying the preset voltage condition.
[0158] In some embodiments, the above apparatus may further include:
[0159] The prompt information generation module 260 is used to generate a preset prompt information in response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact. The prompt information is used to prompt that the charging base is not installed in place, and the preset form includes at least one of text form, pattern form, and sound form.
[0160] Figure 7 is a block diagram of another charging status detection device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be configured in an electronic device that adopts a magnetic wired charging method for charging, such as a smart watch, smart glasses, an electric toothbrush, a tablet computer, etc. Specifically, as Figure 7 As shown, the device may include: a magnetic field strength acquisition module 310 and a second state determination module 320, wherein:
[0161] The magnetic field strength acquisition module 310 is used to acquire a second magnetic field strength inside the electronic device in response to detecting that a first charging voltage on a charging PIN of the electronic device disappears during the charging process, wherein the second magnetic field strength includes acceleration data of the electronic device within a second time range, and the second time range includes: a time range of a third set time length before a current moment and / or a fourth set time length after the current moment;
[0162] The second state determination module 320 is configured to determine the charging state of the electronic device based on the second magnetic field strength.
[0163] From the above description, it can be seen that the device of this embodiment obtains the second magnetic field strength inside the electronic device in response to detecting that the first charging voltage on the charging PIN of the electronic device disappears during the charging process, and then determines the charging status of the electronic device based on the second magnetic field strength. This can achieve a comprehensive judgment of the charging status of the electronic device based on the magnetic field strength inside the electronic device and the charging voltage on the charging PIN. Compared with the method of detecting the charging status of the electronic device only based on the voltage of the charging PIN in the related art, the accuracy of the charging status detection can be improved to meet the needs of users.
[0164] In some embodiments, the second state determination module 320 may also be used to determine that the charging state of the electronic device is a normal removal state of the charging stand in response to the second magnetic field strength satisfying a preset second magnetic field strength condition;
[0165] or,
[0166] The second state determination module 320 may also be configured to determine that the electronic device is in a state where the charging base is in place but the charging PIN has poor contact, in response to the second magnetic field strength not satisfying the preset second magnetic field strength condition.
[0167] In some embodiments, the apparatus further includes a resume charging determination module 330;
[0168] The charging resumption determination module 330 may include:
[0169] A second voltage detection unit 331 is used for continuously detecting a second charging voltage on the charging PIN of the electronic device in response to the electronic device being in a state where the charging base is in place but the charging PIN has poor contact;
[0170] The charge resumption determination unit 332 is configured to determine that the electronic device resumes a normal charging state in response to the second charging voltage satisfying the preset voltage condition.
[0171] In some embodiments, the apparatus may further include:
[0172] The prompt information generation module 340 is used to generate a preset prompt information in response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact. The prompt information is used to prompt that the charging base is not installed in place, and the preset form includes at least one of a text form, a pattern form, and a sound form.
[0173] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0174] Figure 8900 is a block diagram of an electronic device according to an exemplary embodiment. For example, the device 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0175] Reference Figure 8 , device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0176] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned charging state detection method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0177] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0178] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
[0179] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display panel and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0180] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the device 900 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0181] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0182] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display panel and keypad of the device 900, and the sensor assembly 914 can also detect the position change of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0183] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0184] In an exemplary embodiment, the device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned charging status detection method.
[0185] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by a processor 920 of the device 900 to perform the above-mentioned charging state detection method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0186] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0187] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A charging status detection method, characterized in that: The method comprises: In response to the first magnetic field strength currently acquired satisfying a preset first magnetic field strength condition, collecting acceleration data of the electronic device, wherein the first magnetic field strength includes the magnetic field strength inside the electronic device, and the acceleration data includes acceleration data of the electronic device within a first time range, wherein the first time range includes: a time range of a first set time length before a current moment, and / or a time range of a second set time length after the current moment; In response to the acceleration data satisfying a preset acceleration condition, detecting a first charging voltage on a charging PIN of the electronic device; A charging state of the electronic device is determined based on the first charging voltage.
2. The method according to claim 1, characterized in that: The method further comprises: In response to the acceleration data satisfying the preset acceleration condition, it is determined that the electronic device is in a charging stand in-place state.
3. The method according to claim 1, characterized in that The determining the charging state of the electronic device based on the first charging voltage includes: In response to the first charging voltage not satisfying a preset voltage condition, determining that the electronic device is in a state where the charging base is in place but the charging PIN has poor contact; or, In response to the first charging voltage satisfying the preset voltage condition, it is determined that the electronic device is in a normal charging state.
4. The method according to claim 3, characterized in that: The method further comprises: In response to the electronic device being in a state where the charging seat is in place but the charging PIN is in poor contact, continuously detecting a second charging voltage on the charging PIN of the electronic device; In response to the second charging voltage satisfying the preset voltage condition, it is determined that the electronic device returns to a normal charging state.
5. The method according to claim 3, characterized in that: The method further comprises: In response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact, a preset prompt message is generated, where the prompt message is used to prompt that the charging base is not installed in place, and the preset form includes at least one of a text form, a pattern form, and a sound form.
6. A charging status detection method, characterized in that: The method comprises: In response to detecting that a first charging voltage on a charging PIN of an electronic device disappears during a charging process, obtaining a second magnetic field strength inside the electronic device, where the second magnetic field strength includes acceleration data of the electronic device within a second time range, where the second time range includes: a time range of a third set time length before a current moment, and / or a fourth set time length after the current moment; A charging state of the electronic device is determined based on the second magnetic field strength.
7. The method according to claim 6, characterized in that The determining the charging state of the electronic device based on the second magnetic field strength includes: In response to the second magnetic field strength satisfying a preset second magnetic field strength condition, determining that the charging state of the electronic device is a charging stand normal removal state; or, In response to the second magnetic field strength not satisfying the preset second magnetic field strength condition, it is determined that the electronic device is in a state where the charging seat is in place but the charging PIN has poor contact.
8. The method according to claim 7, characterized in that The method further comprises: In response to the electronic device being in a state where the charging seat is in place but the charging PIN is in poor contact, continuously detecting a second charging voltage on the charging PIN of the electronic device; In response to the second charging voltage satisfying the preset voltage condition, it is determined that the electronic device returns to a normal charging state.
9. The method according to claim 7, characterized in that: The method further comprises: In response to the electronic device being in a state where the charging base is in place but the charging PIN is in poor contact, a preset prompt message is generated, where the prompt message is used to prompt that the charging base is not installed in place, and the preset form includes at least one of a text form, a pattern form, and a sound form.
10. A charging status detection device, characterized in that: The device comprises: A speed data acquisition module, configured to acquire acceleration data of the electronic device in response to the first magnetic field strength currently acquired satisfying a preset first magnetic field strength condition, wherein the first magnetic field strength includes the magnetic field strength inside the electronic device, and the acceleration data includes the acceleration data of the electronic device within a first time range, wherein the first time range includes: a time range of a first set time length before a current moment, and / or a time range of a second set time length after the current moment; A first voltage detection module, configured to detect a first charging voltage on a charging PIN of the electronic device in response to the acceleration data satisfying a preset acceleration condition; The first state determination module is used to determine the charging state of the electronic device based on the first charging voltage.
11. A charging status detection device, characterized in that: The device comprises: A magnetic field strength acquisition module, configured to acquire a second magnetic field strength inside the electronic device in response to detecting that a first charging voltage on a charging PIN of the electronic device disappears during the charging process, wherein the second magnetic field strength includes acceleration data of the electronic device within a second time range, wherein the second time range includes: a time range of a third set time length before a current moment, and / or a time range of a fourth set time length after the current moment; The second state determination module is used to determine the charging state of the electronic device based on the second magnetic field strength.
12. An electronic device, characterized in that: The device comprises: A magnetic sensor, an acceleration sensor, a processor, and a memory for storing a computer program; Wherein, the magnetic sensor device is used to detect the magnetic field strength inside the electronic device; The acceleration sensor is used to detect acceleration data of the electronic device; The processor is configured to implement the charging state detection method according to any one of claims 1 to 9 when executing the computer program.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the charging state detection method according to any one of claims 1 to 9 is implemented.