Method, apparatus, and related product for controlling device boot-up
By detecting the battery voltage and setting a preset threshold during the Uboot stage, the problem of AB system startup failure caused by low battery in embedded devices is solved, ensuring normal device startup and improving ease of use and reliability.
Patent Information
- Application Number
- CN202411449904.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-10-16
AI Technical Summary
When the battery is low, the AB system of the embedded device fails to boot, causing the device to repeatedly restart and enter the Recovery system, which confuses users and reduces the ease of use of the device.
Before the Uboot stage of device startup, the battery voltage is obtained and a preset voltage threshold is set to ensure that the battery power is sufficient to support the normal startup of the AB system and avoid startup failure due to insufficient battery power.
It improves the stability and reliability of AB system equipment, reduces user confusion, and enhances equipment usability and startup success rate.
Smart Images

Figure CN119440640B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates generally to the field of software technology. More particularly, the present disclosure relates to a method, apparatus, electronic device and computer readable storage medium for controlling device booting. BACKGROUND
[0002] AB Over-The-Air (ABOTA) is a mechanism designed to improve the reliability and user experience of system updates. It is used by many smart devices running Android. ABOTA is also widely used on complex embedded devices. This mechanism works by using two independent system partitions on the device, called A and B, hence the name AB system. During the update process, one of the system partitions can act as a backup to ensure that the device can boot and run normally in any case.
[0003] In a device using the AB system, the problem of low battery power failing to boot will have a more serious consequence, that is, the booting of the AB system fails, causing the partition switching of the AB system, but after switching the partition, it still cannot be started due to insufficient power. After several failures, the device enters the Recovery system. This happens particularly quickly in a low-power situation, with 7 to 8 repeated restarts within ten seconds, exhausting the number of failed retries of the AB system. At this time, if the user starts to charge the device, the user will be surprised to find that the system started by the device is the Recovery system, and the user is prompted to repair the system. This causes the user to be confused that the system of the device is broken only after a period of idling, reducing the ease of use of the device using the AB system.
[0004] Therefore, there is an urgent need to provide a scheme for controlling device booting in order to avoid causing confusion to users and improve the ease of use of devices using the AB system. SUMMARY
[0005] In order to at least solve one or more technical problems as mentioned above, the present disclosure proposes a scheme for controlling device booting in the following aspects.
[0006] In a first aspect, the present disclosure provides a method for controlling device booting, comprising: obtaining a first voltage of a battery in a Uboot phase of entering device booting and before performing a booting AB system booting operation of the Uboot phase; determining whether the first voltage is less than a preset voltage threshold, wherein the preset voltage threshold is equal to a sum of a normal working voltage and a reserved voltage margin; and in a case where the first voltage is greater than or equal to the preset voltage threshold, continuing to perform the booting AB system booting operation of the Uboot phase.
[0007] In some embodiments, the foregoing method further comprises: before entering the Uboot stage, acquiring a second voltage of the battery; determining whether the second voltage is less than the normal working voltage; in the case that the second voltage is less than the normal working voltage, controlling the device to turn off power supply; and in the case that the second voltage is greater than or equal to the normal working voltage, entering the Uboot stage.
[0008] In some embodiments, acquiring the first voltage of the battery comprises: acquiring an odd number of voltages of the battery at preset time intervals; screening out voltages with abnormal jitter from the odd number of voltages to obtain a plurality of voltages without abnormal jitter; and determining a first average value of the plurality of voltages without abnormal jitter as the first voltage.
[0009] In some embodiments, screening out voltages with abnormal jitter from the odd number of voltages to obtain a plurality of voltages without abnormal jitter comprises: determining a second average value of the odd number of voltages; determining voltages with abnormal jitter from the odd number of voltages based on the deviation of each voltage in the odd number of voltages from the second average value; and screening out the voltages with abnormal jitter to obtain a plurality of voltages without abnormal jitter.
[0010] In some embodiments, the foregoing method further comprises: in the case that the first voltage is less than the preset voltage threshold, externally outputting a battery power consumption prompt; and in response to detecting a power connection state of the device within a preset time length, continuing to perform the boot AB system startup operation of the Uboot stage.
[0011] In some embodiments, the foregoing method further comprises: in response to not detecting a power connection state of the device within a preset time length, controlling the device to turn off power supply.
[0012] In a second aspect, the present disclosure provides an apparatus for controlling device startup, comprising: an acquisition module configured to acquire a first voltage of a battery before entering a Uboot stage of device startup and before performing a boot AB system startup operation of the Uboot stage; a determination module configured to determine whether the first voltage is less than a preset voltage threshold, wherein the preset voltage threshold is equal to a sum of a normal working voltage and a reserved voltage margin; and an execution module configured to, in the case that the first voltage is greater than or equal to the preset voltage threshold, continue to perform the boot AB system startup operation of the Uboot stage.
[0013] In a third aspect, the present disclosure provides an electronic device, comprising: a processor; and a memory storing program instructions for controlling device startup, which, when executed by the processor, cause the implementation of the method in the foregoing first aspect and the plurality of embodiments thereof.
[0014] In a fourth aspect, this disclosure provides a computer-readable storage medium having stored thereon program instructions for controlling the startup of a device, which, when executed by a processor, implement the method and several embodiments thereof described in the first aspect above.
[0015] The above-described scheme for controlling device startup allows for battery voltage detection before the U-boot phase and the execution of the AB system boot process. An appropriate preset voltage threshold can be set. If the detected battery voltage is greater than or equal to the preset threshold, the U-boot boot process can continue. This ensures sufficient battery power to support normal AB system startup, preventing startup failure due to insufficient battery power and avoiding the device entering Recovery mode. This reduces user confusion and improves the usability of devices using the AB system.
[0016] Furthermore, in some embodiments, before entering the Uboot phase of device startup and performing the AB system startup operation during the Uboot phase, an odd number of battery voltages can be acquired at preset time intervals. Voltages exhibiting abnormal fluctuations among these odd-numbered voltages are then filtered out to obtain multiple voltages without abnormal fluctuations. The average value of these multiple voltages without abnormal fluctuations is then determined as the final voltage. By repeatedly measuring and filtering out abnormal fluctuation values, voltage fluctuations caused by battery analog-to-digital converter error (ADC) can be eliminated, improving the accuracy of battery voltage measurement. By strengthening battery voltage detection during the Uboot phase, insufficient battery power can prevent AB system startup failure, thus contributing to improved stability and reliability of the AB system.
[0017] Furthermore, in some embodiments, when the voltage detected during the U-boot phase is lower than a preset voltage threshold, a battery depletion warning can be output to prompt the user to charge the device. If the device's power connection status can be detected within a preset time period, the U-boot phase boot AB system startup operation can continue. This ensures that the device only begins the boot AB system operation when there is sufficient power supply, helping to improve the reliability and startup success rate of the AB system. Simultaneously, by providing a battery depletion warning, the user is informed of the device's current battery status, enabling timely action and providing a better user experience. Attached Figure Description
[0018] The above and other objects, features, and advantages of exemplary embodiments of this disclosure will become readily apparent upon reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this disclosure are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein:
[0019] Figure 1 This is an exemplary physical partitioning logic diagram of an AB system according to an embodiment of this disclosure;
[0020] Figure 2 This is an exemplary flowchart illustrating the booting of an AB system according to an embodiment of this disclosure;
[0021] Figure 3 This is an exemplary flowchart illustrating a method for controlling device startup according to an embodiment of this disclosure;
[0022] Figure 4 This is an exemplary structural block diagram illustrating an apparatus for controlling device startup according to an embodiment of this disclosure;
[0023] Figure 5 This is an exemplary structural block diagram illustrating an electronic device according to an embodiment of this disclosure. Detailed Implementation
[0024] The technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, not all of them. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0025] It should be understood that when the terms "first," "second," "third," and "fourth," etc., are used in the claims, specification, and drawings of this application, they are used only to distinguish different objects and not to describe a specific order. The terms "comprising" and "including" as used in the specification and claims of this disclosure indicate the presence of the described features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.
[0026] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. As used in this disclosure and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this disclosure and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0027] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0028] To facilitate understanding, before providing a detailed explanation of the scheme disclosed herein, we will first provide a detailed explanation of the AB OTA mechanism involved in this disclosure.
[0029] You can refer to this first. Figure 1 Understanding the physical partitioning logic of the AB system. As shown in Figure 1, kernel A, root file system A, and original equipment manufacturer (OEM) data A constitute the A system partition, while kernel B, root file system B, and OEM data B constitute the B system partition. Furthermore, Figure 1 The data partitions shown are typically used as public partitions. This means that regardless of whether system partition A or system partition B is the currently active system partition, the data partition is shared by both system partitions and does not participate in the switching process. This approach ensures persistent storage of user data, preventing data loss even during system updates.
[0030] Under the AB OTA update mechanism, when a new update package is ready, the system applies the update package to the currently unused system partition in the background (for example, if the device is running system partition A, the update will be applied to system partition B). This process is transparent to the user and will not affect their use of the device. After the update is complete, the device will switch to the updated system partition on the next boot.
[0031] In addition to enhancing user experience during OTA updates, the AB system extends throughout the entire device's lifespan, preventing system data corruption, improving device security, and ensuring high availability under all circumstances. Specifically, during device startup, if one system partition fails to boot a specified number of times, it will switch to the other system partition. If both system partitions fail to boot a certain number of times, the device will enter the Recovery system to assist the user in system repair.
[0032] For reference here. Figure 2 Understand the process of booting the AB system. For example... Figure 2 As shown, during the U-Boot stage (U-Boot is an open-source bootloader used in embedded systems to initialize hardware, configure system settings, and load the operating system kernel; U-Boot supports multiple processor architectures, including ARM, MIPS, and PowerPC, and can boot various operating systems such as Linux, NetBSD, and VxWorks), before booting the AB system, it can first determine whether the boot counts of system partitions A and B are 0. In practice, the boot counts of system partitions A and B, along with firmware version information, are stored together in a miscellaneous partition Misc allocated using non-volatile flash memory. U-Boot can read the boot counts of system partitions A and B stored in Misc and determine whether they are 0.
[0033] With both system partitions A and B having a boot count of 0, the device can boot into the Recovery system. In embedded systems, Recovery typically refers to a special boot mode used to restore the system to a normal state when problems occur. This usually involves operations such as factory reset or system repair. After entering Recovery, recovery operations can be performed on system partitions A and B, and the device will reboot after the recovery operation is complete. These recovery operations may include booting the user to the internet, downloading recovery firmware, installing firmware to system partitions A and B, restoring the boot counts of system partitions A and B to their maximum values, and setting the priority flag of system partition A to 1 and the priority flag of system partition B to 0, etc.
[0034] Conversely, if the boot counts of system partitions A and B are not both zero, systems A and B can be booted. For ease of understanding, we can first assume that the boot counts of system partitions A and B are not zero before describing the boot process. In this case, we can first compare the priority flags of system partitions A and B. If the priority flag of system partition A is 1 and the priority flag of system partition B is 0, the process can proceed to booting system partition A. Conversely, if the priority flag of system partition A is 0 and the priority flag of system partition B is 1, the process can proceed to booting system partition B.
[0035] During the boot process of system partition A, if system partition A boots normally, its boot count can be set to the maximum value, and its priority flag can be set to 1 to complete the boot process. If system partition A boots abnormally, the process does not directly switch to booting system partition B. Instead, the boot count of system partition A is decremented by 1, and it is determined whether the new boot count is 0. If the new boot count is not 0, the priority flag of system partition A can be set to 1, and then the device can be restarted. Conversely, if the new boot count is 0, the priority flag of system partition A can be set to 0, and then the device can be restarted. Figure 2 As shown, the process of booting system partition B is similar to the process of booting system partition A. For the sake of simplicity, it will not be disclosed or described in detail.
[0036] Next, we will describe the relationship between battery status and device startup as disclosed in this disclosure. In obtaining the solution disclosed in this disclosure, the applicant discovered that batteries are characterized by a continuous decrease in voltage as their charge level decreases. To prevent over-discharge from damaging the battery, both the power management chip and the battery's "battery protection board" circuitry will cut off power supply when the voltage drops to a threshold value; for example, a 4.2V battery is set with a power-off threshold voltage of approximately 2.7V to 3.0V.
[0037] However, in embedded devices, the main control chip requires a battery voltage of at least 3.3V for normal operation. During normal use, embedded devices do not allow the voltage to drop to 3.3V before shutting down; instead, they maintain a certain voltage margin (this can be called a reserved voltage margin). The reason for this is that in power-intensive scenarios, a low battery voltage can be momentarily pulled down by a high load. For example, if the speaker volume is turned up to maximum when the battery is low, the 3.3V voltage can be observed to drop rapidly to below 3.0V, causing the embedded device to enter an abnormal state and trigger a restart. A similar situation occurs during the startup phase when the Wi-Fi chip performs RF parameter self-calibration; if the battery voltage is insufficient, it will also be rapidly pulled down, causing the embedded device to restart.
[0038] By reserving a certain voltage margin, voltage drops under high load conditions can be avoided, but the voltage drop caused by battery self-discharge cannot be prevented. Self-discharge is another characteristic of batteries, referring to the continuous loss of charge even when the battery is idle, until it is completely depleted. In practical applications, battery Ongoing Reliability Test (ORT) reports provide "charge retention" data, which can be converted into self-discharge rate.
[0039] Therefore, if an embedded device is left idle for an extended period, battery self-discharge will cause the battery voltage to drop to a low level. If the battery voltage self-discharges to near the power-off threshold voltage, the embedded device will be completely unable to power on. If the battery voltage self-discharges to near the normal operating voltage of 3.3V, the embedded device can power on. However, as power consumption increases rapidly during the power-on process, the battery voltage will be pulled down below 3.3V. At this point, the embedded device will enter an abnormal state and restart after a failed startup.
[0040] As those skilled in the art will recognize, the boot process of an embedded device can include five stages: BL1, BL2, BL31, BL33 (Uboot), and the Kernel (operating system kernel). BL1, BL2, BL31, and BL33 (Uboot) can be collectively referred to as the BootLoader stage. Here, BL1, BL2, and BL31 operate at a privileged level, and the executable code is strictly limited. BL33 (Uboot) and the subsequent Kernel (operating system kernel) operate at a non-privileged level, allowing the execution of business logic code. Simultaneously, during the Uboot stage, all hardware peripherals can be accessed, and the AB system boot operation can be performed.
[0041] Based on this, the applicant discovered through research that if the battery voltage is lower than the normal operating voltage of the embedded device, performing the AB system boot operation during the Uboot phase will inevitably result in an AB system boot failure. Therefore, the boot process of the embedded device can be intercepted during the Uboot phase to add a battery voltage detection operation before performing the AB system boot operation, ensuring that the battery voltage is sufficient to support the normal boot of the AB system.
[0042] The following is combined Figure 3 A method 300 for controlling device startup according to an embodiment of this disclosure is described by way of example. It is understood that the device disclosed herein can be any suitable embedded device using an AB system, such as, but not limited to, smart communication devices, smart home devices, wearable devices, and tablet computers. It is also understood that method 300 can be executed on an embedded device to control the startup of the embedded device.
[0043] like Figure 3 As shown, in step S301, method 300 can acquire the battery voltage (which can be referred to as the first voltage for distinction) before entering the Uboot stage of device startup and before performing the boot AB system startup operation of the Uboot stage. Here, method 300 can acquire one battery voltage as the first voltage, or it can acquire multiple voltages and determine the average value of the multiple voltages as the first voltage. In actual operation, method 300 can acquire multiple battery voltages at preset time intervals and determine the average value of the multiple voltages as the first voltage. It is understood that those skilled in the art can select the specific value or range of the preset time interval according to actual needs, and this disclosure does not make specific limitations in this regard.
[0044] Furthermore, considering voltage fluctuations caused by battery analog-to-digital converter error (ADC), method 300 can obtain a more accurate first voltage by taking multiple measurements and filtering out abnormal fluctuation values. Specifically, method 300 can first acquire an odd number of battery voltages at preset time intervals. Then, voltages with abnormal fluctuations can be filtered out from the odd number of voltages to obtain multiple voltages without abnormal fluctuations. Then, the average value of the multiple voltages without abnormal fluctuations (for distinction, it can be called the first average value) can be determined as the first voltage. It is understood that those skilled in the art can select specific values or ranges of odd numbers according to actual needs, and this disclosure does not specifically limit this. Preferably, the odd number can be selected as 3, 5, or 7, etc.
[0045] In the disclosed scheme, the following operations can be performed to screen out voltages with abnormal fluctuations among an odd number of voltages to obtain multiple voltages without abnormal fluctuations: determining the average value of the odd number of voltages (which may be referred to as the second average value for distinction); determining the voltages with abnormal fluctuations among the odd number of voltages based on the deviation of each voltage among the odd number of voltages from the second average value; and screening out the voltages with abnormal fluctuations to obtain multiple voltages without abnormal fluctuations.
[0046] Here, based on the deviation of each voltage in the odd-numbered voltages from the second average value, the voltages exhibiting abnormal fluctuations are identified. Typically, the voltage with the largest deviation is identified as the voltage exhibiting abnormal fluctuations. Taking three voltages as an example, the voltage with the largest deviation among the three can be identified as the voltage exhibiting abnormal fluctuations, thus obtaining two voltages without abnormal fluctuations. Subsequently, the average value of these two voltages without abnormal fluctuations can be determined as the first voltage.
[0047] Next, in step S302, method 300 can determine whether the first voltage is less than a preset voltage threshold. In this disclosed scheme, to ensure that the battery voltage is sufficient to support the normal startup of the AB system, and considering that after entering the Kernel stage, a high-energy-consuming initialization process begins, which may cause the battery voltage to drop rapidly below the normal operating voltage, the preset voltage threshold can be selected to be equal to the sum of the normal operating voltage of the embedded device and the reserved voltage margin. Here, the role of the reserved voltage margin is to ensure that the battery voltage does not drop rapidly below the normal operating voltage during the execution of the high-energy-consuming initialization process, thereby avoiding battery performance degradation or device malfunction. In practical applications, those skilled in the art can select the specific value of the reserved voltage margin according to actual needs, and this disclosure does not limit this. Additionally or optionally, the reserved voltage margin can be selected as 0.1V, 0.2V, or 0.3V, etc. Therefore, those skilled in the art can determine the preset voltage threshold based on the normal operating voltage of the embedded device executing method 300 and the selected reserved voltage margin.
[0048] Finally, at step S303, method 300 may determine that the boot AB system startup operation of the Uboot stage can continue if the first voltage is greater than or equal to a preset voltage threshold.
[0049] The above combination Figure 3 A method 300 for controlling device startup is described. This method 300 can detect the battery voltage before entering the U-boot stage and performing the U-boot stage's boot AB system startup operation, and can set an appropriate preset voltage threshold. If the detected battery voltage is greater than or equal to the preset voltage threshold, it can decide to continue performing the U-boot stage's boot AB system startup operation. This ensures sufficient battery power to support the normal startup of the device's AB system, thereby avoiding AB system startup failure due to insufficient battery power and preventing the device from entering the Recovery system. This helps reduce user confusion and improves the usability of devices using AB systems.
[0050] In practical applications, if the battery voltage is lower than the normal operating voltage of the embedded device, it is insufficient to support the normal operation of the embedded device's main control chip. In this case, the main control chip will malfunction, causing the U-boot stage to fail and the device to fail to boot. To detect battery voltage lower than the normal operating voltage of the embedded device as early as possible and avoid main control chip malfunctions, method 300 can also detect the battery voltage after the BL31 stage ends and before entering the U-boot stage.
[0051] Specifically, method 300 can first execute step S304 to obtain the battery voltage at this time (for distinction, it can be referred to as the second voltage). Next, at step S305, method 300 can determine whether the second voltage is less than the normal operating voltage of the embedded device, and decide whether to execute step S306 or step S307 based on the determination result. Specifically, if the second voltage is less than the normal operating voltage of the embedded device, method 300 can execute step S306. Conversely, if the second voltage is greater than or equal to the normal operating voltage of the embedded device, method 300 can execute step S307.
[0052] In step S306, method 300 can cut off the battery's discharge path and control the device to power down, i.e., control the device to shut down its power supply. In step S307, method 300 can then enter the Uboot stage. Therefore, when the battery voltage is lower than the embedded device's normal operating voltage, the device can be promptly powered down, avoiding malfunctions of the main control chip. Simultaneously, the user will only perceive that the smart device cannot power on; simply charging the embedded device will allow it to power on normally, improving the user experience.
[0053] Next, to further enhance the user experience, method 300, when the first voltage is lower than a preset voltage threshold, does not directly control the device to shut down. Instead, it executes step S308 to output a battery depletion warning. By providing a battery depletion warning, the user is informed of the device's current battery status, enabling them to charge the device in a timely manner. This reduces the likelihood of the device being shut down without the user's knowledge of the battery status, thus providing a better user experience.
[0054] In step S308, method 300 can output a low battery warning in an audible or visual manner. For example, a low battery warning voice message can be played through the device's voice player, or a low battery icon or animation can be displayed on the device's screen to remind the user to charge the device.
[0055] After outputting a battery depletion warning, method 300 can further detect the device's power connection status to determine whether to execute step S309 or step S310 based on the power connection status. In step S309, if the device's power connection status is detected within a preset time, method 300 can continue executing the Uboot stage boot AB system startup operation. Conversely, in step S310, if the device's power connection status is not detected within the preset time, method 300 can control the device to shut down. It is understood that those skilled in the art can select a specific value or range of the preset time according to actual needs, and this disclosure does not impose specific limitations on this. In one embodiment, the preset time can be selected as a specific value such as 1 second, 1.5 seconds, or 2 seconds, or any value within the range [1s, 2s].
[0056] Next, combine Figure 4 Exemplary descriptions are provided for apparatus 400 for controlling device startup according to some embodiments of this disclosure. For example... Figure 4 As shown, the device 400 may include an acquisition module 401, a determination module 402, and an execution module 403. Specifically,
[0057] The module 401 is configured to acquire the first voltage of the battery before entering the Uboot phase of device startup and before performing the boot AB system startup operation of the Uboot phase.
[0058] The determination module 402 is configured to determine whether the first voltage is less than a preset voltage threshold, wherein the preset voltage threshold is equal to the sum of the normal operating voltage and the reserved voltage margin;
[0059] The execution module 403 is configured to continue the booting AB system startup operation of the Uboot stage if the first voltage is greater than or equal to a preset voltage threshold.
[0060] In one embodiment, the acquisition module 401 may also be configured to acquire a second voltage of the battery before entering the Uboot stage. The determination module 402 may also be configured to determine whether the second voltage is less than the normal operating voltage. The execution module 403 may also be configured to control the device to shut down the power supply if the second voltage is less than the normal operating voltage; or to enter the Uboot stage if the second voltage is greater than or equal to the normal operating voltage.
[0061] In one embodiment, the execution module 403 is further configured to output a battery depletion warning when the first voltage is less than a preset voltage threshold; and to continue performing the Uboot stage boot AB system startup operation in response to detecting the power connection status of the device within a preset time period; or to control the device to shut down the power in response to not detecting the power connection status of the device within a preset time period.
[0062] In one embodiment, when the acquisition module 401 acquires the first voltage of the battery, it can be configured to perform the following operations: acquire an odd number of voltages of the battery at a preset time interval; filter out voltages with abnormal fluctuations among the odd number of voltages to obtain multiple voltages without abnormal fluctuations; and determine the first average value of the multiple voltages without abnormal fluctuations as the first voltage.
[0063] In one embodiment, when the acquisition module 401 filters out voltages with abnormal jitter from an odd number of voltages to obtain a plurality of voltages without abnormal jitter, it can be configured to perform the following operations: determine a second average value of the odd number of voltages; determine voltages with abnormal jitter from the odd number of voltages based on the deviation of each voltage in the odd number of voltages from the second average value; and filter out voltages with abnormal jitter to obtain a plurality of voltages without abnormal jitter.
[0064] The above combination Figure 4 This disclosure describes an apparatus for controlling device startup that can be used to perform the functions disclosed herein. It should be understood that the apparatus structure or architecture described herein is merely exemplary, and the implementation methods and entities of this application are not limited thereto, but can be modified without departing from the spirit of this application. It is understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, while their similarities or corresponding parts can be referred to mutually. For the sake of brevity, this disclosure will not elaborate on each one.
[0065] Next, combine Figure 5 An exemplary description of an electronic device 500 provided in this disclosure embodiment is given. For example... Figure 5 As shown, the electronic device 500 of this embodiment may include a processor 501, a memory 502, and a communication bus 503.
[0066] In specific embodiments, the processor 501 described above can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), CPU, controller, microcontroller, and microprocessor. It is understood that for different devices, the electronic device used to implement the above processor function can also be other types, and this embodiment does not specifically limit it.
[0067] In this disclosed embodiment, the communication bus 503 is used to realize the connection and communication between the processor 501 and the memory 502; the memory 502 stores program instructions for controlling the device startup; when the processor 501 executes the program instructions stored in the memory 502, it implements the present disclosure in conjunction with the appendix. Figure 3 The method described is for controlling the startup of a device.
[0068] The above combination Figure 5 This disclosure describes an electronic device that can be used to control the startup of a device. It should be understood that the device structure or architecture described herein is merely exemplary, and the implementation methods and entities of this application are not limited thereto, but can be modified without departing from the spirit of this application. It is understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, while their similarities or corresponding parts can be referred to mutually. For the sake of brevity, this disclosure will not elaborate on each one.
[0069] Based on the foregoing description in conjunction with the accompanying drawings, those skilled in the art will understand that the embodiments of this application can also be implemented by software programs. Therefore, this application also provides a computer-readable storage medium. This computer-readable storage medium stores program instructions for controlling the startup of a device, which can be used to implement the present disclosure in conjunction with the accompanying drawings. Figure 3 The method described is for controlling the startup of a device.
[0070] It should be noted that although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0071] While numerous embodiments of this disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and intent of this disclosure. It should be understood that various alternatives to the embodiments of this disclosure described herein may be employed in the practice of this disclosure. The appended claims are intended to define the scope of this disclosure and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for controlling the start-up of a device, comprising: Before entering the Uboot phase of device startup and performing the boot AB system startup operation of the Uboot phase, the first voltage of the battery is obtained; Determine whether the first voltage is less than a preset voltage threshold, wherein the preset voltage threshold is equal to the sum of the normal operating voltage and the reserved voltage margin; as well as If the first voltage is greater than or equal to the preset voltage threshold, the boot AB system startup operation of the Uboot stage will continue to be executed; If the first voltage is less than the preset voltage threshold, a battery depletion warning will be output. as well as In response to the detection of the device's power connection status within a preset time period, the boot AB system startup operation of the Uboot phase continues to be executed; The process of obtaining the first voltage of the battery includes: obtaining the first voltage by measuring multiple times and filtering out abnormal fluctuation values, specifically including determining the average value of multiple voltages without abnormal fluctuations as the first voltage.
2. The method according to claim 1, further comprising: Before entering the Uboot stage, obtain the second voltage of the battery; Determine whether the second voltage is less than the normal operating voltage; If the second voltage is lower than the normal operating voltage, the control device will shut off the power. as well as When the second voltage is greater than or equal to the normal operating voltage, the Uboot phase is entered.
3. The method according to claim 1 or 2, wherein, Obtaining the first voltage of the battery includes: Obtain an odd number of battery voltages at preset time intervals; Voltages exhibiting abnormal fluctuations are filtered out from the odd number of voltages to obtain a plurality of voltages without abnormal fluctuations; and The first average value of the multiple voltages that do not exhibit abnormal fluctuations is determined as the first voltage.
4. The method according to claim 3, wherein, Removing voltages with abnormal fluctuations from the odd number of voltages to obtain a plurality of voltages without abnormal fluctuations includes: Determine the second average value of the odd number of voltages; Based on the deviation of each of the odd-numbered voltages from the second average value, voltages exhibiting abnormal fluctuations are determined among the odd-numbered voltages; and The voltages exhibiting abnormal fluctuations are filtered out to obtain a plurality of voltages that do not exhibit abnormal fluctuations.
5. The method according to claim 1, further comprising: In response to the fact that no power connection status of the device is detected within a preset time period, the device is controlled to turn off its power.
6. An apparatus for controlling the start-up of equipment, comprising: The acquisition module is configured to acquire the first voltage of the battery before entering the Uboot phase of device startup and before performing the boot AB system startup operation of the Uboot phase; A determination module is configured to determine whether the first voltage is less than a preset voltage threshold, wherein the preset voltage threshold is equal to the sum of the normal operating voltage and the reserved voltage margin; as well as An execution module configured to continue executing the boot AB system startup operation of the Uboot phase when the first voltage is greater than or equal to the preset voltage threshold; The execution module is also configured to output a battery depletion warning when the first voltage is less than the preset voltage threshold. as well as In response to the detection of the device's power connection status within a preset time period, the boot AB system startup operation of the Uboot phase continues to be executed; When the acquisition module acquires the first voltage of the battery, it is configured to perform the following operations: acquire the first voltage by measuring multiple times and filtering out abnormal fluctuation values, specifically including determining the average value of multiple voltages without abnormal fluctuations as the first voltage.
7. An electronic device, comprising: processor; And a memory storing program instructions for controlling the startup of the device, which, when executed by the processor, cause the electronic device to perform the method according to any one of claims 1-5.
8. A computer-readable storage medium storing program instructions for controlling the startup of a device, wherein when the program instructions are executed by a processor, the method according to any one of claims 1-5 is implemented.
Citation Information
Patent Citations
Control system of sports equipment carrying intelligent display screen and starting method of control system
CN113663313A