Power supply starting optimization method and device, storage medium and controller
By saving key power information and device data in embedded devices and using these data directly to quickly start after power outage or restart, the problem of long equipment startup time in the prior art is solved, and a faster and more reliable device startup is achieved.
Patent Information
- Application Number
- CN202411949314.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-11
AI Technical Summary
The prior art requires complete equipment initialization after the embedded device is powered off or restarted, resulting in a long startup time and it is difficult to meet application scenarios with high requirements for real-time performance.
By obtaining the key power information of the embedded device initialized under normal power supply conditions, and saving the current device data to the battery backup random memory, using this data to quickly start after power outage or restart, avoiding the complete initialization process.
It significantly reduces the startup time of embedded devices, meets application scenarios with high requirements for real-time performance, and improves the reliability and operation stability of the device.
Smart Images

Figure CN119806011A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power management technology, and in particular to a power startup optimization method, device, storage medium and controller. Background Art
[0002] Embedded systems play an important role in industrial control, automotive electronics, and the Internet of Things. Their fast response and stable operation are crucial to device performance. However, such systems are often affected by power outages and power fluctuations, especially in low-power and battery-powered scenarios. These problems are more prominent and directly related to the actual application effect of the device.
[0003] At present, most embedded systems require complete device initialization after power failure or restart, including hardware self-test, system loading, and configuration of functional modules. Although this traditional process ensures the consistency and stability of the system, the startup time is long and it is difficult to meet application scenarios with high real-time requirements. For example, in industrial production, the restart delay of control equipment may cause the production line to stagnate; in the field of automotive electronics, if the vehicle system cannot resume operation in time, it will affect the driving experience and safety. In addition, frequent restarts caused by power supply fluctuations will further increase the system startup time and drag down the overall availability of the equipment. Therefore, how to efficiently start the device after power restoration has become an important issue that needs to be solved in embedded systems. Summary of the invention
[0004] The purpose of the present application is to solve at least one of the above-mentioned technical deficiencies, especially the technical deficiencies in the prior art of how to efficiently start embedded devices after power restoration.
[0005] In a first aspect, the present application provides a power startup optimization method, the method comprising:
[0006] Obtain key power information of the embedded device after initialization under normal power supply conditions, and save the current device data of the embedded device as the latest device data to the battery backup random access memory, where the latest device data includes the key power information;
[0007] When the embedded device is restarted or powered on again after power failure, the startup power supply of the embedded device is verified according to the key power supply information in the battery backup random access memory;
[0008] If the startup power supply of the embedded device is successfully verified, the successfully verified startup power supply is used to start the embedded device according to the latest device data in the battery backup random access memory.
[0009] In one embodiment, the step of saving the current device data of the embedded device as the latest device data to the battery backup random access memory includes:
[0010] After the current device data is used as the latest device data, the latest device data is used to overwrite the historical device data in the battery backup random access memory.
[0011] In one embodiment, the step of verifying the startup power supply of the embedded device according to the key power supply information in the battery backup random access memory includes:
[0012] The power status information of the startup power of the embedded device is obtained. If the power status information matches the key power information in the battery backup random access memory, the startup power verification of the embedded device is successful.
[0013] In one embodiment, the step of verifying the startup power supply of the embedded device according to the key power supply information in the battery backup random access memory further includes:
[0014] If the embedded device has multiple startup power supplies, determine the priority of each startup power supply in the embedded device;
[0015] In descending order of priority of each startup power source in the embedded device, the power state information of each startup power source in the embedded device is compared with the key power source information in the battery backup random access memory in turn;
[0016] When there is a startup power source whose power status information matches the key power source information, the startup power source verification of the embedded device succeeds.
[0017] In one embodiment, the steps of starting the embedded device using a successfully verified startup power supply according to the latest device data in the battery backup random access memory include:
[0018] According to the power state information of the successfully verified startup power source, a first startup operation mode corresponding to the successfully verified startup power source is determined, and in the first startup operation mode, the embedded device is started according to the latest device data in the battery backup random access memory.
[0019] In one embodiment, the method further comprises:
[0020] If the startup power supply verification of the embedded device fails, the startup power supply of the embedded device is initialized;
[0021] Determine a second startup operation mode corresponding to the initialized power information, and start the embedded device according to the second startup operation mode.
[0022] In one embodiment, the method further comprises:
[0023] If the embedded device has multiple startup power supplies and the startup power supply verification of the embedded device fails, the priority of each startup power supply in the embedded device is determined, and the startup power supplies that meet the startup conditions of the embedded device are initialized in order from high to low priority of each startup power supply in the embedded device.
[0024] In a second aspect, the present application provides a power startup optimization device, the device comprising:
[0025] The device data saving module is used to obtain the key power information of the embedded device after initialization under normal power supply conditions, and save the current device data of the embedded device as the latest device data to the battery backup random access memory, where the latest device data includes the key power information;
[0026] The startup power verification module is used to verify the startup power of the embedded device according to the key power information in the battery backup random access memory when the embedded device is restarted or powered on again after power failure;
[0027] The embedded device startup module is used to start the embedded device according to the latest device data in the battery backup random access memory by using the successfully verified startup power supply if the startup power supply of the embedded device is successfully verified.
[0028] In a third aspect, the present application provides a storage medium: the storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of any power startup optimization method in the above-mentioned embodiments.
[0029] In a fourth aspect, the present application provides a controller, comprising: one or more processors, and a memory;
[0030] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the steps of the power startup optimization method in any one of the above embodiments are executed.
[0031] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0032] In the power startup optimization method, device, storage medium and controller provided in the present application, by saving the latest device data in the battery backup random access memory, the latest device data saved can be used to complete the startup directly after the embedded device is powered off or restarted, without the need for a complete initialization process, thereby significantly reducing the startup time and meeting the needs of application scenarios with high real-time requirements; and when powering on again after restarting or power outage, the correctness of the power state is ensured by checking the startup power supply, reducing startup failures caused by power supply abnormalities, and improving the reliability of the operation of the embedded device. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0034] Figure 1 A schematic diagram of a flow chart of a power startup optimization method provided in an embodiment of the present application;
[0035] Figure 2 A schematic diagram of the structure of a power startup optimization device provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of the internal structure of a controller provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] The present application provides a power startup optimization method. The following embodiments are described by taking the method applied to a controller as an example. It can be understood that the controller can be any device with control and monitoring functions, including but not limited to a power control module, an embedded microcontroller, etc. Figure 1 As shown, the method may include the following steps:
[0039] S101: Acquire key power information of the embedded device after initialization under normal power supply conditions, and save current device data of the embedded device as the latest device data to the battery backup random access memory, where the latest device data includes the key power information.
[0040] Among them, embedded devices refer to small computer systems designed for specific tasks or functions, embedded in larger devices, and used to perform specific functions, such as sensor control, industrial control, automotive electronics, etc. Power information describes the data of the current power supply status of embedded devices. Battery backup random access memory is a memory that maintains data through internal integrated battery power supply, such as BBRAM, and the data in it is still available even if the device is powered off. It is often used to save the key status or configuration of the device. The latest device data is an important data set generated during the operation of the embedded device, which is used to describe the current status, configuration, operation progress and power information of the device, such as software data and hardware data. Key power information refers to the core data directly related to the power supply status of the embedded device, including voltage, current and register status.
[0041] In this step, after the embedded device is initialized, the controller can collect the power status through the integrated power management module or power sensing circuit. For example, read the voltage and current sensor signals of the power input, or check the power mode flag, such as main power supply, battery power supply, USB power supply, etc. The controller can also communicate with the power management integrated circuit through the I2C protocol to monitor the power status of the device in real time, or read the power supply voltage value through the ADC module.
[0042] The controller saves the collected power information and other key status data, such as operating parameters and configuration data, to the battery-backed random access memory through specific write instructions. For example, the non-volatile storage interface function provided by the embedded operating system is used, or a large amount of data is quickly saved through the direct memory access module. In industrial controllers, the saved device data can also include sensor calibration values, network configuration data, etc.
[0043] Furthermore, in order to ensure the reliability of the embedded device after restart, it is necessary to avoid saving the device data generated by the embedded device in the abnormal operating mode to the battery backup random access memory. The abnormal operating mode of the embedded device is a state in which the embedded device is forced to operate under abnormal power supply conditions to ensure basic functions or avoid device damage. The abnormal operating mode is mainly an emergency protection mechanism. The state and data of the device in the abnormal mode cannot be guaranteed to be complete and correct, and are not suitable as a basis for restart. Avoiding saving device data in the abnormal mode can ensure that the embedded device runs in a reliable state when it restarts, avoiding errors or risks caused by inheriting the abnormal state.
[0044] It is understood that it is necessary to ensure that the device obtains and saves key power information and device data under normal power supply conditions, and avoid saving wrong data or performing wrong operations under abnormal power supply conditions. Using battery-backed random access memory to save device data can maintain data integrity after power failure.
[0045] S102: When the embedded device is restarted or powered on again after power failure, the startup power supply of the embedded device is verified according to the key power supply information in the battery backup random access memory.
[0046] In this step, the controller first reads the previously saved power information from the battery backup random access memory. For example, the data in the backup memory is accessed through the embedded storage interface, and the voltage, current, and register status of the device are obtained from the backup data. The controller can also extract key power information by reading a specific memory area, such as a specific offset address in the BBRAM.
[0047] The controller verifies whether the current power status of the device meets the expected startup conditions based on the key power information read from the battery backup memory. For example, it determines whether the voltage, current, and register status of the current power supply are different from the corresponding voltage, current, and register status saved in the key power information. If there is no difference, the controller will send a signal to trigger the embedded device to start; if the power information does not meet the requirements, the controller may enter the protection mode to avoid incorrect startup. The controller can also perform a quick power test before starting to confirm whether the voltage is stable and whether the power line is connected normally, and then decide whether to continue starting the device.
[0048] It can be understood that the saved power information can help the controller accurately determine the working environment of the device and avoid potential failures caused by inconsistent power status. Verifying the startup power can ensure that the device is in a suitable state for operation after power is restored, preventing the device from failing to start or unstable operation due to power failure or abnormality. In addition, by verifying the power status in advance, the controller can quickly determine whether it can start normally, thereby shortening the time from power failure to recovery of the device.
[0049] S103: If the startup power supply of the embedded device is successfully verified, the successfully verified startup power supply is used to start the embedded device according to the latest device data in the battery backup random access memory.
[0050] In this step, after the verification is passed, the controller can mark the power state as valid and allow the device to start. After the startup power verification is successful, the controller reads the device data stored in the battery backup memory. Among them, the backed-up data, such as sensor calibration values, network configuration, the last working status, etc., can be read through the memory interface to ensure that the recovery process uses the latest device status. Finally, the controller starts the embedded device according to the restored power configuration and device status, restores all functions of the device, and ensures that the device can enter a normal working state.
[0051] It is understandable that the purpose of using a successfully verified startup power supply is to ensure that the power supply used by the device at startup is stable and meets the device operation requirements. Only after the power supply verification is successful can it be possible to ensure that the device will not have abnormal power supply and avoid startup failure or hardware damage due to unstable voltage. Starting the device based on the latest device data in the battery backup memory can ensure that the device can quickly return to the correct working state after recovery and reduce the initialization time when the device is started. By retaining key data, it is possible to avoid initializing all device parameters from scratch.
[0052] In the above embodiment, by saving the latest device data in the battery backup random access memory, the latest device data saved can be used to complete the startup directly after the embedded device is powered off or restarted, without the need for a complete initialization process, thereby significantly reducing the startup time and meeting the needs of application scenarios with high real-time requirements; and when powering on again after restarting or power outage, the correctness of the power supply status is ensured by checking the startup power supply, reducing startup failures caused by power supply abnormalities, and improving the reliability of the operation of the embedded device.
[0053] In one embodiment, the step of saving the current device data of the embedded device as the latest device data to the battery backup random access memory includes:
[0054] After the current device data is used as the latest device data, the latest device data is used to overwrite the historical device data in the battery backup random access memory.
[0055] Specifically, the controller obtains the current device data from the device's running memory, such as the operating mode, power information, and functional module configuration. The controller structures this data to ensure data integrity and consistency. The processed data is marked as "latest device data", and then the current device data is written to the memory through the interface of the battery backup random access memory. During the writing process, the controller ensures that only the latest device data is retained in the memory by erasing the old data and overwriting the new data. For example, in an automotive electronic system, the controller saves the current device data, such as the navigation system status and air conditioning settings, before the vehicle is turned off, and overwrites the old data with this data so that it can quickly restore to the configuration the driver is accustomed to when it is started next time.
[0056] In this embodiment, by overwriting historical device data, the controller ensures that the data in the memory is always up-to-date and valid, avoiding the interference of subsequent device restarts due to outdated or invalid historical data. The capacity of random access memory is usually limited, and overwriting old data can avoid the accumulation of redundant data, thereby efficiently utilizing storage space.
[0057] In one embodiment, the step of verifying the startup power supply of the embedded device according to the key power supply information in the battery backup random access memory includes:
[0058] The power status information of the startup power of the embedded device is obtained. If the power status information matches the key power information in the battery backup random access memory, the startup power verification of the embedded device is successful.
[0059] Specifically, the controller can obtain the current device power status information from the power management module or power monitoring chip, such as voltage, current, register status and other parameters. After that, the controller reads the key power information from the battery backup random access memory, compares the currently obtained power status information with the stored key power information, and determines whether the current power meets the preset requirements, such as voltage range, current stability, etc. If the two match, the verification is successful; otherwise, the verification fails. If the verification is successful, the controller will continue to execute the startup process according to the key power information, and the startup power is normal, and the device can continue to start.
[0060] In this embodiment, unstable or non-compliant power parameters may cause the device to fail to start normally. By checking the power status information of the startup power supply, the controller can confirm that the power condition is appropriate before the device starts, thereby avoiding startup failure caused by insufficient or unstable power supply.
[0061] In one embodiment, the step of verifying the startup power supply of the embedded device according to the key power supply information in the battery backup random access memory further includes:
[0062] If the embedded device has multiple startup power supplies, determine the priority of each startup power supply in the embedded device;
[0063] In descending order of priority of each startup power source in the embedded device, the power state information of each startup power source in the embedded device is compared with the key power source information in the battery backup random access memory in turn;
[0064] When there is a startup power source whose power status information matches the key power source information, the startup power source verification of the embedded device succeeds.
[0065] Specifically, the controller first sets the priority of each startup power supply according to the design requirements and application scenarios of the embedded device. For example, the main power supply takes precedence over the backup power supply, and the backup power supply takes precedence over the battery power supply. In the firmware or configuration file of the controller, a priority list of startup power supplies is established, and each power supply is arranged from high to low. The controller checks each startup power supply in turn from high to low according to the preset priority order. For each startup power supply, the controller reads the power status information. The read power status information is compared with the key power information stored in the battery backup random access memory to determine whether it matches. If the power status information of a startup power supply matches the key power information, the power supply is recorded as a qualified startup power supply, and further comparison is stopped. During the comparison process, once it is found that the power status information of a startup power supply meets the key power information, the verification is determined to be successful. The controller starts the normal operation process of the embedded device based on the result of the successful verification.
[0066] In this embodiment, by setting the priority of the startup power supply, the controller can give priority to the power supply with more stable performance and higher efficiency to ensure that the device operates under the best conditions. By comparing the power status information of each startup power supply in sequence, the controller can flexibly respond to different power supply conditions, ensure stable startup in a multi-power supply environment, and avoid unnecessary power supply switching and frequent power supply detection, saving embedded device resources and energy.
[0067] In one embodiment, the steps of starting the embedded device using the successfully verified startup power supply according to the latest device data in the battery backup random access memory include:
[0068] According to the power state information of the successfully verified startup power source, a first startup operation mode corresponding to the successfully verified startup power source is determined, and in the first startup operation mode, the embedded device is started according to the latest device data in the battery backup random access memory.
[0069] Specifically, the controller first reads the power status information of the successfully verified startup power supply, and determines the first startup operation mode adapted by the power supply based on the power status information. For example: when the voltage and power meet the high power consumption requirements of the device, select the high power consumption mode; if the power supply is in a low power state, select the low power consumption mode. After that, the controller reads the latest device data from the battery backup random access memory, including device configuration, operation mode, and power information. According to the first startup operation mode, configure the working state of the embedded device, such as enabling high power consumption or low power consumption mode. The controller starts the device according to the configuration, performs hardware and software initialization, and ensures the normal operation of the device.
[0070] In this embodiment, checking the startup power supply and determining the appropriate operating mode helps to select the operating mode that best meets the device requirements according to the actual power supply conditions, thereby avoiding unnecessary waste of resources. For example, when the power supply is sufficient, the device can operate in a high power consumption mode to provide more computing resources; when the power supply is insufficient, it can switch to a low power consumption mode to extend the operating time of the device. By reading the latest device data from the battery backup random access memory and starting the device, the controller ensures that the device can accurately restore to the previous working state when it starts, without the need for reconfiguration and initialization, thereby improving the startup speed and stability of the embedded device. At the same time, the ability to select the appropriate operating mode according to different power supply conditions allows the device to adapt to different working environments more flexibly, thereby improving the adaptability and efficiency of the device.
[0071] In one embodiment, the method further comprises:
[0072] If the startup power supply verification of the embedded device fails, the startup power supply of the embedded device is initialized;
[0073] Determine a second startup operation mode corresponding to the initialized power information, and start the embedded device according to the second startup operation mode.
[0074] Specifically, when the startup power supply verification of the embedded device fails, that is, the startup power supply of the embedded device does not meet the key power supply information in the battery backup random access memory, the controller obtains the status and parameters of the current startup power supply, confirms the conditions required for initialization, and reconfigures the parameters of the power module to ensure stable power output. The controller reads the latest power supply parameters of the power supply after initialization, matches the power supply information with the requirements of each operating mode of the device, and determines the appropriate second startup operating mode. For example, if the power supply parameters meet the high-performance operation requirements, select the optimal operating mode; if the power supply parameters can only support low-power operation, select the low-power operating mode. Update the current operating mode variable of the device so that the subsequent startup process is executed according to this mode. According to the startup operating mode, the controller loads the corresponding device configuration file, starts the core functional module of the device, and ensures that the key tasks in the operating mode are run first. After the device completes the startup process, it enters the specified operating mode and provides services to the outside.
[0075] In this embodiment, different power supply conditions are suitable for different operating modes. By determining the startup operating mode corresponding to the power supply information, the controller can avoid instability or abnormality of the device due to mismatch between the operating mode and the power supply.
[0076] In one embodiment, the method further comprises:
[0077] If the embedded device has multiple startup power supplies and the startup power supply verification of the embedded device fails, the priority of each startup power supply in the embedded device is determined, and the startup power supplies that meet the startup conditions of the embedded device are initialized in order from high to low priority of each startup power supply in the embedded device.
[0078] Specifically, when multiple startup power supplies of an embedded device fail to be verified, the priority of each startup power supply in the embedded device is determined, either by directly obtaining a preset priority or by marking the priority of each startup power supply according to a preset priority rule. The controller checks the power supply status one by one from the priority list and screens the power supplies that meet the device startup conditions. For example, the supply voltage must be within the device startup voltage range, or the supply current must meet the device's minimum startup requirement. Afterwards, the startup power supply that meets the conditions is initialized, such as resetting the output status of the power module, such as adjusting the voltage, clearing the cache, etc., to activate the power supply mode so that it provides a stable output for device startup.
[0079] In this embodiment, when the startup power supply verification fails, the success rate of device startup can be greatly improved by screening and initializing the power supplies that meet the startup conditions one by one. By screening the power supplies that meet the startup conditions and then initializing them, it is avoided to waste time and resources on the power supplies that obviously do not meet the conditions.
[0080] The power startup optimization device provided by the embodiment of the present application is described below. The power startup optimization device described below and the power startup optimization method described above can be referred to in correspondence with each other. Figure 2 The present application provides a power startup optimization device, the device comprising:
[0081] The device data saving module 201 is used to obtain the key power information of the embedded device after initialization under normal power supply conditions, and save the current device data of the embedded device as the latest device data to the battery backup random access memory, where the latest device data includes the key power information;
[0082] The startup power verification module 202 is used to verify the startup power of the embedded device according to the key power information in the battery backup random access memory when the embedded device is restarted or powered on again after power failure;
[0083] The embedded device startup module 203 is used to start the embedded device using the successfully verified startup power supply according to the latest device data in the battery backup random access memory if the startup power supply of the embedded device is successfully verified.
[0084] In one embodiment, the device data storage module 201 includes:
[0085] The device data storage unit is used to use the current device data as the latest device data and then overwrite the historical device data with the latest device data in the battery backup random access memory.
[0086] In one embodiment, the startup power supply verification module 202 includes:
[0087] The first startup power verification unit is used to obtain power status information of the startup power of the embedded device. If the power status information matches the key power information in the battery backup random access memory, the startup power verification of the embedded device is successful.
[0088] In one embodiment, the startup power supply verification module 202 further includes:
[0089] A priority determination unit, used to determine the priority of each startup power supply in the embedded device if there are multiple startup power supplies in the embedded device;
[0090] A parameter comparison unit, used to compare the power state information of each startup power supply in the embedded device with the key power supply information in the battery backup random access memory in order from high to low priority of each startup power supply in the embedded device;
[0091] The second startup power supply verification unit is used to verify that the startup power supply of the embedded device is successful when there is a startup power supply whose power supply status information conforms to the key power supply information.
[0092] In one embodiment, the embedded device startup module 203 includes:
[0093] The embedded device startup unit is used to determine the first startup operation mode corresponding to the successfully verified startup power supply according to the power status information of the successfully verified startup power supply, and in the first startup operation mode, start the embedded device according to the latest device data in the battery backup random access memory.
[0094] In one embodiment, the apparatus further comprises:
[0095] A first startup power initialization module, used for initializing the startup power of the embedded device if the startup power verification of the embedded device fails;
[0096] The startup operation mode determination module is used to determine the second startup operation mode corresponding to the initialized power supply information, and start the embedded device according to the second startup operation mode.
[0097] In one embodiment, the apparatus further comprises:
[0098] The second startup power initialization module is used to determine the priority of each startup power supply in the embedded device if the embedded device has multiple startup power supplies and the startup power supply verification of the embedded device fails, and initialize the startup power supplies that meet the startup conditions of the embedded device in order from high to low priority of each startup power supply in the embedded device.
[0099] In one embodiment, the present application also provides a storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the power startup optimization method described in any of the above embodiments.
[0100] In one embodiment, the present application also provides a controller storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the power startup optimization method as described in any of the above embodiments.
[0101] Indicatively, Figure 3 As shown, Figure 3 This is a schematic diagram of the internal structure of a controller provided in an embodiment of the present application. The controller 300 may be provided as a server. Figure 3 , the controller 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by a memory 301, for storing instructions executable by the processing component 302, such as an application. The application stored in the memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the power startup optimization method of any of the above embodiments.
[0102] The controller 300 may further include a power supply component 303 configured to perform power management of the controller 300, a wired or wireless network interface 304 configured to connect the controller 300 to a network, and an input / output (I / O) interface 305. The controller 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, MacOS XTM, Unix TM, Linux TM, Free BSD TM, or the like.
[0103] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the controller to which the scheme of the present application is applied. The specific controller may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0104] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. Herein, "one", "one", "said", "the" and "it" may also include plural forms, unless the context clearly indicates another way. A plurality refers to at least two cases, such as 2, 3, 5 or 8, etc. "And / or" includes any and all combinations of the relevant listed items.
[0105] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0106] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A power startup optimization method, characterized in that: The method comprises: Acquire key power information of the embedded device after initialization under normal power supply conditions, and save the current device data of the embedded device as the latest device data to the battery backup random access memory, wherein the latest device data includes the key power information; When the embedded device is restarted or powered on again after power failure, the startup power supply of the embedded device is verified according to the key power supply information in the battery backup random access memory; If the startup power supply of the embedded device is successfully verified, the successfully verified startup power supply is used to start the embedded device according to the latest device data in the battery backup random access memory.
2. The power startup optimization method according to claim 1, characterized in that: The step of saving the current device data of the embedded device as the latest device data to the battery backup random access memory comprises: After the current device data is used as the latest device data, the latest device data is used to overwrite the historical device data in the battery backup random access memory.
3. The power startup optimization method according to claim 1, characterized in that: The step of verifying the startup power supply of the embedded device according to the key power supply information in the battery backup random access memory includes: The power status information of the startup power supply of the embedded device is obtained. If the power status information matches the key power information in the battery backup random access memory, the startup power supply verification of the embedded device is successful.
4. The power startup optimization method according to claim 3, characterized in that: The step of verifying the startup power supply of the embedded device according to the key power supply information in the battery backup random access memory also includes: If the embedded device has multiple startup power supplies, determining the priority of each startup power supply in the embedded device; Comparing the power state information of each startup power supply in the embedded device with the key power supply information in the battery backup random access memory in order from high to low priority of each startup power supply in the embedded device; When there is a startup power source whose power state information conforms to the key power source information, the startup power source verification of the embedded device succeeds.
5. The power startup optimization method according to claim 1, characterized in that: The step of using the successfully verified startup power supply to start the embedded device according to the latest device data in the battery backup random access memory comprises: According to the power status information of the successfully verified startup power supply, a first startup operation mode corresponding to the successfully verified startup power supply is determined, and in the first startup operation mode, the embedded device is started according to the latest device data in the battery backup random access memory.
6. The power startup optimization method according to claim 1, characterized in that: The method further comprises: If the startup power supply verification of the embedded device fails, initializing the startup power supply of the embedded device; Determine a second startup operation mode corresponding to the initialized power information, and start the embedded device according to the second startup operation mode.
7. The power startup optimization method according to claim 6, characterized in that: The method further comprises: If the embedded device has multiple startup power supplies and the startup power supply verification of the embedded device fails, the priority of each startup power supply in the embedded device is determined, and the startup power supplies that meet the startup conditions of the embedded device are initialized in order from high to low priority of each startup power supply in the embedded device.
8. A power startup optimization device, characterized in that: The device comprises: A device data saving module, used to obtain key power information of the embedded device after initialization under normal power supply conditions, and save the current device data of the embedded device as the latest device data to the battery backup random access memory, wherein the latest device data includes the key power information; A startup power supply verification module, used to verify the startup power supply of the embedded device according to the key power supply information in the battery backup random access memory when the embedded device is restarted or powered on again after power failure; The embedded device startup module is used to use the successfully verified startup power supply to start the embedded device according to the latest device data in the battery backup random access memory if the startup power supply of the embedded device is successfully verified.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the power startup optimization method as described in any one of claims 1 to 7.
10. A controller, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the power startup optimization method according to any one of claims 1 to 7 are performed.