CN115993993A - Cold start method and related equipment - Google Patents

Cold start method and related equipment Download PDF

Info

Publication number
CN115993993A
CN115993993A CN202111212140.1A CN202111212140A CN115993993A CN 115993993 A CN115993993 A CN 115993993A CN 202111212140 A CN202111212140 A CN 202111212140A CN 115993993 A CN115993993 A CN 115993993A
Authority
CN
China
Prior art keywords
scene
starting
electronic device
target
driver
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111212140.1A
Other languages
Chinese (zh)
Inventor
刘磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111212140.1A priority Critical patent/CN115993993A/en
Publication of CN115993993A publication Critical patent/CN115993993A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a cold start method and related equipment, wherein the method comprises the following steps: after the electronic equipment is powered on and the kernel is started, determining a target starting scene of the electronic equipment; initializing a driver corresponding to a target starting scene; and starting the function corresponding to the target starting scene. According to the method and the device, the function corresponding to the target starting scene can be started in the cold starting process of the electronic equipment, the user can quickly use the required function, the response speed of the electronic equipment after cold starting is improved, and the starting experience of the user is improved.

Description

Cold start method and related equipment
Technical Field
The application relates to the technical field of terminals, in particular to a cold start method and related equipment.
Background
The process of powering up an electronic device to be able to function properly is called cold start. The electronic device includes a plurality of functions, for example, a take-with-person having a photographing function, a picture viewing function. The existing cold start method starts all functions of the electronic device according to a fixed sequence (for example, a photographing function is started first and then a picture viewing function is started when the electronic device is started in a cold mode), and functions required to be used by a user may be started at a later time, so that the electronic device cannot respond quickly.
Disclosure of Invention
The embodiment of the application provides a cold start method and related equipment, which can improve the response speed of electronic equipment after cold start.
The first aspect of the application provides a cold start method, which comprises the following steps: after the electronic equipment is powered on and a kernel is started, determining a target starting scene of the electronic equipment; initializing a driver corresponding to the target starting scene; and starting the function corresponding to the target starting scene.
According to the method and the device, the function corresponding to the target starting scene can be started in the cold starting process of the electronic equipment, the user can quickly use the required function, the response speed of the electronic equipment after cold starting is improved, and the starting experience of the user is improved.
In some optional embodiments, the determining the target startup scenario of the electronic device includes: receiving a scene selection signal, and determining the target starting scene according to the scene selection signal; or detecting the environment information of the electronic equipment, and determining the target starting scene according to the environment information of the electronic equipment.
In some alternative embodiments, the receiving the scene selection signal includes: and receiving the scene selection signal sent by the user by pressing a physical button of the electronic device.
In some alternative embodiments, the electronic device comprises a smart door lock, a smart doorbell, a drone, a handgun.
In some alternative embodiments, the method further comprises: initializing drivers corresponding to other starting scenes of the electronic equipment; and starting the functions corresponding to other starting scenes of the electronic equipment.
In some optional embodiments, before initializing the driver corresponding to the other start scenario of the electronic device, the method further includes: setting a starting sequence corresponding to the target starting scene.
In some optional embodiments, the setting the starting sequence corresponding to the target starting scene includes: and setting a starting sequence corresponding to the target starting scene through a starting script.
In some alternative embodiments, the method further comprises: if the electronic equipment also comprises other functions, initializing a driver corresponding to the other functions of the electronic equipment; and starting other functions of the electronic equipment.
A second aspect of the present application provides a computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the cold start method according to the first aspect.
A third aspect of the present application provides an electronic device, the electronic device comprising a processor and a memory, the memory being configured to store instructions, the processor being configured to invoke the instructions in the memory, so that the electronic device performs the cold start method according to the first aspect.
A fourth aspect of the present application provides a chip system, the chip system being applied to an electronic device; the chip system comprises an interface circuit and a processor; the interface circuit and the processor are interconnected through a circuit; the interface circuit is used for receiving signals from the memory of the electronic device and sending signals to the processor, wherein the signals comprise computer instructions stored in the memory; when the processor executes the computer instructions, the system-on-chip performs the cold start method as described in the first aspect.
A fifth aspect of the present application provides a computer program product for, when run on a computer, causing the computer to perform the cold start method as described in the first aspect.
It should be understood that the computer readable storage medium of the second aspect, the electronic device of the third aspect, the chip system of the fourth aspect, and the computer program product of the fifth aspect provided above all correspond to the methods of the first aspect, and therefore, the advantages achieved by the method may refer to the advantages provided in the corresponding methods and are not repeated herein.
Drawings
Fig. 1 is an application scenario schematic diagram of a cold start method provided in an embodiment of the present application.
Fig. 2 is a schematic diagram of a correspondence relationship between a driver and a start scene in the cold start method provided in the embodiment of the present application.
Fig. 3 is a schematic diagram of a startup sequence corresponding to different startup scenarios in the cold startup method provided in the embodiment of the present application.
Fig. 4 is a flowchart of a cold start method provided in an embodiment of the present application.
Fig. 5 is a flowchart of a cold start method according to another embodiment of the present application.
Fig. 6 is a flowchart of a cold start method according to another embodiment of the present application.
Fig. 7 is a flowchart of a cold start method according to another embodiment of the present application.
Fig. 8 is a schematic diagram of cold start according to a cold start method provided in an embodiment of the present application.
Fig. 9 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
Fig. 10 is a schematic software structure of an electronic device according to an embodiment of the present application.
Detailed Description
For ease of understanding, a description of some of the concepts related to the embodiments of the present application are given by way of example for reference.
It should be noted that "at least one" in this application means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and the representation may have three relationships, for example, a and/or B may represent: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The terms "first," "second," "third," "fourth" and the like in the description and in the claims and drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
In order to better understand the cold start method and the related device provided in the embodiments of the present application, an application scenario of the cold start method of the present application is described below.
Fig. 1 is an application scenario schematic diagram of a cold start method provided in an embodiment of the present application.
As shown in fig. 1, the cold start method provided in the embodiment of the present application is applied to an electronic device 10. The electronic device 10 includes a plurality of functions, such as a photographing function, a picture viewing function, and the like. The electronic device 10 may be an embedded device such as a smart door lock, a smart doorbell, a drone, a handgun, or the like. Fig. 1 illustrates an electronic device 10 as a portable camera.
The process of powering up the electronic device 10 to be able to function properly is referred to as a cold start. According to the cold start method provided by the embodiment of the application, the electronic device 10 can enter different start scenes during cold start, and the different start scenes correspond to different functions. The electronic device 10 preferentially starts different functions in different starting scenes, so that a user can quickly use the required functions, the response speed of the electronic device after cold start is improved, and the starting experience of the user is improved. For example, the electronic device 10 is a personal photo, which has a photographing function and a picture viewing function. The start scene of the carry-on shooting comprises a shooting scene and a view scene. The snapshot scene corresponds to a photographing function and is used for photographing pictures or videos through a camera which takes the pictures with the body, and the view scene corresponds to a picture viewing function and is used for viewing the pictures or videos which are stored with the body through a display screen which takes the pictures with the body. If the user needs to take a picture quickly after cold start, the user selects to enter a snapshot scene, and the portable shooting starts a shooting function firstly and then starts a picture viewing function of the portable shooting when cold start. The portable photo can take a picture after the photographing function is started, and the picture checking function is not required to be started. If a user needs to quickly view pictures or videos after cold start, selecting to enter a view scene, starting a picture viewing function of the portable shooting at first and then starting a shooting function of the portable shooting at the time of cold start. The portable photo can view the picture or video stored by the portable photo after the picture viewing is started, and the photographing function is not required to be started.
Each start-up scenario of the electronic device 10 may correspond to one function or may correspond to multiple functions. If one starting scene of the electronic device corresponds to a plurality of functions, the functions can be started preferentially according to a preset sequence, or the functions can be started preferentially according to a random sequence.
In another embodiment of the present application, the cold start method may be applied to a smart door lock. The starting scene of the intelligent door lock comprises an out-door face recognition unlocking (camera shooting recognition) scene and an in-door cat eye preview (screen display camera shooting image) scene. If a user needs to unlock quickly after cold start, the user selects to enter an out-door face recognition unlocking scene, the intelligent door lock starts the function corresponding to the out-door face recognition unlocking scene, and then starts the function corresponding to the in-door cat eye preview. If a user needs to quickly preview the peephole after cold start, selecting to enter a peephole preview scene in the door, starting the function corresponding to the peephole preview in the door by the intelligent door lock, and starting the function corresponding to the face identification unlocking scene outside the door.
Fig. 2 is a schematic diagram of a correspondence relationship between a driver and a start scene in the cold start method provided in the embodiment of the present application.
The driver provides an interface for hardware (e.g., a display screen) to an operating system for controlling the hardware operation. The correspondence between the driver and the start scene represents the driver needed to implement the function corresponding to the start scene. Taking the take-shot as shown in fig. 1 as an example, for a shooting scene, the corresponding drivers include General-purpose input/output (GPIO) drivers, inter-Integrated Circuit (I2C) drivers, and image sensor drivers. For the view scene, the corresponding drivers include a display screen driver, a memory card (e.g., secure Digital card) driver.
Referring to fig. 2, the electronic device includes a scene a (i.e., a start scene a), a scene B (i.e., a start scene B), and a scene C (i.e., a start scene C), where the driver 1 corresponds to the scene a, the driver 2 corresponds to the scene a, the driver 3 corresponds to the scene a, the scene B (i.e., the start scene B), the driver 4 corresponds to the scene B, the driver 5 corresponds to the scene B, the scene C, the driver 6 corresponds to the scene C, and the driver 7 corresponds to the scene C. That is, scene a corresponds to driver 1, driver 2, and driver 3, scene B corresponds to driver 3, driver 4, and driver 5, and scene C corresponds to driver 5, driver 6, and driver 7.
In one embodiment of the present application, the electronic device includes a plurality of start scenes, and when the electronic device needs to enter one target start scene during cold start, the electronic device preferentially starts a function corresponding to the target start scene during cold start, and then starts functions corresponding to other start scenes. The electronic device may start functions corresponding to other partial start scenes, or may start functions corresponding to all other start scenes.
In another embodiment of the present application, the electronic device includes a plurality of start scenes, and when the electronic device needs to enter one target start scene during cold start, the function corresponding to the target start scene is started during cold start of the electronic device, and the functions corresponding to other start scenes are not started.
If the electronic device starts the functions corresponding to other start scenes (may be other part of start scenes or all of start scenes) in addition to the functions corresponding to the start target start scene during cold start, the start sequence corresponding to each start scene may be set. The starting sequence corresponding to one starting scene is the starting sequence corresponding to the starting scene when the starting scene is taken as the target starting scene.
Fig. 3 is a schematic diagram of a startup sequence corresponding to different startup scenarios in the cold startup method provided in the embodiment of the present application.
In the embodiment shown in fig. 3, the starting sequence corresponding to the starting scene is represented by a starting script. In fig. 3, "caseA" indicates a function corresponding to scene a, "caseB" indicates a function corresponding to scene B, "caseC" indicates a function corresponding to scene C, "user state startup script 1" indicates a startup script corresponding to scene a, "user state startup script 2" indicates a startup script corresponding to scene B, and "user state startup script 3" indicates a startup script corresponding to scene C. As can be seen from fig. 3, the starting sequence corresponding to the scene a is to start the function corresponding to the scene a, then start the function corresponding to the scene B, and finally start the function corresponding to the scene C; the starting sequence corresponding to the scene B is to start the function corresponding to the scene B, then start the function corresponding to the scene A, and finally start the function corresponding to the scene C; the starting sequence corresponding to the scene C is to start the function corresponding to the scene C, then start the function corresponding to the scene A, and finally start the function corresponding to the scene B.
In other embodiments of the present application, the start sequence corresponding to the start scene may be represented by other manners. For example, the start-up sequence corresponding to the start-up scene may be represented by hard coding.
Fig. 4 is a flowchart of a cold start method provided in an embodiment of the present application. The cold start method provided by the embodiment is applied to the electronic equipment.
401, after the electronic device is powered on and the kernel is started, determining a target starting scene of the electronic device.
The electronic device is powered up for a cold start. The electronic device may perform cold start after the user presses a power key of the electronic device, or the electronic device may perform cold start after receiving a power-on signal from another device.
In one embodiment of the present application, an electronic device may receive a scene selection signal, and determine a target activation scene based on the scene selection signal.
In one embodiment of the present application, an electronic device may include multiple physical buttons, and a user may press different buttons to select different startup scenarios when the electronic device is cold-started.
Continuing with the example of the carry-on shoot shown in fig. 1, the carry-on shoot includes a first button and a second button, and the user can press the first button (press the first button to send a first scene selection signal) to select to enter the snapshot scene, or press the second button (press the second button to send a second scene selection signal) to select to enter the view scene when the carry-on shoot is cold started.
In other embodiments of the present application, the electronic device may detect environmental information of the electronic device, and determine the target startup scene according to the environmental information of the electronic device. Continuing with the example of the carry-on racket shown in fig. 1, the carry-on racket may include a distance sensor or a proximity light sensor for detecting whether a user is present in front of the carry-on racket. When detecting that a user exists in front of the portable photo, the electronic device can determine that the target starting scene is a snap shot scene. When detecting that no user exists in front of the handbook, the electronic device can determine that the target starting scene is a view scene.
And 402, initializing a driver corresponding to the target starting scene.
Taking the carry-on photo shown in fig. 1 as an example, assuming that the target starting scene is a capture scene, the driver corresponding to the capture scene includes a GPIO driver, an I2C driver and an image sensor driver, and if the carry-on GPIO driver, the I2C driver and the image sensor driver are not initialized, the carry-on GPIO driver, the I2C driver and the image sensor driver are initialized.
403, starting the function corresponding to the target starting scene.
Taking the carry-on shooting as shown in fig. 1 as an example, if the target starting scene is a shooting scene and the function corresponding to the shooting scene is a shooting function, the shooting function of the carry-on shooting is started.
In the embodiment shown in fig. 4, the electronic device starts the function corresponding to the target start scene in the cold start process, so that the user can use the required function quickly, the response speed of the electronic device after cold start is improved, and the start experience of the user is improved.
Fig. 5 is a flowchart of a cold start method according to another embodiment of the present application. The cold start method provided by the embodiment is applied to the electronic equipment.
501, after the electronic device is powered on and the kernel is started, determining a target startup scene of the electronic device.
In one embodiment of the present application, an electronic device may receive a scene selection signal, and determine a target activation scene based on the scene selection signal.
In another embodiment of the present application, the electronic device may detect environmental information of the electronic device, and determine the target startup scene according to the environmental information of the electronic device.
Taking the portable shooting as shown in fig. 1 as an example, the portable shooting determines that the target starting scene is a shooting scene according to the first scene selection signal received by the user for physics.
502, initializing a driver corresponding to a target starting scene.
Taking the carry-on photo shown in fig. 1 as an example, assuming that the target starting scene is a capture scene, the driver corresponding to the capture scene includes a GPIO driver, an I2C driver and an image sensor driver, and if the carry-on GPIO driver, the I2C driver and the image sensor driver are not initialized, the carry-on GPIO driver, the I2C driver and the image sensor driver are initialized.
503, starting the function corresponding to the target starting scene.
Taking the carry-on shooting as shown in fig. 1 as an example, if the target starting scene is a shooting scene and the function corresponding to the shooting scene is a shooting function, the shooting function of the carry-on shooting is started.
And 504, initializing drivers corresponding to other starting scenes of the electronic equipment.
Taking the carry-on shooting as shown in fig. 1 as an example, assuming that the target starting scene is a shooting scene, other starting scenes comprise view scenes, and the drivers corresponding to the view scenes comprise a display screen driver and a memory card driver, initializing the display screen driver and the memory card driver of the carry-on shooting.
If the driver corresponding to the target start scene exists in the drivers corresponding to the other start scenes, the same driver is not initialized in this step.
505, starting the functions corresponding to other starting scenes of the electronic equipment.
Taking the carry-on photo shown in fig. 1 as an example, assuming that the target starting scene is a snap shot scene, other starting scenes comprise view scenes, and the function corresponding to the view scenes is a picture viewing function, then the carry-on photo viewing function is started.
In the embodiment shown in fig. 5, in the cold start process of the electronic device, the function corresponding to the target start scene is started first, then the functions corresponding to other start scenes are started, and after the function corresponding to the target start scene is started, the user can use the function corresponding to the target start scene, so that the user can quickly use the required function, the response speed of the electronic device after cold start is improved, and the start experience of the user is improved.
In an embodiment of the present application, a startup sequence corresponding to the target startup scene may be preset. Before initializing the drivers corresponding to other starting scenes of the electronic device, a starting sequence corresponding to the target starting scene is set, and the drivers corresponding to the other starting scenes of the electronic device are initialized and the functions corresponding to the other starting scenes are started according to the starting sequence corresponding to the target starting scene. The starting sequence corresponding to the target starting scene can be set through the starting script. For example, referring to fig. 3, assume that a scene a is a target start scene, and the start sequence corresponding to the scene a is to start the function corresponding to the scene a first, then start the function corresponding to the scene B, and finally start the function corresponding to the scene C. When initializing drivers corresponding to other starting scenes of the electronic device and starting functions corresponding to other starting scenes according to fig. 3, the drivers corresponding to the scene B may be first initialized and the functions corresponding to the scene B may be started, and the drivers corresponding to the scene C may be initialized and the functions corresponding to the scene C may be started.
The starting sequence corresponding to the target starting scene can be set in the compiling stage of the electronic equipment.
In one embodiment of the present application, the correspondence between the driver and the start scene may be preset. The correspondence between the driver and the start scene may be set at the compilation stage of the electronic device.
Fig. 6 is a flowchart of a cold start method according to another embodiment of the present application. The cold start method provided by the embodiment is applied to the electronic equipment.
601, after the electronic device is powered on and the kernel is started, determining a target starting scene of the electronic device.
In one embodiment of the present application, an electronic device may receive a scene selection signal, and determine a target activation scene based on the scene selection signal.
In another embodiment of the present application, the electronic device may detect environmental information of the electronic device, and determine the target startup scene according to the environmental information of the electronic device.
Taking the portable shooting as shown in fig. 1 as an example, after a user presses a physical button of the portable shooting, the portable shooting receives a first scene selection signal, and determines that a target starting scene is a snapshot scene according to the first scene selection signal.
And 602, initializing a driver corresponding to the target starting scene.
Taking the carry-on photo shown in fig. 1 as an example, assuming that the target starting scene is a capture scene, the driver corresponding to the capture scene includes a GPIO driver, an I2C driver and an image sensor driver, and if the carry-on GPIO driver, the I2C driver and the image sensor driver are not initialized, the carry-on GPIO driver, the I2C driver and the image sensor driver are initialized.
603, starting the function corresponding to the target starting scene.
Taking the carry-on shooting as shown in fig. 1 as an example, if the target starting scene is a shooting scene and the function corresponding to the shooting scene is a shooting function, the shooting function of the carry-on shooting is started.
And 604, initializing drivers corresponding to other starting scenes of the electronic equipment.
Taking the carry-on shooting as shown in fig. 1 as an example, assuming that the target starting scene is a shooting scene, other starting scenes comprise view scenes, and the drivers corresponding to the view scenes comprise a display screen driver and a memory card driver, initializing the display screen driver and the memory card driver of the carry-on shooting.
If the driver corresponding to the target start scene exists in the drivers corresponding to the other start scenes, the same driver is not initialized in this step.
605, starting the functions corresponding to other starting scenes of the electronic device.
Taking the carry-on photo shown in fig. 1 as an example, assuming that the target starting scene is a snap shot scene, other starting scenes comprise view scenes, and the function corresponding to the view scenes is a picture viewing function, then the carry-on photo viewing function is started.
606, initializing drivers corresponding to other functions of the electronic device.
If the electronic device further includes other functions (functions other than the functions corresponding to the start scene), in this step, the driver corresponding to the other functions of the electronic device is initialized.
Taking the portable photo shown in fig. 1 as an example, if the portable photo further includes an alarm clock function, a driver corresponding to the alarm clock function is initialized.
607, enabling other functions of the electronic device.
If the electronic device further comprises other functions, in this step, the other functions of the electronic device are started.
Taking the portable racket as shown in fig. 1 as an example, if the portable racket further includes an alarm clock function, the alarm clock function of the portable racket is started.
In the embodiment shown in fig. 6, during a cold start process, the electronic device starts a function corresponding to a target start scene, starts functions corresponding to other start scenes, and starts other functions of the electronic device. After the function corresponding to the starting target starting scene is started, the user can use the function corresponding to the starting target starting scene, so that the user can quickly use the required function, the response speed of the electronic equipment after cold starting is improved, and the starting experience of the user is improved.
Fig. 7 is a flowchart of a cold start method according to another embodiment of the present application. The cold start method provided by the embodiment is applied to the electronic equipment. The electronic device includes a kernel-mode process and a user-mode process. The user state process comprises a user state root process and a scene service process. The dashed lines in the figure represent inter-process communication.
The running environment of the program is divided into a user mode and a kernel mode. The application program runs at a low privilege level, and the running environment is in a user mode and cannot directly access kernel space and computer hardware. Applications may use kernel-mode functionality, such as accessing computer hardware, through kernel interfaces such as system calls. The operating system's operating environment is kernel mode.
The process running in the kernel-mode running environment is a kernel-mode process, and the process running in the user-mode running environment is a user-mode process.
As described in fig. 7, the cold start method provided in this embodiment includes:
701, after the electronic device is powered on and the kernel is started, the kernel-mode process determines a target starting scene of the electronic device.
In one embodiment of the present application, a kernel-mode process may receive a scenario selection signal, and determine a target startup scenario according to the scenario selection signal.
In another embodiment of the present application, the kernel-mode process may detect environmental information of the electronic device, and determine the target startup scenario according to the environmental information of the electronic device.
Taking the portable shot shown in fig. 1 as an example, the portable shot receives a first scene selection signal, and the kernel-mode process determines that the target starting scene is a snapshot scene according to the first scene selection signal.
702, the kernel mode process determines whether a driver corresponding to the target boot scenario has been initialized.
Taking the carry-on photo shown in fig. 1 as an example, if the target starting scene is a capture scene, and the driver corresponding to the capture scene includes a GPIO driver, an I2C driver and an image sensor driver, the kernel-mode process determines whether the carry-on GPIO driver, the I2C driver and the image sensor driver are initialized.
703, if the driver corresponding to the target start scene is not initialized, initializing the driver corresponding to the target start scene by the kernel state process.
Taking the carry-on shooting as an example in fig. 1, the target starting scene is a shooting scene, the driver corresponding to the shooting scene comprises a GPIO driver, an I2C driver and an image sensor driver, and if the carry-on shooting GPIO driver, the I2C driver and the image sensor driver are not initialized, the kernel-mode process initializes the carry-on shooting GPIO driver, the I2C driver and the image sensor driver.
The kernel mode process marks 704 that the driver corresponding to the target boot scenario has been initialized.
In this embodiment, a flag bit may be used to indicate whether the driver corresponding to the target boot scene is initialized. For example, if the flag bit is 1, it indicates that the driver corresponding to the target boot scene is initialized; if the flag bit is 0, it indicates that the driver corresponding to the target startup scene is not initialized.
After initializing the driver corresponding to the target boot scenario, the kernel-mode process may modify the flag bit to indicate that the driver corresponding to the target boot scenario is initialized. For example, when the driver corresponding to the target boot scene is not initialized, the flag bit is set to 0, and after initializing the driver corresponding to the target boot scene, the flag bit is modified to 1.
705, the kernel-mode process starts the user-mode root process.
706, the user state root process obtains the target start scene from the kernel state process.
707, the user state root process creates a scene business process for the target startup scene.
Continuing taking the carry-on shot as shown in fig. 1 as an example, assume that the target starting scene is a shot scene, and the user state root process creates a scene service process for the shot scene.
708, the scene business process starts the function corresponding to the target start scene.
Taking the portable shooting as shown in fig. 1 as an example, assuming that the target starting scene is a snapshot scene and the function corresponding to the snapshot scene is a shooting function, the scene service process starts the shooting function of the portable shooting.
709, the scene service process sends a first notification to the user state root process, where the first notification is used to inform the user state root process that the starting of the target starting scene corresponding function is completed.
The user state root process blocks 710 from waiting for the first notification.
When the first notification is received, the user state root process sends a second notification to the kernel state process, and the second notification is used for notifying the kernel state process that the function corresponding to the target starting scene is started, and the flow goes to 702.
And after the user state root process sends a second notification to the kernel state process, the electronic equipment falls into the kernel state from the user state.
712, if the driver corresponding to the target startup scenario is initialized, the kernel-mode process initializes the drivers corresponding to other startup scenarios of the electronic device.
Taking the carry-on shooting as shown in fig. 1 as an example, assuming that the target starting scene is a shooting scene, other starting scenes comprise view scenes, and the drivers corresponding to the view scenes comprise a display screen driver and a memory card driver, initializing the display screen driver and the memory card driver of the carry-on shooting.
713, the kernel-mode process sends a third notification to the user-mode root process, which informs the user-mode root process that the initialization of the driver corresponding to the other startup scenario is completed.
714, the user state process blocks waiting for a third notification.
715, after receiving the third notification, the user state root process starts the functions corresponding to other starting scenes of the electronic device.
Taking the carry-on photo shown in fig. 1 as an example, assuming that the target starting scene is a snap shot scene, other starting scenes comprise view scenes, and the function corresponding to the view scenes is a picture viewing function, then the user state root process starts the carry-on photo viewing function.
According to the technical scheme of fig. 7, the electronic device performs cold start in the electronic device including the kernel mode and the user mode, and the electronic device can enter different start scenes in the cold start process to preferentially start different functions, so that a user can quickly use the required functions, the response speed of the electronic device after cold start is provided, and the start experience of the user is improved.
Fig. 8 is a schematic diagram of cold start according to a cold start method provided in an embodiment of the present application.
As shown in fig. 8, the startup scenes of the electronic device include scene a, scene B, scene C, … …, scene N. The starting sequence corresponding to the scene A is a function A, a function B, a function C, a function … … and a function N. If the driver needs to enter the scene X (X is one of A, B, … … and N) during cold start, initializing the driver corresponding to the scene X, starting the function corresponding to the scene X, initializing the drivers corresponding to other scenes and starting the functions corresponding to other scenes.
Fig. 9 is a schematic hardware structure of an electronic device according to an embodiment of the present application. As shown in fig. 9, the electronic device 90 may include: radio Frequency (RF) circuit 901, memory 902, input unit 903, display unit 904, sensor 905, audio circuit 906, wi-Fi module 907, processor 908, and power supply 909. Those skilled in the art will appreciate that the structure shown in fig. 9 does not constitute a limitation of the electronic device 90, and the electronic device 90 may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components.
The RF circuit 901 may be configured to receive and transmit information or receive and transmit signals during a call, and in particular, after receiving downlink information of a base station, forward the received downlink information to the processor 908 for processing; in addition, data relating to uplink is transmitted to the base station. Generally, RF circuitry 901 includes, but is not limited to: an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc.
The memory 902 may be used to store software programs and modules that the processor 908 performs various functional applications and data processing of the electronic device 90 by executing the software programs and modules stored in the memory 902. The memory 902 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device 90 (such as audio data, phonebooks, etc.), and the like. In addition, the memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 903 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the electronic device 90. In particular, the input unit 903 may include a touch panel 9031 and other input devices 9032. The touch panel 9031, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 9031 or thereabout using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch panel 9031 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 908, and receives and executes commands sent from the processor 908. In addition, the touch panel 9031 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 903 may include other input devices 9032 in addition to the touch panel 9031. In particular, other input devices 9032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 904 may be used to display information input by a user or provided to the user as well as various menus of the electronic device 90. The display unit 904 may include a display panel 9041, and alternatively, the display panel 9041 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 9031 may overlay the display panel 9041, and upon detection of a touch operation thereon or thereabout by the touch panel 9031, the touch operation is communicated to the processor 908 to determine a type of touch event, and the processor 908 then provides a corresponding visual output on the display panel 9041 in accordance with the type of touch event. Although in fig. 9, the touch panel 9031 and the display panel 9041 are two separate components to implement the input and output functions of the electronic device 90, in some embodiments, the touch panel 9031 may be integrated with the display panel 9041 to implement the input and output functions of the electronic device 90.
The electronic device 90 may also include at least one sensor 905, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 9041 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 9041 and/or the backlight when the electronic device 90 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (typically three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of the electronic device 90 (such as horizontal-vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer, knocking), and the like; in addition, other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. may be configured by the electronic device 90, and are not described herein.
The audio circuitry 906, speaker 9061, and microphone 9062 may provide an audio interface between a user and the electronic device 90. The audio circuit 906 may transmit the received electrical signal after audio data conversion to the speaker 9061, and convert the electrical signal into a sound signal for output by the speaker 9061; on the other hand, the microphone 9062 converts the collected sound signal into an electrical signal, receives the electrical signal from the audio circuit 906, converts the electrical signal into audio data, outputs the audio data to the processor 908, sends the audio data to another electronic device via the RF circuit 901, or outputs the audio data to the memory 902 for further processing.
Wi-Fi, which is a short-range wireless transmission technology, can help users to send and receive e-mail, browse web pages, access streaming media, etc. through Wi-Fi module 907, which provides wireless broadband internet access to users. Although fig. 9 shows Wi-Fi module 907, it is to be understood that it does not belong to the necessary constitution of electronic device 90, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 908 is a control center of the electronic device 90, connects various portions of the entire electronic device 90 using various interfaces and lines, and performs various functions of the electronic device 90 and processes data by running or executing software programs and/or modules stored in the memory 902, and invoking data stored in the memory 902, thereby overall monitoring the electronic device 90. Optionally, the processor 908 may include one or more processing units; preferably, the processor 908 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 908.
The electronic device 90 further includes a power supply 909 (e.g., a battery) that powers the various components, optionally in logical communication with the processor 908 via a power management system, to enable management of charge, discharge, and power consumption by the power management system.
Although not shown, the electronic device 90 may further include a camera, a bluetooth module, etc., which will not be described herein.
The electronic device described in fig. 9 may be used to implement part or all of the flow in the method embodiment of the present application, and reference may be made to the related description in the foregoing method embodiment, which is not repeated herein.
Fig. 10 is a schematic software structure of an electronic device according to an embodiment of the present application. In one embodiment of the application, the electronic device is provided with an android system, wherein the android system comprises an application program layer, an application program framework layer, a native C/C++ library, a An Zhuoyun row, a hardware abstraction layer and a kernel layer from top to bottom.
The application layer may include a series of application packages. As shown in fig. 10, the application package may include a gallery, calendar, map, WLAN, music, text messages, calls, navigation, bluetooth, video, etc.
The application framework layer may include a window manager, an activity manager, an input manager, a resource manager, a notification manager view system, a content provider, and the like.
The window manager provides window management services (Window Manager Service, WMS) that may be used for window management, window animation management, surface management, and as a transfer station to the input system.
The activity manager may provide activity management services (Activity Manager Service, AMS) that may be used for system component (e.g., activity, service, content provider, broadcast receiver) start-up, handoff, scheduling, and application process management and scheduling tasks.
The input manager may provide input management services (Input Manager Service, IMS), which may be used to manage inputs to the system, such as touch screen inputs, key inputs, sensor inputs, and the like. The IMS retrieves events from the input device node and distributes the events to the appropriate windows through interactions with the WMS.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. Such as prompting text messages in status bars, sounding prompts, vibrating electronic devices, flashing indicator lights, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The native C/c++ library may include a plurality of functional modules. For example: surface manager (surface manager), media Framework (Media Framework), C standard function library (libc), openGL ES, SQLite, webkit, etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media frames support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media framework may support a variety of audio video coding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The C standard function library is a collection of all header files (head files) matching the standard in the C language programming, and a commonly used function library implementation program.
OpenGL ES provides for drawing and manipulation of 2D graphics and 3D graphics in applications.
SQLite provides a lightweight relational database for applications of electronic devices.
Android runtime includes An Zhuoyun rows and core libraries. The android runtime is responsible for converting source code into machine code. Android runtime mainly includes employing Advanced Or Time (AOT) compilation techniques and Just In Time (JIT) compilation techniques. The core library is mainly used for providing the functions of basic Java class libraries, such as basic data structures, mathematics, IO, tools, databases, networks and the like. The core library provides an API for the user to develop the android application.
The hardware abstraction layer runs in a user space (user space), encapsulates the kernel layer driver, and provides a call interface to the upper layer.
The kernel layer is a layer between hardware and software. The kernel layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
In other embodiments of the present application, the electronic device may be installed with other operating systems, such as iOS, linux.
The present embodiment also provides a computer storage medium having stored therein computer instructions which, when executed on an electronic device, cause the electronic device to perform the above-described related method steps to implement the cold start method in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on an electronic device, causes the electronic device to perform the above-described related steps to implement the cold start method in the above-described embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component, or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the cold start method in the above method embodiments.
The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding methods provided above, and will not be described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated unit may be stored in a readable storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A cold start method, the method comprising:
after the electronic equipment is powered on and a kernel is started, determining a target starting scene of the electronic equipment;
initializing a driver corresponding to the target starting scene;
and starting the function corresponding to the target starting scene.
2. The cold start method of claim 1, wherein the determining a target start scenario for an electronic device comprises:
receiving a scene selection signal, and determining the target starting scene according to the scene selection signal; or alternatively
And detecting the environment information of the electronic equipment, and determining the target starting scene according to the environment information of the electronic equipment.
3. The cold start method of claim 2, wherein receiving the scene selection signal comprises:
and receiving the scene selection signal sent by the user by pressing a physical button of the electronic device.
4. The cold start method of claim 1, wherein the electronic device comprises a smart door lock, a smart doorbell, a drone, a handgun.
5. The cold start method of any one of claims 1 to 4, further comprising:
Initializing drivers corresponding to other starting scenes of the electronic equipment;
and starting the functions corresponding to other starting scenes of the electronic equipment.
6. The cold start method of claim 5, wherein before initializing drivers corresponding to other start scenes of the electronic device, the method further comprises:
setting a starting sequence corresponding to the target starting scene.
7. The cold start method of claim 6, wherein the setting the start sequence corresponding to the target start scene comprises:
and setting a starting sequence corresponding to the target starting scene through a starting script.
8. The cold start method of claim 5, further comprising:
if the electronic equipment also comprises other functions, initializing a driver corresponding to the other functions of the electronic equipment;
and starting other functions of the electronic equipment.
9. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the cold start method of any one of claims 1 to 8.
10. An electronic device comprising a processor and a memory, the memory for storing instructions, the processor for invoking the instructions in the memory to cause the electronic device to perform the cold start method of any of claims 1-8.
CN202111212140.1A 2021-10-18 2021-10-18 Cold start method and related equipment Pending CN115993993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111212140.1A CN115993993A (en) 2021-10-18 2021-10-18 Cold start method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111212140.1A CN115993993A (en) 2021-10-18 2021-10-18 Cold start method and related equipment

Publications (1)

Publication Number Publication Date
CN115993993A true CN115993993A (en) 2023-04-21

Family

ID=85992848

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111212140.1A Pending CN115993993A (en) 2021-10-18 2021-10-18 Cold start method and related equipment

Country Status (1)

Country Link
CN (1) CN115993993A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117496920A (en) * 2023-12-27 2024-02-02 成都万创科技股份有限公司 High-brightness multimedia display device based on HDBASE-T multi-input

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117496920A (en) * 2023-12-27 2024-02-02 成都万创科技股份有限公司 High-brightness multimedia display device based on HDBASE-T multi-input
CN117496920B (en) * 2023-12-27 2024-04-16 成都万创科技股份有限公司 HDBASE-T multi-input-based highlight multimedia display equipment

Similar Documents

Publication Publication Date Title
JP7098757B2 (en) How to implement application functions and electronic devices
CN115454286B (en) Application data processing method and device and terminal equipment
EP3115880B1 (en) Apparatus and method for providing memo function
CN110703972B (en) File control method and electronic equipment
CN113220176B (en) Display method and device based on widget, electronic equipment and readable storage medium
CN110995917A (en) Screen locking and unlocking method and mobile terminal
CN111935516B (en) Audio file playing method, device, terminal, server and storage medium
CN110865837A (en) Method and terminal for upgrading system
CN111857531A (en) Mobile terminal and file display method thereof
CN111597004A (en) Terminal and user interface display method in application
CN107766222A (en) Blank screen detection method, mobile terminal and computer-readable recording medium
CN107704332A (en) Freeze screen solution method, mobile terminal and computer-readable recording medium
CN110865765A (en) Terminal and map control method
CN115993993A (en) Cold start method and related equipment
CN111935353B (en) Mobile terminal and short message display method thereof
CN107861827A (en) Card screen detection method, mobile terminal and computer-readable recording medium
CN116048765B (en) Task processing method, sample data processing method and electronic equipment
CN107832191A (en) Blank screen detection method, mobile terminal and computer-readable recording medium
CN107872367A (en) Blank screen detection method, mobile terminal and computer-readable recording medium
CN116700601B (en) Memory optimization method, equipment and storage medium
JP7319431B2 (en) Application function implementation method and electronic device
CN109547696A (en) A kind of image pickup method and terminal device
CN111163220B (en) Display method, communication terminal and computer storage medium
CN113031838B (en) Screen recording method and device and electronic equipment
CN112114883A (en) Terminal awakening method, terminal and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination