WO2023001033A1 - 镜像启动的方法、生成镜像的方法和电子设备 - Google Patents

镜像启动的方法、生成镜像的方法和电子设备 Download PDF

Info

Publication number
WO2023001033A1
WO2023001033A1 PCT/CN2022/105385 CN2022105385W WO2023001033A1 WO 2023001033 A1 WO2023001033 A1 WO 2023001033A1 CN 2022105385 W CN2022105385 W CN 2022105385W WO 2023001033 A1 WO2023001033 A1 WO 2023001033A1
Authority
WO
WIPO (PCT)
Prior art keywords
partition
file
writable
electronic device
image
Prior art date
Application number
PCT/CN2022/105385
Other languages
English (en)
French (fr)
Inventor
闫康杰
刘伟
田春
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023001033A1 publication Critical patent/WO2023001033A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present application relates to the field of electronic devices, and more specifically, to a method for starting an image, a method for generating an image, and an electronic device.
  • the startup process of electronic equipment is complicated. It is necessary to load the kernel module through the bootloader, enter the initialization module, and then start the system to display the user-operable interface, which takes a long time and affects the user experience. Therefore, how to improve the startup speed of electronic equipment It has become a technical problem that needs to be solved urgently.
  • the present application provides a method for starting a mirror image, a method for generating a mirror image, and an electronic device, which can improve the startup speed of the electronic device and ensure the stability of the mirror image.
  • a method for generating an image includes:
  • Identify the writable file partition of the file system according to the writable file partition, obtain a first process and a second process, the first process is an application process for accessing the writable file partition, and the second process is for accessing the writable file partition
  • the system process of the file partition close the first process, generate the first partition, write the file of the writable file partition accessed by the second process to the first partition; unload the writable file partition, and generate a system image .
  • the first process is closed, and the file accessed by the second process is written to the first partition, and the writable file partition is uninstalled
  • the system image is decoupled from the writable file partition, and the information of the writable file partition is not included in the system image, which avoids the problem of inconsistency of the file system data after the electronic device loads the system image, and improves the electronic security.
  • the boot speed of the device and the stability of the image recovery process is not included in the system image.
  • the method before identifying the writable file partition of the file system, the method further includes: detecting whether it is the first boot; the identifying the writable file partition of the file system, Including: identifying the writable file partition of the file system when it is detected that it is the first boot.
  • the method before identifying the writable file partition of the file system, the method further includes: detecting whether the system image is included; the identifying the writable file partition of the file system includes : When it is detected that the system image is not included, identify the writable file partition of the file system.
  • the method further includes: reloading the writable file partition to restore the system.
  • the method further includes:
  • Restarting the system includes: loading a kernel module; obtaining the system image and loading the system image; obtaining the writable file partition and loading the writable file partition to complete the restart of the system.
  • the method further includes: generating a backup file according to user data.
  • a method for image startup includes: loading a kernel module; obtaining a system image, and loading the system image; obtaining a writable file partition, and loading the writable file partition, to complete the electronic device
  • the system image is obtained by a method for generating an image
  • the method for generating an image includes: identifying the writable file partition of the file system; obtaining the first process and the second process according to the writable file partition, the second process A process is an application program process that accesses the writable file partition, and the second process is a system process that accesses the writable file partition; the first process is closed, and the first partition is generated, and the writable file partition accessed by the second process is The files of the write-file partition are written to the first partition; the writable file partition is unmounted, and the system image is generated.
  • the system image when the electronic device is started, after the kernel module is loaded, the system image is loaded. Since the system image does not include the relevant information in the writable file partition, the inconsistency of the file system data after the electronic device is started is avoided. Improve the startup speed of electronic devices and the stability of image recovery.
  • the method further includes: obtaining a backup file, and loading the backup file to restore user data.
  • the method before obtaining the system image and loading the system image, the method further includes: detecting whether the system image is included; obtaining the system image, and loading the system image , including: when it is detected that the system image is included, acquiring the system image and loading the system image.
  • an electronic device including: a processing unit, configured to identify a writable file partition of a file system; an obtaining unit, configured to obtain a first process and a second process according to the writable file partition, the first process One process is an application program process that accesses the writable file partition, and the second process is a system process that accesses the writable file partition; the processing unit is also used to close the first process, generate the first partition, and the second process The files of the writable file partition accessed by the second process are written into the first partition; the processing unit is also used to unmount the writable file partition and generate a system image.
  • the processing unit before the processing unit is used to identify the writable file partition of the file system, the processing unit is also used to detect whether it is the first boot; the processing unit , for identifying the writable file partition of the file system, including: when it is detected that it is the first boot, the processing unit is specifically used for identifying the writable file partition of the file system.
  • the processing unit before the processing unit is used to identify the writable file partition of the file system, the processing unit is also used to detect whether a system image is included; the processing unit, The method for identifying the writable file partition of the file system includes: when it is detected that the system image is not included, the processing unit is specifically used for identifying the writable file partition of the file system.
  • the processing unit is further configured to reload the writable file partition to restore the system.
  • the processing unit is also used to restart the system, including: the processing unit is used to load the kernel module; the obtaining unit is used to obtain the system image and The writable file partition; the processing unit is also used to load the system image and the writable file partition to complete the restart of the system.
  • the processing unit is further configured to generate a backup file according to user data.
  • the electronic device generates a system image after uninstalling the writable file partition, and the system image does not include the information of the writable file partition, which avoids the problem of inconsistent file system data after the electronic device loads the system image. Improve the startup speed of the electronic device and the stability of the image recovery process.
  • an electronic device including: a processing unit, used to load a kernel module; an obtaining unit, used to obtain a system image, and the processing unit is also used to load the system image; the obtaining unit is also used to In order to obtain the writable file partition, the processing unit is also used to load the writable file partition to complete the startup of the electronic device; wherein, the system image is obtained by a method of generating an image, and the method of generating an image includes: the processing The unit is used to identify the writable file partition of the file system; the obtaining unit is used to obtain the first process and the second process according to the writable file partition, and the first process is an application program that accesses the writable file partition process, the second process is a system process that accesses the writable file partition; the processing unit is also used to close the first process and generate the first partition, and the file in the writable file partition accessed by the second process write to
  • the obtaining unit is further configured to obtain a backup file
  • the processing unit is further configured to load the backup file to restore user data.
  • the acquiring unit is configured to acquire the system image, and the processing unit is also configured to detect whether the system image is included before loading the system image.
  • System image the obtaining unit is used to obtain the system image, and the processing unit is also used to load the system image, including: when it is detected that the system image is included, the obtaining unit is used to obtain the system image, and the processing unit , which is also used to load the system image.
  • the system image when the electronic device is started, after the kernel module is loaded, the system image is loaded. Since the system image does not include the relevant information in the writable file partition, the inconsistency of the file system data after the electronic device is started is avoided. Improve the startup speed of electronic devices and the stability of image recovery.
  • a computer-readable storage medium which stores a computer program, and when the computer program is run on a computer, the computer executes the technical solution according to the above aspect and any possible design of the above aspect.
  • a computer program product which, when running on a processor, causes the processor to execute the technical solution of the above aspect and any possible design of the above aspect.
  • a chip in a seventh aspect, includes a processor and a data interface, and the processor reads instructions stored in the memory through the data interface, so as to execute the technical solution of the above aspect and any possible design of the above aspect.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a block diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • Fig. 3 is an exemplary flowchart of a method for generating a system image provided by an embodiment of the present application.
  • Fig. 4 is an exemplary flow chart of a method for starting an electronic device image provided by an embodiment of the present application.
  • Fig. 5 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
  • references to "one embodiment” or “some embodiments” or the like in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
  • the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
  • the electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and/or a music player, such as a mobile phone, a tablet computer, a wearable electronic device with a wireless communication function (such as a smart watch) Wait.
  • portable electronic devices include, but are not limited to Or portable electronic devices with other operating systems.
  • the aforementioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop). It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, compass 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent components, or may be integrated in one or more processors.
  • the electronic device 101 may also include one or more processors 110 . Among them, the controller can generate operation control signals according to instruction opcodes and timing signals, and complete the control of fetching and executing instructions.
  • a memory may also be set in the processor 110 for storing instructions and data.
  • the memory in the processor 110 may be a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. In this way, repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 101 in processing data or executing instructions.
  • processor 110 may include one or more interfaces.
  • the interface may include inter-integrated circuit (I2C) interface, inter-integrated circuit sound (I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous transceiver (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input/output (general-purpose input/output, GPIO) interface, SIM card interface, and/or USB interface, etc.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 101 , and can also be used to transmit data between the electronic device 101 and peripheral devices.
  • the USB interface 130 can also be used to connect earphones to play audio through the earphones.
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, WiFi) network), bluetooth (bluetooth, BT), global navigation satellite system ( Global navigation satellite system (GNSS), frequency modulation (frequency modulation, FM), near field communication (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (liquid crystal display, LCD), organic light-emitting diode (organic light-emitting diode, OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include one or more display screens 194 .
  • the display screen 194 in FIG. 1 above when materials such as OLED, AMOLED, and FLED are used for the display panel, the display screen 194 in FIG. 1 above can be bent.
  • the above-mentioned display screen 194 being bendable means that the display screen 194 can be bent to any angle at any position, and can be kept at this angle, for example, the display screen 194 can be folded in half from the middle. It can also be folded in half from the middle up and down.
  • the display screen 194 of the electronic device 100 may be a flexible screen.
  • the flexible screen has attracted much attention due to its unique characteristics and great potential.
  • flexible screens have the characteristics of strong flexibility and bendability, which can provide users with a new interaction method based on bendable characteristics, and can meet more needs of users for electronic devices.
  • the foldable display screen on the electronic device can be switched between a small screen in a folded state and a large screen in an unfolded state at any time. Therefore, users use the split-screen function more and more frequently on electronic devices equipped with foldable display screens.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 , and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include one or more cameras 193 .
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store one or more computer programs including instructions.
  • the processor 110 may execute the above-mentioned instructions stored in the internal memory 121, so that the electronic device 101 executes the methods provided in some embodiments of the present application, as well as various applications and data processing.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system; the stored program area can also store one or more applications (such as a gallery, contacts, etc.) and the like.
  • the storage data area can store data (such as photos, contacts, etc.) created during the use of the electronic device 101 .
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 may execute the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor 110, so that the electronic device 101 executes the instructions provided in the embodiments of the present application. methods, and other applications and data processing.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the pressure sensor 180A is used for sensing pressure signals, and can convert the pressure signals into electrical signals.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes ie, X, Y and Z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also known as "touch panel”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application package may include application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer, and the application framework layer includes some predefined functions.
  • API application programming interface
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, and the like.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
  • the resource manager provides various resources to the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompting text information in the status bar issuing a prompt sound, vibrating electronic equipment, and flashing an indicator light, etc.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of many commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG and PNG.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing, etc.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • File system The software responsible for managing and storing file information in the operating system is called the file system.
  • the file system is the method and data structure used by the operating system to specify the files on the storage device or partition, that is, the method of organizing files on the storage device.
  • a file system includes three parts, which are the interface of the file system, the software collection for object operation and management, objects and attributes.
  • a file system is a system that organizes and allocates the space of a file storage device, is responsible for file storage, and protects and retrieves stored files. Specifically, it is responsible for creating, saving, reading, modifying, and dumping files for users, and controlling file access and revocation, etc.
  • Mounting refers to a process in which the operating system makes files and directories on a storage device accessible to users through the file system.
  • mounting may also be referred to as loading.
  • the storage device may be an external storage device, or may be a partition on a hard disk on which an operating system is installed.
  • the startup process of electronic equipment is complicated. It needs to load the kernel by booting, enter the initialization module, and then start the system to display the user-operable interface, which takes a long time and affects the user experience.
  • In order to improve the startup speed of electronic equipment in electronic equipment After starting up, identify the core process of the system and make a system image.
  • the system image is a fixed image. When the electronic device is turned on later, the fixed image can be loaded to improve the startup speed, but the system image contains writable files. Partition information, because the user may generate new information in the writable file partition during the use of the electronic device, resulting in inconsistent file system data generated after the loaded system image restores the system.
  • the embodiment of the present application provides A method for generating a system image, which can generate a system image that does not contain writable file partition information, so that the system image can be used to quickly start an electronic device, and the inconsistency of file system data will not occur.
  • FIG. 3 shows an exemplary flow chart of a method 300 for generating a system image provided by an embodiment of the present application, and the process includes:
  • the file system includes multiple partitions, for example, a readable file partition, a writable file partition, and the like.
  • the kernel module is first loaded, and then multiple partitions in the file system (loading the file system) are mounted, and then operations such as initializing the operating system framework are performed to enter the operation interface, thereby completing the startup of the electronic device.
  • the electronic device can identify the different partitions in the file system.
  • the electronic device can automatically identify writable file partitions in the file system.
  • a writable file partition can be understood as a partition where a user can add or delete files in the partition during the use of the electronic device.
  • the writable file partition includes multiple files, and the multiple files may be application program files, system files, and the like.
  • the electronic device After the electronic device recognizes the writable file partition, it can determine the application program process accessing the writable partition file and the system process accessing the writable partition file according to the writable file partition, wherein the accessing of the writable partition file
  • the application may include: the application is located in the writable file partition, or the application is not located in the writable file partition, but the application accesses files in the writable file partition when running.
  • the application program process accessing the writable file partition is called the first process
  • the system process accessing the writable file partition is called the second process
  • the first process includes a common application process and a persistent application process (persistent process).
  • Ordinary application process can be understood as the process corresponding to the application program that needs to be opened by the user
  • the permanent application process can be understood as the process corresponding to the application program that is automatically started and running after the electronic device is started, and can also be called a resident background process.
  • the permanent application process may be a process corresponding to a system application program.
  • the application program can be an SMS application program
  • the electronic device can automatically start the SMS application program after starting, thereby generating a process corresponding to the SMS application program, which needs to access files in the writable file partition, so the process can be called for the first process.
  • the electronic device After the electronic device obtains the first process and the second process, since the first process is an application program process, after closing the first process, the system can still run normally, so the first process can be closed. In addition, the electronic device can also generate the first partition, and write the files in the writable file partition accessed by the second process to the first partition. Since the second process is a system process that the operating system depends on when it is running, it cannot be closed. The first partition is generated, and the files of the writable file partition accessed by the second process are written into the first partition, thereby ensuring the normal operation of the system.
  • the electronic device closes the first process and writes the files of the writable file partition accessed by the second process into the first partition, so that the application program in the writable file partition no longer runs, so that the electronic device can uninstall the writable file Partition and ensure the normal operation of the system.
  • the first process may be a process corresponding to the SMS application program, and the electronic device may close the process so that the SMS application program does not run anymore.
  • the writable file partition can be unmounted (umount). Since the files in the file-writable partition accessed by the second process are written into the first partition, the electronic device can operate normally when the file-writable partition is unmounted.
  • unmounting in the embodiment of the present application corresponds to mounting (loading), so unloading the writable file partition can be understood as the electronic device canceling the association between the operating system and the writable file partition.
  • the process running in the memory of the electronic device is the process corresponding to the file in the partition other than the writable file partition in the file system, so the electronic device can generate a system image according to the process running in the memory. Since the system image is generated after the electronic device uninstalls the writable file partition, the system image does not include the relevant information of the writable file partition, and when the electronic device starts using the system image, there will be no writable file partition data inconsistencies.
  • the electronic device can unmount the writable file partition through Quickboot Service.
  • the example of uninstalling the writable file partition through Quickboot Service is used, but it is not limited thereto.
  • the writable file partition can also be uninstalled through other technologies.
  • the running system can be suspended by Hibernate technology, and then the process in the memory can be saved as a mirror image.
  • other technologies can also be used to generate the system image, which is not limited in the embodiment of the present application, and the system image of the embodiment of the application is generated by other technologies, which should fall within the scope of protection of the present application.
  • the electronic device may first detect whether it is the first boot, if it is the first boot, the electronic device will not contain a system image, Then execute the above steps S310 to S340.
  • the electronic device may first detect whether the system image is included, and if the electronic device does not include the system image, the electronic device performs the above steps S310 to S340.
  • the electronic device before identifying the writable file partition of the file system, the electronic device can first detect whether it is the first boot and whether it contains a system image. When mirroring, the electronic device executes the above steps S310 to S340.
  • the electronic device can remount the writable file partition (load the writable file partition) to restore the application program before the system image is generated to meet the needs of the user.
  • the electronic device can be restarted, and during the restart process, the system image and the writable file partition can be loaded.
  • the system image and the writable file partition can be loaded.
  • the electronic device may save data generated by the user during use of the electronic device (hereinafter referred to as user data), such as data generated by an application program used by the user, and form a backup file based on the user data for When the electronic device is started, the backup file is loaded, so that the electronic device is restored to the last power-off state after starting.
  • user data data generated by the user during use of the electronic device
  • the backup file is loaded, so that the electronic device is restored to the last power-off state after starting.
  • the first process is closed, and the file accessed by the second process is written to the first partition, and the writable file partition is uninstalled
  • the system image is decoupled from the writable file partition, and the information of the writable file partition is not included in the system image, which avoids the problem of inconsistency of the file system data after the electronic device loads the system image, and improves the electronic security.
  • the boot speed of the device and the stability of the image recovery process is not included in the system image.
  • FIG. 4 shows an exemplary flow chart of a method 400 for starting an electronic device image provided by an embodiment of the present application, and the process includes:
  • a boot program (such as a Bootloader) is executed to load a kernel module.
  • the kernel module is the socket provided by the operating system.
  • the kernel module can be composed of a set of functions and data structures, which are used to implement functions such as file system and driver. Exemplarily, as shown in FIG. 2 , multiple drivers such as display startup, camera driver, audio driver, and sensor driver can be implemented through a kernel module.
  • the electronic device After the electronic device loads the kernel module, it can load the system image.
  • the system image is obtained by the method of the foregoing embodiment.
  • the system image includes the system process in the memory of the electronic device after unloading the writable file partition. After the electronic device loads the system image, the electronic device can be restored to the system state when the system image was generated, and the operating system framework does not need to be reinitialized, thereby improving the startup speed of the electronic device.
  • the system image is stored in the hard disk, and after the electronic device finishes loading the kernel module, it loads the system image into the memory, triggers a resume process, and starts to restore the system process in the system image.
  • the system image when the electronic device is started, after the kernel module is loaded, the system image is loaded, and the system image does not include the information of the writable file partition, which avoids the inconsistency of the file system data after the electronic device loads the system image and restores the system problem, improved the startup speed of electronic devices and the stability of the image recovery process.
  • the electronic device before the electronic device loads the system image, it can detect whether the system image is included in the electronic device. If the system image is not included in the electronic device, the electronic device will follow the In the startup mode, if the electronic device includes the system image, the electronic device loads the system image.
  • the electronic device loads the system image and restores it to the system state when the system image is generated, and can mount the writable file partition (alternatively, it can also be referred to as mounting the writable file partition).
  • the writable file partition is a writable file partition that the electronic device unloads when generating the system image. After the electronic device loads the writable file partition, the restoration of the operating system is completed.
  • the electronic device may also generate a loading node (alternatively, it may also be called a mounting node), and the loading node is used to instruct the electronic device to load a writable file partition after loading the system image.
  • the electronic device after the electronic device loads the writable file partition, the electronic device enters the operable interface, and then automatically loads the backup file, which is generated according to user data, and the electronic device completes the loading of the backup file After that, the user data can be restored, so that the electronic device can be restored to the state when it was last powered off.
  • the electronic device by loading the backup file, the electronic device can be restored to the state when it was last powered off, thereby avoiding data loss.
  • the device of the embodiment of the present application will be described below with reference to FIG. 5 . It should be understood that the device described below can execute the method of the aforementioned embodiment of the present application. In order to avoid unnecessary repetition, repeated descriptions are appropriately omitted when introducing the device of the embodiment of the present application below.
  • Fig. 5 is a schematic block diagram of an electronic device according to an embodiment of the present application.
  • the electronic device 500 shown in FIG. 5 includes a processing unit 510 and an acquiring unit 520 .
  • the processing unit 510 and the obtaining unit 520 are used to execute the method for generating a system image and the quick start method of the embodiment of the present application, specifically to execute the method 300 and the method 400, wherein when the processing unit 510 and the obtaining unit 520 execute the method 300 ,include:
  • the processing unit 510 is configured to identify writable file partitions.
  • the acquiring unit 520 is configured to acquire the first process and the second process according to the writable file partition.
  • the processing unit 510 is further configured to close the first process, generate the first partition, and write the second process into the first partition.
  • the processing unit 510 is further configured to unmount the writable file partition and generate a system image.
  • the processing unit 510 before the processing unit 510 identifies the writable file partition, the processing unit 510 is also configured to detect whether the electronic device is powered on for the first time, and if the electronic device is powered on for the first time, the electronic device The system image will not be included in the system image, and the processing unit 510 is used to identify the writable file partition, close the first process, generate the first partition, write the second process into the first partition, unmount the writable file partition, and generate the system image .
  • the processing unit 510 before the processing unit 510 identifies the writable file partition, the processing unit 510 is also configured to detect whether the electronic device includes a system image, and if the electronic device includes a system image, the electronic device will not Including the system image, the processing unit 510 is used to identify the writable file partition, close the first process, generate the first partition, write the second process into the first partition, unload the writable file partition, and generate the system image.
  • the processing unit 510 before the processing unit 510 identifies the writable file partition, the processing unit 510 is also used to detect whether the electronic device is powered on for the first time and whether it includes a system image, if the electronic device is the first time When booting and not including the system image, the processing unit 510 is used to identify the writable file partition, close the first process, generate the first partition, write the second process into the first partition, unload the writable file partition, and generate the system mirror image.
  • the processing unit 510 before the processing unit 510 unloads the writable file partition, the processing unit 510 is also used to save the data generated by the user during the use of the electronic device (hereinafter referred to as user data), such as the The data generated by the application program forms a backup file according to the user data, which is used to load the backup file when the electronic device is started, so that the electronic device can be restored to the last power-off state after startup.
  • the backup file can be stored in the writable file partition middle.
  • processing unit 510 and the obtaining unit 520 execute the method 400, it includes:
  • the processing unit 510 is configured to load a kernel module.
  • the obtaining unit 520 is configured to obtain a system image and a writable file partition.
  • the processing unit 510 is further configured to load the system image and load the writable file partition to restore the system.
  • the processing unit 510 before the processing unit 510 loads the system image, the processing unit 510 is further configured to detect whether the electronic device includes the system image, and if the electronic device does not include the system image, the processing unit 510 According to the starting manner before the system image is created, if the electronic device includes the system image, the processing unit 510 loads the system image.
  • the processing unit 510 loads the system image
  • the obtaining unit 520 is further configured to obtain a backup file
  • the processing unit 510 is further configured to load the backup file, which is generated based on user data
  • the processing unit 510 finishes loading the backup file, it can restore the user data, so that the electronic device can be restored to the state when it was last powered off.
  • a "unit” may be a software program, a hardware circuit or a combination of both to realize the above functions.
  • the hardware circuitry may include application specific integrated circuits (ASICs), electronic circuits, processors (such as shared processors, dedicated processors, or group processors) for executing one or more software or firmware programs. etc.) and memory, incorporating logic, and/or other suitable components to support the described functionality.
  • ASICs application specific integrated circuits
  • processors such as shared processors, dedicated processors, or group processors for executing one or more software or firmware programs. etc.
  • memory incorporating logic, and/or other suitable components to support the described functionality.
  • the units of each example described in the embodiments of the present application can be realized by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • the method provided in the embodiments of the present application is introduced from the perspective of an electronic device serving as an execution subject.
  • the electronic device may include a hardware structure and/or a software module, and realize the above-mentioned functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above-mentioned functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
  • the embodiment of the present application also provides an electronic device, including: a processor, a memory, one or more sensors, a power key, an application program, and a computer program.
  • the various components described above may be connected by one or more communication buses.
  • the one or more computer programs are stored in the above-mentioned memory and are configured to be executed by the one or more processors, the one or more computer programs include instructions, and the above-mentioned instructions can be used to make the electronic device execute the above-mentioned Each step of the method in the embodiment.
  • the above-mentioned processor may specifically be the processor 110 shown in FIG. 2
  • the above-mentioned memory may specifically be the internal memory 120 shown in FIG. 2
  • the sensor may specifically be one or more sensors in the sensor module 150 shown in FIG. 2
  • the power key may be the power key 141 shown in FIG. 2 .
  • the embodiment of the present application does not impose any limitation on this.
  • the terms “when” or “after” may be interpreted to mean “if” or “after” or “in response to determining" or “in response to detecting ".
  • the phrases “in determining” or “if detected (a stated condition or event)” may be interpreted to mean “if determining" or “in response to determining" or “on detecting (a stated condition or event)” or “in response to detecting (a stated condition or event)”.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present invention will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a Solid State Disk (SSD)).
  • a magnetic medium for example, a floppy disk, a hard disk, or a magnetic tape
  • an optical medium for example, DVD
  • a semiconductor medium for example, a Solid State Disk (SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

本申请提供了镜像启动的方法、生成镜像的方法和电子设备,该方法包括:识别文件系统的可写文件分区;根据可写文件分区,获取第一进程和第二进程,第一进程为访问可写文件分区的应用程序进程,第二进程为访问可写文件分区的系统进程;关闭所述第一进程;生成第一分区,将第二进程访问的可写文件分区的文件写入到第一分区;卸载可写文件分区,并生成系统镜像。本申请实施例的生成镜像的方法,生成的镜像中不包括可写文件分区的信息,避免了电子设备加载该系统镜像后的文件系统数据不一致的问题,提升了电子设备的启动速度和镜像恢复过程的稳定性。

Description

镜像启动的方法、生成镜像的方法和电子设备
本申请要求于2021年07月21日提交中国专利局、申请号为202110824352.9、申请名称为“镜像启动的方法、生成镜像的方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子设备领域,并且更具体地,涉及镜像启动的方法、生成镜像的方法和电子设备。
背景技术
电子设备的启动过程复杂,需要通过启动引导程序加载内核模块,进入初始化模块,然后启动系统,显示用户可操作的界面,耗时时间长,影响用户的体验,因此,如何提高电子设备的启动速度成为了一个亟待解决的技术问题。
发明内容
本申请提供镜像启动的方法、生成镜像的方法和电子设备,能够提高电子设备的启动速度,保证镜像的稳定性。
第一方面,提供了一种生成镜像的方法,该方法包括:
识别文件系统的可写文件分区;根据该可写文件分区,获取第一进程和第二进程,该第一进程为访问该可写文件分区的应用程序进程,该第二进程为访问该可写文件分区的系统进程;关闭该第一进程,生成第一分区,将该第二进程访问的该可写文件分区的文件写入到该第一分区;卸载该可写文件分区,并生成系统镜像。
本申请实施例中,通过识别可写文件分区,并获取第一进程和第二进程,将第一进程关闭,并将第二进程访问的文件写入到第一分区,并卸载可写文件分区后生成系统镜像,使得系统镜像与可写文件分区解耦,则该系统镜像中不包括可写文件分区的信息,避免了电子设备加载该系统镜像后的文件系统数据不一致的问题,提升了电子设备的启动速度和镜像恢复过程的稳定性。
结合第一方面,在第一方面的某些实现方式中,该识别文件系统的可写文件分区之前,该方法还包括:检测是否为第一次开机;该识别文件系统的可写文件分区,包括:当检测到是第一次开机时,识别该文件系统的该可写文件分区。
结合第一方面,在第一方面的某些实现方式中,该识别文件系统的可写文件分区之前,该方法还包括:检测是否包括该系统镜像;该识别文件系统的可写文件分区,包括:当检测到未包括该系统镜像时,识别该文件系统的该可写文件分区。
结合第一方面,在第一方面的某些实现方式中,该生成系统镜像之后,该方法还包括:重新加载该可写文件分区以恢复系统。
结合第一方面,在第一方面的某些实现方式中,该生成系统镜像之后,该方法还包括:
重新启动系统;该重新启动系统,包括:加载内核模块;获取该系统镜像,并加载该系统镜像;获取该可写文件分区,并加载该可写文件分区,以完成该系统的重启。
结合第一方面,在第一方面的某些实现方式中,该方法还包括:根据用户数据生成备份文件。
第二方面,提供了一种镜像启动的方法,该方法包括:加载内核模块;获取系统镜像,并加载该系统镜像;获取可写文件分区,并加载该可写文件分区,以完成该电子设备的启动;其中,该系统镜像通过生成镜像方法得到,该生成镜像的方法,包括:识别文件系统的该可写文件分区;根据该可写文件分区,获取第一进程和第二进程,该第一进程为访问该可写文件分区的应用程序进程,该第二进程为访问该可写文件分区的系统进程;关闭该第一进程,并生成第一分区,将该第二进程访问的该可写文件分区的文件写入到该第一分区;卸载该可写文件分区,并生成该系统镜像。
本申请实施例中,电子设备启动时,在加载内核模块后,加载系统镜像,由于该系统镜像中不包括可写文件分区中的相关信息,避免了电子设备启动后文件系统数据不一致的情况,提高了电子设备的启动速度和镜像恢复的稳定性。
结合第二方面,在第二方面的某些实现方式中,该方法还包括:获取备份文件,并加载该备份文件以恢复用户数据。
结合第二方面,在第二方面的某些实现方式中,该获取系统镜像,并加载该系统镜像之前,该方法还包括:检测是否包括该系统镜像;该获取系统镜像,并加载该系统镜像,包括:当检测到包括该系统镜像时,获取该系统镜像,并加载该系统镜像。
第三方面,提供了一种电子设备,包括:处理单元,用于识别文件系统的可写文件分区;获取单元,用于根据该可写文件分区,获取第一进程和第二进程,该第一进程为访问该可写文件分区的应用程序进程,该第二进程为访问该可写文件分区的系统进程;该处理单元,还用于关闭该第一进程,生成第一分区,将该第二进程访问的该可写文件分区的文件写入到该第一分区;该处理单元,还用于卸载该可写文件分区,并生成系统镜像。
结合第三方面,在第三方面的某些实现方式中,该处理单元,用于识别文件系统的可写文件分区之前,该处理单元,还用于检测是否为第一次开机;该处理单元,用于识别文件系统的可写文件分区,包括:当检测到是第一次开机时,该处理单元,具体用于识别该文件系统的该可写文件分区。
结合第三方面,在第三方面的某些实现方式中,该处理单元,用于识别文件系统的可写文件分区之前,该处理单元,还用于检测是否包括系统镜像;该述处理单元,用于识别文件系统的可写文件分区,包括:当检测到未包括该系统镜像时,该处理单元,具体用于识别该文件系统的该可写文件分区。
结合第三方面,在第三方面的某些实现方式中,该处理单元,还用于重新加载该可写文件分区以恢复系统。
结合第三方面,在第三方面的某些实现方式中,该处理单元,还用于重新启动系统,包括:该处理单元,用于加载内核模块;该获取单元,用于获取该系统镜像和该可写文件分区;该处理单元,还用于加载该系统镜像和该可写文件分区,以完成该系统的重启。
结合第三方面,在第三方面的某些实现方式中,该处理单元,还用于根据用户数据生 成备份文件。
本申请实施例中,电子设备在卸载可写文件分区后生成系统镜像,则该系统镜像中不包括可写文件分区的信息,避免了电子设备加载该系统镜像后的文件系统数据不一致的问题,提升了电子设备的启动速度和镜像恢复过程的稳定性。
结合第四方面,提供了一种电子设备,包括:处理单元,用于加载内核模块;获取单元,用于获取系统镜像,该处理单元,还用于加载该系统镜像;该获取单元,还用于获取可写文件分区,该处理单元,还用于加载该可写文件分区,以完成该电子设备的启动;其中,该系统镜像通过生成镜像方法得到,该生成镜像的方法,包括:该处理单元,用于识别文件系统的该可写文件分区;该获取单元,用于根据该可写文件分区,获取第一进程和第二进程,该第一进程为访问该可写文件分区的应用程序进程,该第二进程为访问该可写文件分区的系统进程;该处理单元,还用于关闭该第一进程,并生成第一分区,将该第二进程访问的该可写文件分区的文件写入到该第一分区;该处理单元,还用于卸载该可写文件分区,并生成该系统镜像。
结合第四方面,在第四方面的某些实现方式中,该获取单元,还用于获取备份文件,该处理单元,还用于加载该备份文件,以恢复用户数据。
结合第四方面,在第四方面的某些实现方式中,该获取单元,用于获取系统镜像,该处理单元,还用于加载该系统镜像之前,该处理单元,还用于检测是否包括该系统镜像;该获取单元,用于获取系统镜像,该处理单元,还用于加载该系统镜像,包括:当检测到包括该系统镜像时,该获取单元,用于获取该系统镜像,该处理单元,还用于加载该系统镜像。
本申请实施例中,电子设备启动时,在加载内核模块后,加载系统镜像,由于该系统镜像中不包括可写文件分区中的相关信息,避免了电子设备启动后文件系统数据不一致的情况,提高了电子设备的启动速度和镜像恢复的稳定性。
第五方面,提供了一种计算机可读存储介质,其存储有计算机程序,当该计算机程序在计算机上运行时,使得该计算机执行如上述方面及其上述方面任一可能设计的技术方案。
第六方面,提供了一种计算机程序产品,当其在处理器上运行时,使得处理器执行如上述方面及其上述方面任一可能设计的技术方案。
第七方面,提供了一种芯片,该芯片包括处理器与数据接口,该处理器通过该数据接口读取存储器上存储的指令,以执行上述方面及其上述方面任一可能设计的技术方案。
其中,第五方面至第七方面的有益效果,请参见第一方面至第二方面的有益效果,不重复赘述。
附图说明
图1是本申请实施例提供的一种电子设备的结构示意图。
图2是本申请实施例提供的一例电子设备的软件结构框图。
图3是本申请实施例提供的生成系统镜像的方法的示例性流程图。
图4是本申请实施例提供的电子设备镜像启动的方法的示例性流程图。
图5是本申请实施例提供的电子设备的示意性框图。
具体实施方式
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个、两个或两个以上。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
以下介绍电子设备、用于这样的电子设备的用户界面、和用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是还包含其它功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2022105385-appb-000001
Figure PCTCN2022105385-appb-000002
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是台式计算机。
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,指南针190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备101也可以包括一个或多个处理器110。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成 取指令和执行指令的控制。在其他一些实施例中,处理器110中还可以设置存储器,用于存储指令和数据。示例性地,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。这样就避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备101处理数据或执行指令的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口,集成电路间音频(nter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM卡接口,和/或USB接口等。其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备101充电,也可以用于电子设备101与外围设备之间传输数据。该USB接口130也可以用于连接耳机,通过耳机播放音频。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例 中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,WiFi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像、视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)、有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED)、柔性发光二极管(flex light-emitting diode,FLED)、Miniled、MicroLed、Micro-oLed、量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或多个显示屏194。
在本申请的一些实施例中,当显示面板采用OLED、AMOLED、FLED等材料时,上述图1中的显示屏194可以被弯折。这里,上述显示屏194可以被弯折是指显示屏可以在任意部位被弯折到任意角度,并可以在该角度保持,例如,显示屏194可以从中部左右对折。也可以从中部上下对折。
电子设备100的显示屏194可以是一种柔性屏,目前,柔性屏以其独特的特性和巨大的潜力而备受关注。柔性屏相对于传统屏幕而言,具有柔韧性强和可弯曲的特点,可以给用户提供基于可弯折特性的新交互方式,可以满足用户对于电子设备的更多需求。对于配置有可折叠显示屏的电子设备而言,电子设备上的可折叠显示屏可以随时在折叠形态下的小屏和展开形态下大屏之间切换。因此,用户在配置有可折叠显示屏的电子设备上使用分屏功能,也越来越频繁。
电子设备100可以通过ISP、摄像头193、视频编解码器、GPU、显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点、亮度、肤色进行算法优化。ISP还可以对拍摄场景的曝光、色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体 (complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或多个摄像头193。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1、MPEG2、MPEG3、MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别、人脸识别、语音识别、文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备101执行本申请一些实施例中所提供的方法,以及各种应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统;该存储程序区还可以存储一个或多个应用(比如图库、联系人等)等。存储数据区可存储电子设备101使用过程中所创建的数据(比如照片,联系人等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器110可以通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,来使得电子设备101执行本申请实施例中所提供的方法,以及其他应用及数据处理。电子设备100可以通过音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、以及应用处理器等实现音频功能。例如音乐播放、录音等。
传感器模块180可以包括压力传感器180A、陀螺仪传感器180B、气压传感器180C、磁传感器180D、加速度传感器180E、距离传感器180F、接近光传感器180G、指纹传感器180H、温度传感器180J、触摸传感器180K、环境光传感器180L、骨传导传感器180M等。
其中,压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力 传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即X、Y和Z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
图2是本申请实施例的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。
如图2所示,应用程序包可以包括相机、图库、日历、通话、地图、导航、WLAN、蓝牙、音乐、视频、短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming  interface,API)和编程框架,应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器、内容提供器、视图系统、电话管理器、资源管理器、通知管理器等。
窗口管理器用于管理窗口程序,窗口管理器可以获取显示屏大小,判断是否有状态栏、锁定屏幕、截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频、图像、音频、拨打和接听的电话、浏览历史和书签、电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串、图标、图片、布局文件、视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息、发出提示音、电子设备振动、指示灯闪烁等。
系统库可以包括多个功能模块。例如:表面管理器(surface manager)、媒体库(media libraries)、三维图形处理库(例如:OpenGL ES)、2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频、视频格式回放和录制以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4、H.264、MP3、AAC、AMR、JPG和PNG等。
三维图形处理库用于实现三维图形绘图、图像渲染、合成和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动、摄像头驱动、音频驱动、传感器驱动。
在介绍本申请实施例的之前,先介绍几个和本申请实施例相关的概念。
文件系统:操作系统中负责管理和存储文件信息的软件称为文件系统,文件系统是操作系统用于明确存储设备或分区上的文件的方法和数据结构,即在存储设备上组织文件的方法。一般来说,文件系统包括3部分,分别是文件系统的接口、对对象操作和管理的软件集合、对象及属性。从系统角度来看,文件系统是对文件存储设备的空间进行组织和分配,负责文件存储并对存入的文件进行保护和检索的系统。具体地说,负责为用户建立文件、存入、读出、修改、转储文件,控制文件的存取、撤销等。
文件系统的类型有很多,本申请实施例中对于文件系统的类型并不作限定。
挂载(mount),挂载是指操作系统使一个存储设备上的文件和目录可供用户通过文件系统访问的一个过程。
替代性的,本申请实施例中,还可以将挂载称为加载。
需要说明的是,存储设备可以是是外部的存储设备,还可以是安装操作系统的硬盘上的分区。
电子设备的启动过程复杂,需要通过启动引导加载内核,进入初始化模块,然后启动系统,显示用户可操作的界面,耗时时间长,影响用户的体验,为了提高电子设备的启动速度,在电子设备开机后,识别系统核心进程,并制作系统镜像,该系统镜像为固定镜像,当该电子设备在后续开机时,可以加载该固定镜像,从而可以提高启动速度,但是该系统镜像中包含可写文件分区信息,由于用户在使用电子设备的过程中,可能会在可写文件分区中生成新的信息,从而导致加载的系统镜像恢复系统后产生的文件系统数据不一致,基于此,本申请实施例提供了一种生成系统镜像的方法,可以生成不包含可写文件分区信息的系统镜像,从而可以使用该系统镜像快速启动电子设备,并且不会发生文件系统数据不一致的情况。
下面结合图3介绍本申请实施例提供的生成系统镜像的方法的示例性流程图。
图3示出了本申请实施例提供的生成系统镜像的方法300的示例性流程图,该流程包括:
S310,识别可写文件分区。
文件系统中包括多个分区,例如,可读文件分区、可写文件分区等。电子设备在启动过程中,首先加载内核模块,然后挂载文件系统(加载文件系统)中的多个分区,然后进行初始化操作系统框架等操作,进入操作界面,从而完成电子设备的启动。电子设备完成启动后,可以识别文件系统中的不同分区。本申请实施例中,电子设备可以自动识别文件系统中的可写文件分区。可写文件分区可以理解为用户在使用该电子设备的过程中,可以在该分区中增加或者删除文件的分区。可写文件分区中包括多个文件,该多个文件可以为应用程序文件、系统文件等。
S320,根据可写文件分区,获取第一进程和第二进程。
电子设备在识别到可写文件分区后,可以根据该可写文件分区,确定访问该可写分区文件的应用程序进程和访问该可写分区文件的系统进程,其中,访问该可写分区文件的应用程序可以包括:该应用程序位于可写文件分区,或者该应用程序不位于可写文件分区,但该应用程序运行时,访问了可写文件分区中的文件。本申请实施例中,访问该可写文件分区的应用程序进程称为第一进程,将访问该可写文件分区的系统进程称为第二进程
需要说明的是,第一进程包括普通应用进程和永久应用进程(persistentprocess)。普通应用进程可以理解为需要用户打开的应用程序对应的进程,永久应用进程可以理解为电子设备在启动后,自动启动并运行的应用程序对应的进程,也可以称为常驻后台的进程,其中永久应用进程可以是系统应用程序对应的进程。
示例性的,该应用程序可以是短信应用程序,电子设备启动后会可以自动启动短信应用程序,从而生成短信应用程序对应的进程,该进程需要访问可写文件分区的文件,因此该进程可以称为第一进程。
S330,关闭第一进程,生成第一分区,将第二进程访问的可写文件分区的文件写入第一分区。
电子设备获取到第一进程和第二进程后,由于第一进程是应用程序进程,将第一进程 关闭后,系统仍可以正常运行,因此可以关闭第一进程。此外,电子设备还可以生成第一分区,并将第二进程访问的可写文件分区的文件写入到第一分区,由于第二进程是操作系统运行时依赖的系统进程,因此不能关闭,通过生成第一分区,将第二进程访问的可写文件分区的文件写入到第一分区,从而保证了系统的正常运行。
电子设备通过关闭第一进程,并将第二进程访问的可写文件分区的文件写入到第一分区中,使得可写文件分区中的应用程序不再运行,使得电子设备可以卸载可写文件分区并保证系统的正常运行。
示例性的,如S320中所述,第一进程可以为短信应用程序对应的进程,电子设备可以关闭该进程,使得短信应用程序不再运行。
S340,卸载可写文件分区,生成系统镜像。
电子设备关闭第一进程并将第二进程写入到第一分区后,可以卸载(umount)可写文件分区。由于第二进程访问的可写文件分区的文件被写入到第一分区中,卸载可写文件分区时,电子设备可以正常运行。
需要说明的是,本申请实施例中的卸载与挂载(加载)对应,因此卸载可写文件分区可以理解为电子设备取消操作系统与可写文件分区的关联。
当卸载可写文件分区后,电子设备内存中运行的进程是文件系统中除可写文件分区之外的分区的文件对应的进程,因此电子设备可以根据内存中运行的进程生成系统镜像。由于该系统镜像是在电子设备卸载可写文件分区后生成的,从而该系统镜像中不包括可写文件分区的相关信息,电子设备在使用该系统镜像启动时,则不会出现可写文件分区的数据不一致的问题。
在一些实施例中,电子设备可以通过Quickboot Service卸载可写文件分区。本申请实施例中以通过Quickboot Service卸载可写文件分区为例,但是并不限定于此,本申请中还可以通过其他技术卸载可写文件分区。
在一些实施例中,可以通过Hibernate技术将正在运行的系统暂停,然后将内存中的进程保存为镜像。本申请实施例中还可以通过其他技术生成系统镜像,本申请实施例对此不作限定,通过其他技术以生成本申请实施例的系统镜像,均应落入本申请的保护范围之内。
可选地,在一些实施例中,在识别文件系统的可写文件分区之前,电子设备可以先检测是否为第一次开机,如果是第一次开机,则电子设备中不会包含系统镜像,则执行上述步骤S310至S340。
可选地,在一些实施例中,在识别文件系统的可写文件分区之前,电子设备可以先检测是否包括系统镜像,如果电子设备中不包括系统镜像,则电子设备执行上述步骤S310至S340。
可选地,在一些实施例中,在识别文件系统的可写文件分区之前,电子设备可以先检测是否为第一次开机和是否包含系统镜像,当电子设备是第一次开机且不包含系统镜像时,则电子设备执行上述步骤S310至S340。
可选地,在一些实施例中,生成系统镜像后,电子设备可以重新挂载可写文件分区(加载可写文件分区),以恢复在生成系统镜像之前的应用程序,以满足用户的需求。
可选地,在一些实施例中,生成系统镜像后,电子设备可以重新启动,并在重新启动 的过程中,加载系统镜像和可写文件分区,具体描述可以参见下文描述,在此不再赘述。
可选地,在一些实施例中,电子设备可以保存用户在使用电子设备过程中生成的数据(下文简称用户数据),例如用户使用的应用程序产生的数据,根据用户数据形成备份文件,用以在电子设备启动时,加载该备份文件,使得电子设备启动后恢复到最后一次掉电的状态。
本申请实施例中,通过识别可写文件分区,并获取第一进程和第二进程,将第一进程关闭,并将第二进程访问的文件写入到第一分区,并卸载可写文件分区后生成系统镜像,使得系统镜像与可写文件分区解耦,则该系统镜像中不包括可写文件分区的信息,避免了电子设备加载该系统镜像后的文件系统数据不一致的问题,提升了电子设备的启动速度和镜像恢复过程的稳定性。
下面结合图4介绍本申请实施例提供的快速启动的方法的示例性流程图。
图4示出了本申请实施例提供的电子设备镜像启动的方法400的示例性流程图,该流程包括:
S410,加载内核模块。
电子设备上电后执行引导程序(例如Bootloader),加载内核模块。内核模块时操作系统对外提供的插口,内核模块可以由一组函数和数据结构组成,用来实现文件系统、驱动程序等功能。示例性的,如图2所示,可以通过内核模块,实现显示启动、摄像头驱动、音频驱动、传感器驱动等多个驱动程序。
S420,获取系统镜像并加载系统镜像。
电子设备加载内核模块后,可以加载系统镜像,该系统镜像是通过前述实施例的方法得到的,该系统镜像中包括了电子设备在卸载可写文件分区后的内存中的系统进程。电子设备加载该系统镜像后,电子设备可以恢复至生成该系统镜像时的系统状态,则可以不需要重新初始化操作系统框架,从而提高了电子设备的启动速度。
示例性,该系统镜像存储在硬盘中,电子设备完成加载内核模块后,加载系统镜像至内存中,触发resume进程,从而开始恢复系统镜像中的系统进程。
应理解,本申请实施例中以触发resume进程恢复系统镜像中的系统进程为例,但并不限定于此,还可以通过其他方式恢复系统镜像中的系统进程。
本申请实施例中,电子设备启动时,加载内核模块后,加载系统镜像,该系统镜像中不包括可写文件分区的信息,避免了电子设备加载该系统镜像恢复系统后的文件系统数据不一致的问题,提升了电子设备的启动速度和镜像恢复过程的稳定性。
可选地,在一些实施例中,电子设备在加载系统镜像之前,可以检测电子设备中是否包括该系统镜像,如果电子设备中没有包括该系统镜像时,则电子设备按照未制作系统镜像时的启动方式,如果电子设备中包括该系统镜像时,则电子设备加载该系统镜像。
S430,获取可写文件分区并加载可写文件分区以恢复系统。
电子设备加载系统镜像恢复至生成该系统镜像时的系统状态,可以加载可写文件分区(替代性的,也可以称为挂载可写文件分区)。该可写文件分区为电子设备在生成系统镜像时卸载的可写文件分区。电子设备加载该可写文件分区后,完成操作系统的恢复。电子设备在生成系统镜像时,还可以生成加载节点(替代性地,也可以称为挂载节点),该加载节点用于指示电子设备加载系统镜像后,加载可写文件分区。
可选地,在一些实施例中,电子设备加载可写文件分区后,电子设备进入可以操作界面,然后可以自动加载备份文件,该备份文件是根据用户数据生成的,电子设备完成备份文件的加载后,则可以恢复用户数据,使得电子设备恢复到最后一次掉电时的状态。
本申请实施例中,通过加载备份文件,可以使得电子设备恢复到最后一次掉电时的状态,避免了数据的丢失。
下面结合图5对本申请实施例的装置进行说明。应理解,下面描述的装置能够执行前述本申请实施例的方法,为了避免不必要的重复,下面在介绍本申请实施例的装置时适当省略重复的描述。
图5是本申请实施例的电子设备的示意性框图。图5所示电子设备500包括处理单元510和获取单元520。
处理单元510和获取单元520用于执行本申请实施例的生成系统镜像的方法和快速启动的方法,具体地用以执行方法300和执行方法400,其中处理单元510和获取单元520执行方法300时,包括:
处理单元510,用于识别可写文件分区。
获取单元520,用于根据可写文件分区,获取第一进程和第二进程。
处理单元510,还用于关闭第一进程,生成第一分区,将第二进程写入到第一分区中。
处理单元510,还用于卸载可写文件分区,生成系统镜像。
可选地,在一些实施例中,处理单元510在识别可写文件分区之前,处理单元510,还用于检测电子设备是否是第一次开机,如果电子设备是第一次开机,则电子设备中不会包含系统镜像,处理单元510则用于识别可写文件分区,关闭第一进程,生成第一分区,将第二进程写入到第一分区中,卸载可写文件分区,生成系统镜像。
可选地,在一些实施例中,处理单元510在识别可写文件分区之前,处理单元510,还用于检测电子设备是否包括系统镜像,如果电子设备中包括系统镜像,则电子设备中不会包含系统镜像,处理单元510则用于识别可写文件分区,关闭第一进程,生成第一分区,将第二进程写入到第一分区中,卸载可写文件分区,生成系统镜像。
可选地,在一些实施例中,处理单元510在识别可写文件分区之前,处理单元510,还用于检测电子设备是否是第一次开机和是否包括系统镜像,如果电子设备是第一次开机且不包括系统镜像时,处理单元510则用于识别可写文件分区,关闭第一进程,生成第一分区,将第二进程写入到第一分区中,卸载可写文件分区,生成系统镜像。
可选地,在一些实施例中,处理单元510在卸载可写文件分区之前,处理单元510,还用于保存用户在使用电子设备过程中生成的数据(下文简称用户数据),例如用户使用的应用程序产生的数据,根据用户数据形成备份文件,用以在电子设备启动时,加载该备份文件,使得电子设备启动后恢复到最后一次掉电的状态,该备份文件可以存储在可写文件分区中。
其中处理单元510和获取单元520执行方法400时,包括:
处理单元510,用于加载内核模块。
获取单元520,用于获取系统镜像和可写文件分区。
处理单元510,还用于加载系统镜像和加载可写文件分区以恢复系统。
可选地,在一些实施例中,处理单元510加载系统镜像之前,处理单元510,还用于 检测电子设备中是否包括该系统镜像,如果电子设备中没有包括该系统镜像时,则处理单元510按照未制作系统镜像前的启动方式,如果电子设备中包括该系统镜像时,则处理单元510加载该系统镜像。
可选地,在一些实施例中,处理单元510加载系统镜像之后,获取单元520,还用于获取备份文件,处理单元510,还用于加载该备份文件,该备份文件是根据用户数据生成的,处理单元510完成备份文件加载后,则可以恢复用户数据,使得电子设备恢复到最后一次掉电时的状态。
需要说明的是,上述电子设备500以功能单元的形式体现。这里的术语“单元”可以通过软件和/或硬件形式实现,对此不作具体限定。
例如,“单元”可以是实现上述功能的软件程序、硬件电路或二者结合。所述硬件电路可能包括应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。
因此,在本申请的实施例中描述的各示例的单元,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
以上各个实施例可以单独使用,也可以相互结合使用,以实现不同的技术效果。
上述本申请提供的实施例中,从电子设备作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,电子设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。
本申请实施例还提供了一种电子设备,包括:处理器、存储器、一个或多个传感器、电源键、应用程序以及计算机程序。上述各器件可以通过一个或多个通信总线连接。其中,该一个或多个计算机程序被存储在上述存储器中并被配置为被该一个或多个处理器执行,该一个或多个计算机程序包括指令,上述指令可以用于使电子设备执行上述各实施例中的方法的各个步骤。
示例性的,上述处理器具体可以为图2所示的处理器110,上述存储器具体可以为图2所示的内部存储器120和/或与电子设备连接的外部存储器,上述显示屏具体可以为图2所示的显示屏130,上述传感器具体可以为图2所示的传感器模块150中的一个或多个传感器,上述电源键可以为图2所示的电源键141。本申请实施例对此不做任何限制。
以上实施例中所用,根据上下文,术语“当…时”或“当…后”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产 品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。在不冲突的情况下,以上各实施例的方案都可以组合使用。

Claims (21)

  1. 一种生成镜像的方法,其特征在于,应用于电子设备中,所述方法包括:
    识别文件系统的可写文件分区;
    根据所述可写文件分区,获取第一进程和第二进程,所述第一进程为访问所述可写文件分区的应用程序进程,所述第二进程为访问所述可写文件分区的系统进程;
    关闭所述第一进程,生成第一分区,将所述第二进程访问的所述可写文件分区的文件写入到所述第一分区;
    卸载所述可写文件分区,并生成系统镜像。
  2. 根据权利要求1所述的方法,其特征在于,所述识别文件系统的可写文件分区之前,所述方法还包括:
    检测是否为第一次开机;
    所述识别文件系统的可写文件分区,包括:
    当检测到是第一次开机时,识别所述文件系统的所述可写文件分区。
  3. 根据权利要求1或2所述的方法,其特征在于,所述识别文件系统的可写文件分区之前,所述方法还包括:
    检测是否包括所述系统镜像;
    所述识别文件系统的可写文件分区,包括:
    当检测到未包括所述系统镜像时,识别所述文件系统的所述可写文件分区。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述生成系统镜像之后,所述方法还包括:
    重新加载所述可写文件分区以恢复系统。
  5. 根据权利要求1至3中任一项所述的方法,其特征在于,所述生成系统镜像之后,所述方法还包括:
    重新启动系统,包括:
    加载内核模块;
    获取所述系统镜像,并加载所述系统镜像;
    获取所述可写文件分区,并加载所述可写文件分区,以完成所述系统的重新启动。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:
    根据用户数据生成备份文件。
  7. 一种镜像启动的方法,其特征在于,应用于电子设备中,所述方法包括:
    加载内核模块;
    获取系统镜像,并加载所述系统镜像;
    获取可写文件分区,并加载所述可写文件分区,以完成所述电子设备的启动;
    其中,所述系统镜像通过生成镜像方法得到,所述生成镜像的方法,包括:
    识别文件系统的所述可写文件分区;
    根据所述可写文件分区,获取第一进程和第二进程,所述第一进程为访问所述可写文件分区的应用程序进程,所述第二进程为访问所述可写文件分区的系统进程;
    关闭所述第一进程,生成第一分区,将所述第二进程访问的所述可写文件分区的文件写入到所述第一分区;
    卸载所述可写文件分区,并生成所述系统镜像。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    获取备份文件,并加载所述备份文件以恢复用户数据。
  9. 根据权利要求7或8所述的方法,其特征在于,所述获取系统镜像,并加载所述系统镜像之前,所述方法还包括:
    检测是否包括所述系统镜像;
    所述获取系统镜像,并加载所述系统镜像,包括:
    当检测到包括所述系统镜像时,获取所述系统镜像,并加载所述系统镜像。
  10. 一种电子设备,其特征在于,包括:
    处理单元,用于识别文件系统的可写文件分区;
    获取单元,用于根据所述可写文件分区,获取第一进程和第二进程,所述第一进程为访问所述可写文件分区的应用程序进程,所述第二进程为访问所述可写文件分区的系统进程;
    所述处理单元,还用于关闭所述第一进程,生成第一分区,将所述第二进程访问的所述可写文件分区的文件写入到所述第一分区;
    所述处理单元,还用于卸载所述可写文件分区,并生成系统镜像。
  11. 根据权利要求10所述的电子设备,其特征在于,所述处理单元,用于识别文件系统的可写文件分区之前,所述处理单元,还用于检测是否为第一次开机;
    所述处理单元,用于识别文件系统的可写文件分区,包括:
    当检测到是第一次开机时,所述处理单元,具体用于识别所述文件系统的所述可写文件分区。
  12. 根据权利要求10或11所述的电子设备,其特征在于,所述处理单元,用于识别文件系统的可写文件分区之前,所述处理单元,还用于检测是否包括系统镜像;
    所述述处理单元,用于识别文件系统的可写文件分区,包括:
    当检测到未包括所述系统镜像时,所述处理单元,具体用于识别所述文件系统的所述可写文件分区。
  13. 根据权利要求10至12中任一项所述的电子设备,其特征在于,所述处理单元,还用于重新加载所述可写文件分区以恢复系统。
  14. 根据权利要求10至12中任一项所述的电子设备,其特征在于,所述处理单元,还用于重新启动系统,包括:
    所述处理单元,用于加载内核模块;
    所述获取单元,用于获取所述系统镜像和所述可写文件分区;
    所述处理单元,还用于加载所述系统镜像和所述可写文件分区,以完成所述系统的重启。
  15. 根据权利要求10至14中任一项所述的电子设备,其特征在于,所述处理单元,还用于根据用户数据生成备份文件。
  16. 一种电子设备,其特征在于,包括:
    处理单元,用于加载内核模块
    获取单元,用于获取系统镜像,所述处理单元,还用于加载所述系统镜像;
    所述获取单元,还用于获取可写文件分区,所述处理单元,还用于加载所述可写文件分区,以完成所述电子设备的启动;
    其中,所述系统镜像通过生成镜像方法得到,所述生成镜像的方法,包括:
    所述处理单元,用于识别文件系统的所述可写文件分区;
    所述获取单元,用于根据所述可写文件分区,获取第一进程和第二进程,所述第一进程为访问所述可写文件分区的应用程序进程,所述第二进程为访问所述可写文件分区的系统进程;
    所述处理单元,还用于关闭所述第一进程,并生成第一分区,将所述第二进程访问的所述可写文件分区的文件写入到所述第一分区;
    所述处理单元,还用于卸载所述可写文件分区,并生成所述系统镜像。
  17. 根据权利要求16所述的电子设备,其特征在于,所述获取单元,还用于获取备份文件,所述处理单元,还用于加载所述备份文件,以恢复用户数据。
  18. 根据权利要求16或17所述的电子设备,其特征在于,所述获取单元,用于获取系统镜像,所述处理单元,还用于加载所述系统镜像之前,所述处理单元,还用于检测是否包括所述系统镜像;
    所述获取单元,用于获取系统镜像,所述处理单元,还用于加载所述系统镜像,包括:
    当检测到包括所述系统镜像时,所述获取单元,用于获取所述系统镜像,所述处理单元,还用于加载所述系统镜像。
  19. 一种计算机可读存储介质,其存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1-6或7-9中任意一项所述的方法。
  20. 一种计算机程序产品,当其在处理器上运行时,使得处理器执行权利要求1-6或7-9中任一项所述的方法。
  21. 一种芯片,其特征在于,所述芯片包括处理器与数据接口,所述处理器通过所述数据接口读取存储器上存储的指令,以执行如权利要求1-6或7-9中任一项所述的方法。
PCT/CN2022/105385 2021-07-21 2022-07-13 镜像启动的方法、生成镜像的方法和电子设备 WO2023001033A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110824352.9A CN115700466A (zh) 2021-07-21 2021-07-21 镜像启动的方法、生成镜像的方法和电子设备
CN202110824352.9 2021-07-21

Publications (1)

Publication Number Publication Date
WO2023001033A1 true WO2023001033A1 (zh) 2023-01-26

Family

ID=84978992

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/105385 WO2023001033A1 (zh) 2021-07-21 2022-07-13 镜像启动的方法、生成镜像的方法和电子设备

Country Status (2)

Country Link
CN (1) CN115700466A (zh)
WO (1) WO2023001033A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1534490A (zh) * 2003-03-31 2004-10-06 联想(北京)有限公司 一种计算机硬盘数据恢复和备份的实现方法
US20050044548A1 (en) * 2003-08-20 2005-02-24 John Page Efficient replication of embedded operating system with a write filter and overlay partition
CN105302663A (zh) * 2015-09-19 2016-02-03 华为技术有限公司 一种镜像开机方法和终端设备
CN105677335A (zh) * 2015-12-29 2016-06-15 广东欧珀移动通信有限公司 提高移动终端首次开机速度的方法及装置
CN106502739A (zh) * 2016-10-31 2017-03-15 北京深之度科技有限公司 利用移动存储设备制作启动盘的方法、装置和计算设备
CN108170568A (zh) * 2017-12-26 2018-06-15 深圳市奇虎智能科技有限公司 智能设备的出厂测试方法、装置和刷机包生成方法、装置
CN112214279A (zh) * 2020-09-14 2021-01-12 苏州浪潮智能科技有限公司 一种基于磁盘镜像创建虚拟机的方法及系统
CN112445495A (zh) * 2019-08-28 2021-03-05 曙光信息产业(北京)有限公司 一种高性能计算集群节点的镜像与恢复方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1534490A (zh) * 2003-03-31 2004-10-06 联想(北京)有限公司 一种计算机硬盘数据恢复和备份的实现方法
US20050044548A1 (en) * 2003-08-20 2005-02-24 John Page Efficient replication of embedded operating system with a write filter and overlay partition
CN105302663A (zh) * 2015-09-19 2016-02-03 华为技术有限公司 一种镜像开机方法和终端设备
CN105677335A (zh) * 2015-12-29 2016-06-15 广东欧珀移动通信有限公司 提高移动终端首次开机速度的方法及装置
CN106502739A (zh) * 2016-10-31 2017-03-15 北京深之度科技有限公司 利用移动存储设备制作启动盘的方法、装置和计算设备
CN108170568A (zh) * 2017-12-26 2018-06-15 深圳市奇虎智能科技有限公司 智能设备的出厂测试方法、装置和刷机包生成方法、装置
CN112445495A (zh) * 2019-08-28 2021-03-05 曙光信息产业(北京)有限公司 一种高性能计算集群节点的镜像与恢复方法
CN112214279A (zh) * 2020-09-14 2021-01-12 苏州浪潮智能科技有限公司 一种基于磁盘镜像创建虚拟机的方法及系统

Also Published As

Publication number Publication date
CN115700466A (zh) 2023-02-07

Similar Documents

Publication Publication Date Title
WO2021083378A1 (zh) 一种加速应用程序启动的方法及电子设备
WO2020103764A1 (zh) 一种语音控制方法及电子设备
CN114443277A (zh) 内存管理方法、装置、电子设备以及计算机可读存储介质
CN113553130B (zh) 应用执行绘制操作的方法及电子设备
WO2021159746A1 (zh) 文件共享方法、系统及相关设备
WO2021052311A1 (zh) 一种根据后壳颜色显示用户界面的方法和电子设备
WO2021057203A1 (zh) 一种操作方法和电子设备
CN113805797B (zh) 网络资源的处理方法、电子设备及计算机可读存储介质
WO2021185352A1 (zh) 一种版本升级方法及相关装置
WO2021175272A1 (zh) 一种应用信息的显示方法及相关设备
WO2022078105A1 (zh) 内存管理方法、电子设备以及计算机可读存储介质
CN111381996B (zh) 内存异常处理方法及装置
WO2023051094A1 (zh) 内存回收方法、装置、电子设备及可读存储介质
WO2023001033A1 (zh) 镜像启动的方法、生成镜像的方法和电子设备
CN115119048A (zh) 一种视频流处理方法及电子设备
WO2021238376A1 (zh) 功能包的加载方法、装置、服务器和电子设备
CN114461589B (zh) 读取压缩文件的方法、文件系统及电子设备
CN111581119B (zh) 页面回收方法及装置
CN112783418B (zh) 一种存储应用程序数据的方法及移动终端
CN115543276A (zh) 一种用于实现软件开发的方法、系统以及电子设备
WO2022252939A1 (zh) 一种共享桌面的方法和电子设备
WO2024017351A1 (zh) 调用系统服务的方法和装置
WO2022247614A1 (zh) 一种多界面显示的方法和电子设备
CN117312055B (zh) 数据备份的方法及相关装置
WO2024017332A1 (zh) 控制部件的方法及相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22845198

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE