Electronic device booting method and apparatus, electronic device, and medium

By updating sensor information during the power-on process of electronic devices, the problem of initialization failure caused by sensor damage or disabling is solved, and a fast and reliable power-on process is achieved.

CN122431738APending Publication Date: 2026-07-21BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2025-01-21
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Electronic devices may fail to boot up in a timely manner due to sensor damage or disabling during the power-on process. Existing technologies increase the processor load and consume time by deleting and generating sensor lists.

Method used

During the power-on process, available sensor information is acquired and preset sensor information is updated. By matching the available sensor information with the preset sensor information during the next power-on process, the frequent deletion and generation of the sensor list are avoided, and the electronic device is powered on directly.

Benefits of technology

It reduces the power-on time of electronic devices, improves power-on reliability and efficiency, and avoids processor burden and time consumption caused by sensor list operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431738A_ABST
    Figure CN122431738A_ABST
Patent Text Reader

Abstract

The present disclosure relates to an electronic device booting method, device, electronic device and medium. The electronic device booting method comprises: in response to a booting instruction of an electronic device, obtaining available sensor information, the available sensor information comprising information of sensors initialized in the current booting process of the electronic device; updating preset sensor information with the available sensor information, the preset sensor information comprising information of sensors initialized in historical booting processes of the electronic device; and booting the electronic device after a preset time. By updating the preset sensor information with the available sensor information, the available sensor information is matched with the preset sensor information in the next booting process without waiting for the preset time, thereby reducing the booting time of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic equipment technology, and in particular to a method, apparatus, electronic equipment, and medium for powering on an electronic device. Background Technology

[0002] With the widespread use of electronic devices, they have become indispensable in people's daily lives, often requiring frequent power-on and power-off cycles. However, the time required to power on electronic devices can lead to issues with timely power-on. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides a method, apparatus, electronic device, and medium for powering on an electronic device.

[0004] According to a first aspect of the present disclosure, a method for powering on an electronic device is provided, the method comprising:

[0005] In response to a power-on command from an electronic device, available sensor information is acquired, including information about sensors that have been initialized during the current power-on process.

[0006] The preset sensor information is updated with the available sensor information, and the electronic device is powered on after a preset time. The preset sensor information includes information about the sensors that were initialized during the historical power-on process of the electronic device.

[0007] In some embodiments of this disclosure, before acquiring available sensor information, the method for powering on the electronic device further includes:

[0008] The preset sensor information is updated with the target sensor information;

[0009] The step of updating the preset sensor information with the available sensor information includes:

[0010] If the preset sensor information includes first sensor information other than the available sensor information, then the target sensor information is updated with the available sensor information;

[0011] If the available sensor information includes second sensor information other than the preset sensor information, then the preset sensor information is updated with the available sensor information.

[0012] In some embodiments of this disclosure, the preset sensor information is located in a first sensor list, and the target sensor information is located in a second sensor list.

[0013] In some embodiments of this disclosure, updating the target sensor information with the available sensor information includes:

[0014] The available sensor information is used to overwrite the target sensor information in the second sensor list; and / or,

[0015] The step of updating the preset sensor information with the available sensor information includes:

[0016] Add the second sensor information to the first sensor list.

[0017] In some embodiments of this disclosure, the method for powering on the electronic device further includes:

[0018] Add the first sensor information to the third sensor list; and / or,

[0019] Add the information from the second sensor to the list of the fourth sensor.

[0020] In some embodiments of this disclosure, the method for powering on the electronic device further includes:

[0021] Based on the sensor information in the third sensor list, issue a prompt message; or,

[0022] Based on the sensor information in the third sensor list and the fourth sensor list, a prompt message is issued;

[0023] The prompt information is used to indicate a sensor that failed to initialize.

[0024] In some embodiments of this disclosure, after updating the preset sensor information with target sensor information, the method for powering on the electronic device further includes:

[0025] Delete the second sensor list;

[0026] The step of updating the target sensor information with the available sensor information includes:

[0027] The available sensor information is copied to the newly created second sensor list as the updated target sensor information.

[0028] In some embodiments of this disclosure, updating the preset sensor information with target sensor information includes:

[0029] The target sensor information in the second sensor list is used to overwrite the preset sensor information in the first sensor list; and / or,

[0030] If the second sensor list exists, the preset sensor information is updated with the target sensor information.

[0031] In some embodiments of this disclosure, updating preset sensor information with the available sensor information and powering on the electronic device after a preset time includes:

[0032] If the available sensor information does not match the preset sensor information, the preset sensor information is updated with the available sensor information, and the electronic device is powered on after a preset time; and / or,

[0033] The method for powering on the electronic device also includes:

[0034] If the available sensor information matches the preset sensor information, the electronic device is powered on.

[0035] In some embodiments of this disclosure, after acquiring the available sensor information, the method for powering on the electronic device further includes:

[0036] If the first sensor list exists, determine whether the available sensor information matches the preset sensor information;

[0037] If the first sensor list does not exist, the available sensor information is copied to the newly created first sensor list as the preset sensor information, and the electronic device is powered on.

[0038] In some embodiments of this disclosure, when the first sensor list does not exist, the method for powering on the electronic device further includes:

[0039] The available sensor information is copied to the newly created second sensor list as the target sensor information.

[0040] In some embodiments of this disclosure, before acquiring available sensor information, the method for powering on the electronic device further includes:

[0041] Start the sensor service to initialize each sensor on the sensor hub;

[0042] The acquisition of available sensor information includes:

[0043] Obtain the available sensor information from the sensor hub.

[0044] According to a second aspect of the present disclosure, an electronic device power-on device is provided, the electronic device power-on device comprising:

[0045] An acquisition module is configured to acquire available sensor information in response to a power-on command of an electronic device. The available sensor information includes information about the sensors that have been initialized during the current power-on process of the electronic device.

[0046] A power-on module is configured to update preset sensor information with the available sensor information and power on the electronic device after a preset time. The preset sensor information includes information about sensors that have been initialized during the historical power-on process of the electronic device.

[0047] According to a third aspect of the present disclosure, an electronic device is provided, the electronic device comprising:

[0048] processor;

[0049] Memory used to store the processor's executable instructions;

[0050] The processor is configured to execute the electronic device power-on method as described above.

[0051] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which, when instructions in the storage medium are executed by a processor of a terminal, enables the terminal to perform the electronic device power-on method as described above.

[0052] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0053] In response to the power-on command of the electronic device, available sensor information is acquired to obtain information about the sensors that have been initialized during the current power-on process. Since the number of sensors initialized during the current power-on process may change, the preset sensor information is updated with the available sensor information, and the electronic device is powered on after a preset time. By updating the preset sensor information with the available sensor information, the available sensor information is matched with the preset sensor information in the next power-on process without waiting for the preset time, thereby reducing the power-on time of the electronic device.

[0054] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

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

[0056] Figure 1 This is a flowchart illustrating a method for powering on an electronic device according to an exemplary embodiment;

[0057] Figure 2 This is a flowchart illustrating a method for powering on an electronic device according to another exemplary embodiment;

[0058] Figure 3 This is a flowchart illustrating a method for powering on an electronic device according to another exemplary embodiment;

[0059] Figure 4 This is a flowchart illustrating a method for powering on an electronic device according to another exemplary embodiment;

[0060] Figure 5 This is a flowchart illustrating a method for powering on an electronic device according to another exemplary embodiment;

[0061] Figure 6 This is a block diagram illustrating an electronic device power-on device according to an exemplary embodiment;

[0062] Figure 7 This is a block diagram of an electronic device according to an exemplary embodiment.

[0063] In the picture:

[0064] 100 - Acquisition module; 200 - Power-on module; 400 - Electronic device; 402 - Processing component; 404 - Memory; 406 - Power supply component; 408 - Multimedia component; 410 - Audio component; 412 - Input / output interface; 414 - Sensor component; 416 - Communication component; 420 - Processor. Detailed Implementation

[0065] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims. It should also be understood that the term “and / or” as used in this disclosure refers to and includes any or all possible combinations of one or more of the associated listed items.

[0066] With the widespread use of electronic devices, they have become indispensable in people's daily lives, often requiring frequent power-on and power-off cycles. During use, some sensors may become damaged, causing initialization failures on subsequent power-ons. Alternatively, after an operating system upgrade, some sensors may be disabled, eliminating the need for initialization on subsequent power-ons. During the power-on process, electronic devices need to compare the sensor information from the current power-on process with that from previous power-ons, waiting a certain amount of time if a mismatch occurs to prevent sensor initialization failure due to time constraints. However, with damaged or disabled sensors, the electronic device requires a waiting period each time it is powered on, potentially leading to delays in powering on.

[0067] In related technologies, a method for powering on an electronic device is provided, comprising: deleting a sensor list in response to a power-on command from the electronic device; scanning each sensor that has been initialized; generating a new sensor list based on the scanned sensors; and powering on the electronic device. This method, by deleting the sensor list and generating a new sensor list, enables the information of sensors initialized in the current power-on process to match with that of previous power-on processes, without waiting for a certain amount of time, thus reducing the time required to power on the electronic device. However, since the deletion and generation of the sensor list not only increases the processor load but also consumes a certain amount of time, the electronic device may still fail to power on in a timely manner.

[0068] To address the aforementioned technical issues, this disclosure provides a method for powering on an electronic device. During the current power-on process, preset sensor information is updated with available sensor information. In the next power-on process, if the initialized sensors have not changed, they are matched with the preset sensor information. Because the initialized sensor information matches the preset sensor information, the electronic device can be powered on without waiting for a preset time, thus reducing the power-on time. Furthermore, since there is no need to delete and generate the sensor list during each power-on process, time is avoided, further improving the overall power-on time of the electronic device.

[0069] This disclosure provides a method for powering on an electronic device, such as... Figure 1 As shown, the method includes:

[0070] S100: In response to the power-on command of the electronic device, obtain available sensor information, which includes information about the sensors that have been initialized during the power-on process of the electronic device.

[0071] S200: Update the preset sensor information with available sensor information, and power on the electronic device after a preset time. The preset sensor information includes information of sensors that were initialized during the historical power-on process of the electronic device.

[0072] In this embodiment, in response to the power-on command of the electronic device, available sensor information is acquired to obtain information about the sensors that have been initialized during the current power-on process. Since the number of sensors initialized during the current power-on process may change, the preset sensor information is updated with the available sensor information, and the electronic device is powered on after a preset time. By updating the preset sensor information with the available sensor information, the available sensor information is matched with the preset sensor information during the next power-on process without waiting for the preset time, thereby reducing the power-on time of the electronic device.

[0073] For example, the preset time can range from 5s to 15s. The preset time can be 8s, 10s, 12s, etc.

[0074] In one embodiment, before acquiring available sensor information in step S100, the method for powering on the electronic device further includes:

[0075] Start the sensor service to initialize each sensor on the sensor hub.

[0076] The acquisition of available sensor information in step S100 is determined in the following way:

[0077] Obtain available sensor information from the sensor hub.

[0078] In this embodiment, the sensor hub needs to initialize each sensor and start the sensor service before obtaining available sensor information. After the sensor hub initializes each sensor, it can transmit the information of the initialized sensors and obtain available sensor information from the sensor hub. By obtaining available sensor information from the sensor hub, the information of the sensors that have completed initialization during the current power-on process can be obtained in a timely manner, thereby improving the reliability of the electronic device's power-on.

[0079] For example, after starting the sensor service, the sensor hub initializes each sensor. After initialization, the sensor hub reports the initialized sensors to the hardware abstraction layer to obtain available sensor information. Once the available sensor information is obtained, the sensors in the available sensor information can be used as mandatory sensors. During the sensor information comparison process, the mandatory sensors can be compared with the sensors in the preset sensor information to determine whether the available sensor information matches the preset sensor information.

[0080] In one embodiment, before acquiring available sensor information in step S100, the method for powering on the electronic device further includes:

[0081] Update the preset sensor information with the target sensor information.

[0082] The step S200 of updating the preset sensor information with available sensor information can be determined in the following way:

[0083] If the preset sensor information includes first sensor information other than the available sensor information, then the target sensor information is updated with the available sensor information.

[0084] If the available sensor information includes second sensor information other than the preset sensor information, then the preset sensor information is updated with the available sensor information.

[0085] In this embodiment, if the preset sensor information includes first sensor information other than available sensor information, the number of sensors initialized during the current power-on process will decrease due to sensor damage or operating system upgrades. Since it is difficult to partially delete sensor information from the sensor list during the power-on process of an electronic device, the preset sensor information can be indirectly updated by updating the target sensor information with available sensor information. If the available sensor information includes second sensor information other than the preset sensor information, the number of sensors initialized during the current power-on process will increase due to sensor recovery or operating system upgrades. Since sensor information can be added to the sensor list during the power-on process of an electronic device, the preset sensor information can be updated with available sensor information. By selecting the corresponding sensor information adjustment method based on the difference between the preset sensor information and the available sensor information, the preset sensor information can be effectively adjusted, thereby improving the reliability of the electronic device's power-on.

[0086] It is understandable that if the available sensor information includes second sensor information other than the preset sensor information, the preset sensor information can be updated indirectly by updating the target sensor information with the available sensor information; this is not limited here.

[0087] In one embodiment, preset sensor information is located in a first sensor list, and target sensor information is located in a second sensor list.

[0088] In this embodiment, by storing preset sensor information and target sensor information in two different sensor lists respectively, the omission of sensor information is avoided and the comparison and adjustment of sensor information are facilitated, thereby improving the reliability of the electronic device's power-on.

[0089] For example, the first sensor list can be set in a first text file (sensors_list.txt), and the second sensor list can be set in a second text file (sensors_list_new.txt).

[0090] In one embodiment, the step of updating the preset sensor information with the target sensor information in the above steps can be determined in the following way:

[0091] If a second sensor list exists, update the preset sensor information with the target sensor information.

[0092] In this embodiment, when the second sensor list exists, target sensor information can be provided to update the preset sensor information. By updating the preset sensor information when the second sensor list exists, the inability to provide target sensor information avoids affecting the preset sensor information, thereby improving the reliability of the electronic device's power-on.

[0093] In one embodiment, the method for powering on an electronic device further includes:

[0094] If the second sensor list does not exist, the preset sensor information will not be updated.

[0095] In this embodiment, since the second sensor list may be deleted after updating the preset sensor information with the target sensor information during the electronic device's first power-on, operating system upgrade, or historical power-on process, the target sensor information may not be available. Therefore, if the second sensor list does not exist, the preset sensor information is not updated. By not updating the preset sensor information when the second sensor list does not exist, the frequent updates of the preset sensor information are avoided, thus reducing the power-on time of the electronic device.

[0096] In one embodiment, the step of updating the preset sensor information with the target sensor information in the above steps can also be determined in the following way:

[0097] The target sensor information in the second sensor list is used to overwrite the preset sensor information in the first sensor list.

[0098] In this embodiment, since it is difficult to locally adjust the sensor information in the sensor list during the power-on process of the electronic device, the target sensor information in the second sensor list is used to overwrite the preset sensor information in the first sensor list. By updating the preset sensor information in an overwriting manner, the inability to adjust the preset sensor information in the first sensor list is avoided, thereby improving the reliability of the electronic device's power-on.

[0099] In one embodiment, the step of updating the target sensor information with available sensor information in the above steps can be determined in the following way:

[0100] The target sensor information in the second sensor list is overlaid with the available sensor information.

[0101] In this embodiment, since the number of sensors initialized during this power-on process is reduced, and it is difficult to partially delete sensor information from the sensor list, the target sensor information is updated by overwriting the target sensor information in the second sensor list with available sensor information. By updating the target sensor information in an overwriting manner, the inability to adjust the target sensor information in the second sensor list is avoided, thereby improving the reliability of the electronic device's power-on.

[0102] In one embodiment, after updating the preset sensor information with the target sensor information in the above steps, the method for powering on the electronic device further includes:

[0103] Remove the second sensor from the list.

[0104] The step of updating the target sensor information with available sensor information in the above steps can also be determined in the following way:

[0105] Copy the available sensor information to the newly created second sensor list as the updated target sensor information.

[0106] In this embodiment, since the target sensor information in the second sensor list is no longer needed after updating the preset sensor information with the target sensor information, the second sensor list is deleted to avoid duplicate or erroneous updates to the preset sensor information. If the available sensor information does not match the preset sensor information, since there is no second sensor list, the available sensor information is copied to a newly created second sensor list. By deleting and creating the second sensor list, the time consumed by updating the preset sensor information every time the device is powered on is avoided, thereby reducing the power-on time of the electronic device.

[0107] For example, the second sensor list can also be retained without being deleted. In this case, the preset sensor information is updated with the target sensor information before each execution of step S100 to obtain available sensor information.

[0108] In one embodiment, the step of updating the preset sensor information with available sensor information in the above steps is determined in the following manner:

[0109] Add the information from the second sensor to the list of the first sensors.

[0110] In this embodiment, by adding the second sensor information to the first sensor list, the overall adjustment of the first sensor list is avoided, thereby reducing the complexity of powering on the electronic device.

[0111] In one embodiment, the method for powering on an electronic device further includes:

[0112] Add the information from the first sensor to the list of the third sensor.

[0113] In this embodiment, because the preset sensor information cannot be identified after updates, unusable sensors cannot be identified, making them unusable and difficult to repair. By adding the first sensor information to the third sensor list, which records unusable sensors for repair and to remind users, the reliability of electronic device startup is improved.

[0114] For example, the third sensor list can be set in a third text file (sensors_list_old1.txt).

[0115] In one embodiment, the method for powering on an electronic device further includes:

[0116] Add the information from the second sensor to the list of the fourth sensor.

[0117] In this embodiment, because the preset sensor information cannot be determined after updating, the recovered sensor remains in the third sensor list and is mistakenly considered unusable. By adding the second sensor information to the fourth sensor list, the recovered sensor is recorded in the fourth sensor list to avoid erroneous repairs or false alerts, thereby improving the reliability of the electronic device's power-on.

[0118] For example, the fourth sensor list can be set in a fourth text file (sensors_list_old2.txt).

[0119] For example, the first text file, the second text file, the third text file, and the fourth text file may be stored in a preset directory related to the sensor in the electronic device.

[0120] In one embodiment, the method for powering on an electronic device further includes:

[0121] Based on the sensor information in the third sensor list, a prompt message is issued to indicate which sensors failed to initialize.

[0122] In this embodiment, the third sensor list records historically unavailable sensors, making it easier for users or maintenance personnel to identify unavailable sensors. By issuing prompts based on the sensor information in the third sensor list, users or maintenance personnel can be alerted to historically unavailable sensors for analysis and repair, thereby improving the reliability of electronic equipment maintenance.

[0123] In one embodiment, the method for powering on an electronic device further includes:

[0124] Based on the sensor information from the third and fourth sensor lists, a prompt message is issued to indicate which sensors failed to initialize.

[0125] In this embodiment, the differences in sensor information between the third and fourth sensor lists reflect currently unavailable sensors, making it easier for users or maintenance personnel to identify these unavailable sensors. By issuing prompts based on the sensor information in the third and fourth sensor lists, users or maintenance personnel can be alerted to currently unavailable sensors for analysis and repair, thereby improving the reliability of electronic equipment maintenance.

[0126] In one embodiment, the step S200 of updating the preset sensor information with available sensor information and powering on the electronic device after a preset time can also be determined in the following way:

[0127] If the available sensor information does not match the preset sensor information, the preset sensor information is updated with the available sensor information, and the electronic device is powered on after a preset time.

[0128] In this embodiment, if the available sensor information does not match the preset sensor information, the number of sensors initialized during the current power-on process changes. The preset sensor information is then updated with the available sensor information, and the electronic device is powered on after a preset time. By updating the preset sensor information with the available sensor information when they do not match, the available sensor information is matched with the preset sensor information in the next power-on process without waiting for the preset time, thereby reducing the power-on time of the electronic device.

[0129] In one embodiment, the method for powering on an electronic device further includes:

[0130] The electronic device is powered on when the available sensor information matches the preset sensor information.

[0131] In this embodiment, when the available sensor information matches the preset sensor information, the number of sensors initialized during the current power-on process remains unchanged, and the electronic device is powered on. By directly powering on the electronic device when the available sensor information matches the preset sensor information, power-on delays are avoided, thereby reducing the power-on time of the electronic device.

[0132] For example, a match between available sensor information and preset sensor information means that the sensors in the available sensor information are exactly the same as the sensors in the preset sensor information. A mismatch between available sensor information and preset sensor information means that the sensors in the available sensor information are at least partially different from the sensors in the preset sensor information. For example, an accelerometer sensor may be present in the available sensor information, but not in the preset sensor information.

[0133] In one embodiment, after acquiring available sensor information in step S100, the method for powering on the electronic device further includes:

[0134] If the first sensor list exists, determine whether the available sensor information matches the preset sensor information.

[0135] If the first sensor list does not exist, the available sensor information is copied to the newly created first sensor list as the preset sensor information, and the electronic device is powered on.

[0136] In this embodiment, since the electronic device does not store a first sensor list when it is powered on for the first time, it is necessary to determine whether the first sensor list exists before comparing the available sensor information with the preset sensor information. If the first sensor list exists, and the electronic device is not powered on for the first time, it is determined whether the available sensor information matches the preset sensor information. If the first sensor list does not exist, and the electronic device is powered on for the first time, the available sensor information is copied to a newly created first sensor list as the preset sensor information. By comparing sensor information or creating a new first sensor list based on whether the first sensor list exists, the system avoids waiting for a preset time due to the inability to compare sensor information, thereby reducing the power-on time of the electronic device.

[0137] In one embodiment, the method for powering on an electronic device further includes, in the case that the first sensor list does not exist:

[0138] Copy the available sensor information to the newly created second sensor list as the target sensor information.

[0139] In this embodiment, by copying the available sensor information to a newly created second sensor list as the target sensor information, the electronic device avoids the inability to update the preset sensor information due to the absence of a second sensor list when it is first powered on, thereby improving the reliability of the electronic device's power-on.

[0140] This disclosure provides a method for powering on an electronic device, such as... Figure 2 As shown, the method includes:

[0141] S300: In response to the power-on command of the electronic device, initialize the process.

[0142] S310. Load the system configuration file, which can be, for example, init.rc.

[0143] S320, Start basic services.

[0144] S330: If the second sensor list exists, overwrite the preset sensor information in the first sensor list with the target sensor information in the second sensor list, and delete the second sensor list.

[0145] S340, Start sensor service.

[0146] S350: Obtain available sensor information from the sensor hub.

[0147] S360. Determine if the first sensor list exists. If yes, proceed to step S370. If no, proceed to step S420.

[0148] S370. Determine whether the available sensor information matches the preset sensor information in the first sensor list. If yes, proceed to step S440. If no, proceed to step S380.

[0149] S380. Determine whether the number of sensors in the available sensor information is less than the number of sensors in the preset sensor information in the first sensor list. If yes, proceed to step S390. If no, proceed to step S410.

[0150] S390. Copy the available sensor information to the newly created second sensor list.

[0151] S400: Add the information of the first sensor to the list of the third sensor, and after 8 seconds, execute step S440.

[0152] S410. Add the second sensor information to the first sensor list, and after 8 seconds, execute step S440.

[0153] S420. Copy the available sensor information to the newly created first sensor list as the preset sensor information.

[0154] S430. Copy the available sensor information to the newly created second sensor list as the target sensor information, and then proceed to step S440.

[0155] S440: Power on the electronic device.

[0156] In this embodiment, in response to the power-on command of the electronic device, the user needs to turn on the electronic device and initiate the initialization process. The system configuration file is loaded to configure basic services and sensor services. If a second sensor list exists, the target sensor information in the second sensor list overwrites the preset sensor information in the first sensor list, and the second sensor list is deleted. The sensor service is started to initialize each sensor in the sensor hub and obtain available sensor information from the sensor hub. It is determined whether the first sensor list exists to determine if there is preset sensor information for matching. If yes, it is determined whether the available sensor information matches the preset sensor information to determine if the number of sensors initialized during this power-on process has changed. If no, it is determined whether the number of sensors in the available sensor information is less than the number of sensors in the preset sensor information to determine if the number of sensors initialized during this power-on process has decreased or increased. If yes, the number of sensors initialized during this power-on process has decreased. The available sensor information is copied to a newly created second sensor list, the first sensor information is added to a third sensor list, and the electronic device is powered on after 8 seconds. If no, the number of sensors initialized during this power-on process has increased. The second sensor information is added to the first sensor list, and the electronic device is powered on after 8 seconds. If the first sensor list does not exist, the electronic device cannot perform preset sensor information matching upon initial power-on. Available sensor information is copied to a newly created first sensor list as preset sensor information, and available sensor information is copied to a newly created second sensor list as target sensor information, and the electronic device is powered on again. If the available sensor information matches the preset sensor information, the number of sensors initialized during this power-on process remains unchanged, and the electronic device is powered on. By directly or indirectly updating the preset sensor information with available sensor information when they do not match, the available sensor information can match the preset sensor information on the next power-on process without waiting for a preset time, thus reducing the power-on time of the electronic device.

[0157] For example, in the case of Figure 2 During the power-on process of the electronic device as shown in the diagram, the lifecycles of the first, second, and third text files are as shown in Table 1:

[0158] Table 1:

[0159] nth power-on 1 2 …… p p+1 …… q q+1 …… First text file - + + + + + + + + Second text file - + - - + - - - - Third text file - - - - + + + + +

[0160] During the p-th power-on process, the number of available sensors decreases. During the q-th power-on process, the number of available sensors increases. + indicates the file exists, - indicates the file does not exist.

[0161] This disclosure provides a method for powering on an electronic device, such as... Figure 3 As shown, the method includes:

[0162] S500 initializes the process in response to the power-on command of the electronic device.

[0163] S510, Load system configuration files.

[0164] S520, Start basic services.

[0165] S530: If the second sensor list exists, overwrite the preset sensor information in the first sensor list with the target sensor information in the second sensor list, and delete the second sensor list.

[0166] S540, Start sensor service.

[0167] S550: Obtain available sensor information from the sensor hub.

[0168] S560. Determine if the first sensor list exists. If yes, proceed to step S570. If no, proceed to step S620.

[0169] S570. Determine whether the available sensor information matches the preset sensor information in the first sensor list. If yes, proceed to step S630. If no, proceed to step S580.

[0170] S580. Determine whether the number of sensors in the available sensor information is less than the number of sensors in the preset sensor information in the first sensor list. If yes, proceed to step S590. If no, proceed to step S610.

[0171] S590. Copy the available sensor information to the newly created second sensor list.

[0172] S600: Add the information of the first sensor to the list of the third sensor, and after 8 seconds, execute step S630.

[0173] S610. Add the second sensor information to the first sensor list, and after 8 seconds, execute step S630.

[0174] S620. Copy the available sensor information to the newly created first sensor list as the preset sensor information, and then execute step S630.

[0175] S630: Power on the electronic device.

[0176] For example, in the case of Figure 3 During the power-on process of the electronic device as shown in the diagram, the lifecycles of the first, second, and third text files are as shown in Table 2:

[0177] Table 2:

[0178] nth power-on 1 2 …… p p+1 …… q q+1 …… First text file - + + + + + + + + Second text file - - - - + - - - - Third text file - - - - + + + + +

[0179] During the p-th power-on process, the number of available sensors decreases. During the q-th power-on process, the number of available sensors increases. + indicates the file exists, - indicates the file does not exist.

[0180] This disclosure provides a method for powering on an electronic device, such as... Figure 4 As shown, the method includes:

[0181] S700 initializes the process in response to the power-on command of the electronic device.

[0182] S710, Load system configuration file.

[0183] S720, start basic services.

[0184] S730: If the second sensor list exists, overwrite the preset sensor information in the first sensor list with the target sensor information in the second sensor list, and delete the second sensor list.

[0185] S740, Start sensor service.

[0186] S750: Obtain available sensor information from the sensor hub.

[0187] S760. Determine if the first sensor list exists. If yes, proceed to step S770. If no, proceed to step S810.

[0188] S770. Determine whether the available sensor information matches the preset sensor information in the first sensor list. If yes, proceed to step S820. If no, proceed to step S780.

[0189] S780. Determine whether the number of sensors in the available sensor information is less than the number of sensors in the preset sensor information in the first sensor list. If yes, proceed to step S790. If no, proceed to step S800.

[0190] S790. Copy the available sensor information to the newly created second sensor list, and after 8 seconds, execute step S820.

[0191] S800: Add the second sensor information to the first sensor list, and after 8 seconds, execute step S820.

[0192] S810. Copy the available sensor information to the newly created first sensor list as the preset sensor information, and then proceed to step S820.

[0193] S820: Power on the electronic device.

[0194] For example, in the case of Figure 4 During the power-on process of the electronic device as shown in the diagram, the lifecycles of the first and second text files are as shown in Table 3:

[0195] Table 3:

[0196] nth power-on 1 2 …… p p+1 …… q q+1 …… First text file - + + + + + + + + Second text file - + - - + - - - -

[0197] During the p-th boot process, the number of available sensors decreases. During the q-th boot process, the number of available sensors increases. + indicates the file exists, - indicates the file does not exist. This method minimizes file read / write operations.

[0198] This disclosure provides a method for powering on an electronic device, such as... Figure 5 As shown, the method includes:

[0199] S900: In response to the power-on command of the electronic device, initialize the process.

[0200] S910, Load system configuration file.

[0201] S920, Start basic services.

[0202] S930: If the second sensor list exists, the target sensor information in the second sensor list is used to overwrite the preset sensor information in the first sensor list, and the second sensor list is deleted.

[0203] S940, Start sensor service.

[0204] S950: Obtain available sensor information from the sensor hub.

[0205] S960. Determine if the first sensor list exists. If yes, proceed to step S970. If no, proceed to step S1010.

[0206] S970. Determine whether the available sensor information matches the preset sensor information in the first sensor list. If yes, proceed to step S1030. If no, proceed to step S980.

[0207] S980. Determine whether the number of sensors in the available sensor information is less than the number of sensors in the preset sensor information in the first sensor list. If yes, proceed to step S990. If no, proceed to step S1010.

[0208] S990. Copy the available sensor information to the newly created second sensor list, and after 8 seconds, execute step S1030.

[0209] S1000: Add the second sensor information to the first sensor list, and after 8 seconds, execute step S1030.

[0210] S1010: Copy the available sensor information to the newly created first sensor list as the preset sensor information.

[0211] S1020. Copy the available sensor information to the newly created second sensor list as the target sensor information, and then proceed to step S1030.

[0212] S1030: Power on the electronic device.

[0213] For example, in the case of Figure 5 During the power-on process of the electronic device as shown in the diagram, the lifecycles of the first and second text files are as shown in Table 4:

[0214] Table 4:

[0215] nth power-on 1 2 …… p p+1 …… q q+1 …… First text file - + + + + + + + + Second text file - - - - + - - - -

[0216] During the p-th power-on process, the number of available sensors decreases. During the q-th power-on process, the number of available sensors increases. + indicates the file exists, - indicates the file does not exist.

[0217] In one exemplary embodiment, an electronic device power-on device is provided for implementing the method described above. (Reference) Figure 6 As shown, the electronic device power-on device may include an acquisition module 100 and a power-on module 200, wherein, during the implementation of the above method,

[0218] The acquisition module 100 is configured to acquire available sensor information in response to a power-on command of the electronic device. The available sensor information includes information about the sensors that have been initialized during the current power-on process of the electronic device.

[0219] The power-on module 200 is configured to update preset sensor information with available sensor information and power on the electronic device after a preset time. The preset sensor information includes information about sensors that have been initialized during the historical power-on process of the electronic device.

[0220] In one exemplary embodiment, an electronic device power-on device is provided, the device further comprising:

[0221] The update module is configured to update preset sensor information with target sensor information.

[0222] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0223] If the preset sensor information includes first sensor information other than the available sensor information, then the target sensor information is updated with the available sensor information.

[0224] If the available sensor information includes second sensor information other than the preset sensor information, then the preset sensor information is updated with the available sensor information.

[0225] In one exemplary embodiment, an electronic device power-on apparatus is provided, wherein an update module is configured to:

[0226] If a second sensor list exists, update the preset sensor information with the target sensor information.

[0227] In one exemplary embodiment, an electronic device power-on apparatus is provided, wherein an update module is configured to:

[0228] The target sensor information in the second sensor list is used to overwrite the preset sensor information in the first sensor list.

[0229] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0230] If the available sensor information does not match the preset sensor information, the preset sensor information is updated with the available sensor information, and the electronic device is powered on after a preset time.

[0231] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0232] The electronic device is powered on when the available sensor information matches the preset sensor information.

[0233] In one exemplary embodiment, an electronic device power-on device is provided, the device further comprising:

[0234] The startup module is configured to start the sensor service.

[0235] In one exemplary embodiment, an electronic device power-on device is provided, wherein an acquisition module 100 is configured to:

[0236] Obtain available sensor information from the sensor hub.

[0237] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0238] The target sensor information in the second sensor list is overlaid with the available sensor information.

[0239] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0240] Add the information from the second sensor to the list of the first sensors.

[0241] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0242] Add the information from the first sensor to the list of the third sensor.

[0243] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0244] Add the information from the second sensor to the list of the fourth sensor.

[0245] In one exemplary embodiment, an electronic device power-on device is provided, the device further comprising:

[0246] The prompting module is configured to issue prompts based on sensor information from the third sensor list. The prompts are used to indicate which sensors failed to initialize.

[0247] In one exemplary embodiment, an electronic device power-on device is provided, wherein a prompting module is configured to:

[0248] Based on the sensor information from the third and fourth sensor lists, a prompt message is issued to indicate which sensors failed to initialize.

[0249] In one exemplary embodiment, an electronic device power-on device is provided, the device further comprising:

[0250] The delete module is configured to delete the second sensor from the list.

[0251] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0252] Copy the available sensor information to the newly created second sensor list.

[0253] In one exemplary embodiment, an electronic device power-on device is provided, the device further comprising:

[0254] The determination module is configured to determine whether the available sensor information matches the preset sensor information, provided that a first sensor list exists.

[0255] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0256] If the first sensor list does not exist, the available sensor information is copied to the newly created first sensor list as the preset sensor information, and the electronic device is powered on.

[0257] In one exemplary embodiment, an electronic device power-on device is provided, wherein a power-on module 200 is configured to:

[0258] Copy the available sensor information to the newly created second sensor list as the target sensor information.

[0259] In one exemplary embodiment, an electronic device is provided, such as a mobile phone, a laptop computer, a tablet computer, and a wearable device.

[0260] refer to Figure 7 As shown, the electronic device 400 may include one or more of the following components: processing component 402, memory 404, power supply component 406, multimedia component 408, audio component 410, input / output (I / O) interface 412, sensor component 414, and communication component 416.

[0261] Processing component 402 typically controls the overall operation of electronic device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.

[0262] Memory 404 is configured to store various types of data to support the operation of electronic device 400. Examples of this data include instructions for any application or method operating on electronic device 400, contact data, phonebook data, messages, pictures, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage terminal 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 storage, flash memory, magnetic disk, or optical disk.

[0263] Power supply component 406 provides power to various components of electronic device 400. Power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 400.

[0264] Multimedia component 408 includes a screen that provides an output interface between electronic device 400 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera module and / or a rear-facing camera module. When electronic device 400 is in an operating mode, such as shooting mode or video mode, the front-facing camera module and / or rear-facing camera module may receive external multimedia data. Each front-facing camera module and rear-facing camera module may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0265] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when electronic device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.

[0266] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0267] Sensor assembly 414 includes one or more sensors for providing state assessments of various aspects of electronic device 400. For example, sensor assembly 414 may detect the on / off state of electronic device 400, the relative positioning of components such as the display and keypad of electronic device 400, changes in position of electronic device 400 or a component of electronic device 400, the presence or absence of user contact with electronic device 400, orientation or acceleration / deceleration of electronic device 400, and temperature changes of electronic device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0268] Communication component 416 is configured to facilitate wired or wireless communication between electronic device 400 and other terminals. Electronic device 400 can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0269] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods shown in the above embodiments or combinations thereof.

[0270] In one exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by a processor 420 of an electronic device 400 to perform the methods shown in the embodiments or combinations thereof. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage terminal, etc. When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the methods shown in the embodiments or combinations thereof.

[0271] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0272] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0273] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0274] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0275] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for powering on an electronic device, characterized in that, The method for powering on the electronic device includes: In response to a power-on command from an electronic device, available sensor information is acquired, including information about sensors that have been initialized during the current power-on process. The preset sensor information is updated with the available sensor information, and the electronic device is powered on after a preset time. The preset sensor information includes information about the sensors that were initialized during the historical power-on process of the electronic device.

2. The method for powering on an electronic device according to claim 1, characterized in that, Before acquiring available sensor information, the method for powering on the electronic device further includes: The preset sensor information is updated with the target sensor information; The step of updating the preset sensor information with the available sensor information includes: If the preset sensor information includes first sensor information other than the available sensor information, then the target sensor information is updated with the available sensor information; If the available sensor information includes second sensor information other than the preset sensor information, then the preset sensor information is updated with the available sensor information.

3. The method for powering on an electronic device according to claim 2, characterized in that, The preset sensor information is located in the first sensor list, and the target sensor information is located in the second sensor list.

4. The method for powering on an electronic device according to claim 3, characterized in that, The step of updating the target sensor information with the available sensor information includes: The available sensor information is used to overwrite the target sensor information in the second sensor list; and / or, The step of updating the preset sensor information with the available sensor information includes: Add the second sensor information to the first sensor list.

5. The method for powering on an electronic device according to claim 3, characterized in that, The method for powering on the electronic device also includes: Add the first sensor information to the third sensor list; and / or, Add the information from the second sensor to the list of the fourth sensor.

6. The method for powering on an electronic device according to claim 5, characterized in that, The method for powering on the electronic device also includes: Based on the sensor information in the third sensor list, issue a prompt message; or, Based on the sensor information in the third sensor list and the fourth sensor list, a prompt message is issued; The prompt information is used to indicate a sensor that failed to initialize.

7. The method for powering on an electronic device according to claim 3, characterized in that, After updating the preset sensor information with target sensor information, the electronic device power-on method further includes: Delete the second sensor list; The step of updating the target sensor information with the available sensor information includes: The available sensor information is copied to the newly created second sensor list as the updated target sensor information.

8. The method for powering on an electronic device according to claim 3, characterized in that, The step of updating the preset sensor information with target sensor information includes: The target sensor information in the second sensor list is used to overwrite the preset sensor information in the first sensor list; and / or, If the second sensor list exists, the preset sensor information is updated with the target sensor information.

9. The method for powering on an electronic device according to claim 3, characterized in that, The step of updating the preset sensor information with the available sensor information and then powering on the electronic device after a preset time includes: If the available sensor information does not match the preset sensor information, the preset sensor information is updated with the available sensor information, and the electronic device is powered on after a preset time; and / or, The method for powering on the electronic device also includes: If the available sensor information matches the preset sensor information, the electronic device is powered on.

10. The method for powering on an electronic device according to claim 9, characterized in that, After acquiring the available sensor information, the method for powering on the electronic device further includes: If the first sensor list exists, determine whether the available sensor information matches the preset sensor information; If the first sensor list does not exist, the available sensor information is copied to the newly created first sensor list as the preset sensor information, and the electronic device is powered on.

11. The method for powering on an electronic device according to claim 10, characterized in that, If the first sensor list does not exist, the method for powering on the electronic device further includes: The available sensor information is copied to the newly created second sensor list as the target sensor information.

12. The method for powering on an electronic device according to any one of claims 1 to 11, characterized in that, Before acquiring available sensor information, the method for powering on the electronic device further includes: Start the sensor service to initialize each sensor on the sensor hub; The acquisition of available sensor information includes: Obtain the available sensor information from the sensor hub.

13. A power-on device for an electronic device, characterized in that, The electronic device power-on device includes: An acquisition module is configured to acquire available sensor information in response to a power-on command of an electronic device. The available sensor information includes information about the sensors that have been initialized during the current power-on process of the electronic device. A power-on module is configured to update preset sensor information with the available sensor information and power on the electronic device after a preset time. The preset sensor information includes information about sensors that have been initialized during the historical power-on process of the electronic device.

14. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to perform the electronic device power-on method as described in any one of claims 1 to 12.

15. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the power-on method of the electronic device as described in any one of claims 1 to 12.