WO2022037725A1 - 一种系统服务恢复方法、装置和电子设备 - Google Patents

一种系统服务恢复方法、装置和电子设备 Download PDF

Info

Publication number
WO2022037725A1
WO2022037725A1 PCT/CN2021/125423 CN2021125423W WO2022037725A1 WO 2022037725 A1 WO2022037725 A1 WO 2022037725A1 CN 2021125423 W CN2021125423 W CN 2021125423W WO 2022037725 A1 WO2022037725 A1 WO 2022037725A1
Authority
WO
WIPO (PCT)
Prior art keywords
samgr
electronic device
proxy object
local manager
processor
Prior art date
Application number
PCT/CN2021/125423
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 WO2022037725A1 publication Critical patent/WO2022037725A1/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
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • 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
    • 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
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error
    • 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
    • G06F11/1479Generic software techniques for error detection or fault masking

Definitions

  • the present application relates to the field of electronic technologies, and in particular, to a system service recovery method, apparatus, and electronic device.
  • the present application discloses a system service recovery method, an electronic device and a computer-readable storage medium.
  • the time required for system service recovery can be effectively reduced, and the efficiency of system service recovery can be improved.
  • an embodiment of the present application provides a system service recovery method, which is applied to an electronic device.
  • the method includes: a local manager in the electronic device control system capability SA process monitors the system capability manager SAMGR process through a Binder driver program. death notification information, the local manager is used to manage the system capabilities in the SA process; after monitoring the death notification information of the SAMGR process, the electronic device controls the local manager to drive through the Binder
  • the program obtains the proxy object of the SAMGR process; the electronic device controls the local manager to register the system capabilities in the SA process into the SAMGR process through the proxy object of the SAMGR process to restore system services.
  • the proxy object of the SAMGR process is obtained by the local manager in the SA process of the control system capability, and then the system capability in the SA process is registered in the SAMGR process through the proxy object of the SAMGR process to restore the system records, so that the system records are restored.
  • the electronic device using the system recovery method provided by the embodiment of the present application no longer needs to restart the electronic device, but only starts the crashed SAMGR process, which reduces the time required for system service recovery and improves system services. Recovery efficiency, with strong ease of use and practicality.
  • each SA process has a unique local manager, one local manager is used to manage system capabilities in one SA process, and each SA process has one or more system capabilities.
  • the local administrator may read the system capability startup configuration file, enable the system capabilities of the electronic device in a predetermined order, and register the enabled system capabilities into the SAMGR process through the binder driver.
  • the local manager may also register the death notification of the SAMGR process with the Binder driver.
  • the death notification information is information that informs the Binder driver of the crash of the SAMGR process.
  • the Binder driver cannot communicate with the proxy object of the SAMGR process.
  • the Binder driver monitors
  • the binder driver calls the death notification interface to send the death notification information of the SAMGR process to the local manager.
  • the SAMGR process is used to manage system capabilities in all SA processes in the electronic device, and provide services for registering, querying, and acquiring system capabilities.
  • the SAMGR process provides an interface for obtaining system capabilities (getSystemAbility), an interface for registering system capabilities (AddSystemAbility), and an interface for querying system capabilities (CheckSystemAbility).
  • the system capability can be registered in the SAMGR process through the AddSystemAbility interface.
  • An application can obtain the system capabilities it needs to use through the SAMGR process. When the SAMGR process crashes, the newly started application cannot obtain the system capabilities it needs to use through the SAMGR process, and the newly started application will flash back.
  • the recovery method can quickly register the system capabilities in the SA process to the restarted SAMGR process to restore the system services of the electronic equipment, so that the electronic equipment does not need to be restarted, and the ability of the electronic equipment to provide services can be quickly restored. Improve user experience.
  • the controlling of the local manager to register the system capability in the SA process into the SAMGR process through a proxy object of the SAMGR process includes: The local manager is controlled to send the system capability SA record information to the SAMGR process through the proxy object of the SAMGR process, and to register the system capabilities in the SA process into the SAMGR process.
  • the SA record information records information related to the system capability in the SA process, such as the serial number of the system capability, the proxy object of the system capability, and the like.
  • the embodiment of the present application controls the local manager to register the system capability in the SA process into the SAMGR process through the proxy object of the SAMGR process, by controlling the local manager to send the message to the SAMGR process through the proxy object of the SAMGR process
  • the system capability SA records information so that the local administrator can register the system capability in the SA process into the SAMGR process.
  • the SAMGR process After the SAMGR process receives the SA record information sent by the local manager, the SAMGR process will record the number of the corresponding system capability, and the proxy object of the corresponding system capability, etc., so that the application can obtain the required data through the SAMGR process.
  • the serial number of the system capability can be obtained through the proxy object of the system capability, so as to realize the purpose of invoking the system capability by the application program.
  • controlling the local manager to obtain the proxy object of the SAMGR process through the Binder driver includes: controlling the restart of the SAMGR process; controlling the The Binder driver performs Binder communication with the SAMGR process to obtain the proxy object of the SAMGR process; controls the Binder driver to send the proxy object of the SAMGR process to the local manager.
  • the electronic device will control the SAMGR process to restart.
  • the restarted SAMGR process is an empty process, and the local administrator needs to register the system capabilities in the current SA process into the SAMGR process to restore the electronic device.
  • the system service of the device, and the local manager needs to perform Binder communication with the SAMGR process to register the system capabilities in the current SA process into the SAMGR process, that is to say, the local manager needs to obtain the proxy object of the SAMGR process.
  • the Binder driver is controlled to communicate with the SAMGR process, and the proxy object of the SAMGR process is acquired; after the Binder driver acquires the proxy object of the SAMGR process, the electronic device controls the Binder driver to send the information of the SAMGR process to the local manager. proxy object.
  • the method before controlling the restart of the SAMGR process, includes: when the daemon process monitors the death notification information of the SAMGR process, controlling the daemon process to trigger the SAMGR process restart command.
  • the daemon process is used to start the SAMGR process, and to guard and monitor the SAMGR process.
  • the daemon process monitors the death notification information of the SAMGR process through the Binder driver. At this time, the electronic device will control the daemon process to trigger a restart instruction of the SAMGR process to restart the SAMGR process.
  • the Binder driver will establish Binder communication with the SAMGR process, so that the local manager in the SA process can communicate with the Binder through the proxy object of the SAMGR process.
  • an embodiment of the present application provides a system service recovery device, the device includes: an information monitoring unit for controlling the local manager in the system capability SA process to monitor the death of the system capability manager SAMGR process through a Binder driver notification information, the local manager is used to manage the system capabilities in the SA process; the proxy object acquisition unit is used to control the local manager to pass the notification information of the death of the SAMGR process after listening The Binder driver obtains the proxy object of the SAMGR process; the system capability registration unit is used to control the local manager to register the system capability in the SA process to the SA process through the proxy object of the SAMGR process SAMGR process to restore system services.
  • the system capability registration unit is specifically configured to: control the local manager to send the system capability SA record information to the SAMGR process through the proxy object of the SAMGR process, and register the system capability in the SA process.
  • the capability is registered in the SAMGR process, and the SA record information records information related to the system capability in the SA process.
  • the proxy object obtaining unit includes: a SAMGR process restarting subunit, used to control the SAMGR process to restart; a proxy object obtaining subunit, used to control the Binder driver to perform Binder communication with the SAMGR process communication, to obtain the proxy object of the SAMGR process; the proxy object sending subunit is used to control the Binder driver to send the proxy object of the SAMGR process to the local manager.
  • the proxy object obtaining unit further includes: a restart instruction triggering subunit, configured to control the daemon process to trigger a restart instruction of the SAMGR process when the daemon process monitors the death notification information of the SAMGR process , the daemon is used to start the SAMGR process, and to guard and monitor the SAMGR process.
  • a restart instruction triggering subunit configured to control the daemon process to trigger a restart instruction of the SAMGR process when the daemon process monitors the death notification information of the SAMGR process , the daemon is used to start the SAMGR process, and to guard and monitor the SAMGR process.
  • the present application provides an electronic device, comprising: a processor and a memory, the processor and the memory are coupled, and the memory is used to store a computer program (also referred to as an instruction or a code), when all the When the processor executes the computer program, the above-mentioned electronic device is caused to execute the method provided by the first aspect or any possible implementation manner of the first aspect.
  • a computer program also referred to as an instruction or a code
  • the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed on an electronic device, the above-mentioned electronic device is made to perform the first aspect or A method provided by any possible implementation manner of the first aspect.
  • an embodiment of the present application provides a chip, including a processor, and when the processor reads and executes a computer program stored in a memory, the first aspect or any possible implementation manner of the first aspect is implemented. provided method.
  • an embodiment of the present application provides a chip system, including a memory and a processor, when the chip system is running, the above-mentioned electronic device is made to execute the method provided by the first aspect or any possible implementation manner of the first aspect .
  • the above chip system may be a single chip, or a chip module composed of multiple chips.
  • the electronic device provided in the third aspect, the computer storage medium in the fourth aspect, or the chip in the sixth aspect are all used to execute the first aspect or any possible implementation manner of the first aspect. method. Therefore, for the beneficial effects that can be achieved, reference may be made to the beneficial effects in the corresponding method, which will not be repeated here.
  • FIG. 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a system service recovery method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of flow interaction of a system service recovery method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a method for acquiring a proxy object of a SAMGR process provided by an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of a system service recovery apparatus provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the electronic devices involved in the embodiments of the present application may be mobile phones, tablet computers, desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (personal digital assistants) digital assistant, PDA), wearable electronic devices, virtual reality devices, etc.
  • UMPCs ultra-mobile personal computers
  • PDA personal digital assistants
  • wearable electronic devices virtual reality devices, etc.
  • This application does not limit the specific types of electronic devices.
  • FIG. 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented 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 processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically 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 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention 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 embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device 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 input from the battery 142 and/or the charging management module 140 and supplies power to 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, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the 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 a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • 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 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is 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 alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the display screen 194 in FIG. 1 can be bent.
  • the display screen 194 can be bent means that the display screen can be bent to any angle at any position, and can be maintained at the angle.
  • the display screen 194 can be folded in half from the middle, left and right, or can be folded in half from the middle.
  • a display screen that can be bent is referred to as a foldable display screen.
  • the foldable display screen may be one screen, or may be a display screen formed by piecing together multiple screens, which is not limited herein.
  • the electronic device 100 can determine whether the foldable display screen is in a folded state or in an unfolded state through one or more of a gravity sensor, an acceleration sensor and a gyroscope, and can also determine whether the foldable display screen is in a folded state or in an unfolded state. Whether it is in portrait display or landscape display.
  • the electronic device 100 can also detect the bending angle of the foldable display screen through a gravity sensor, an acceleration sensor and a gyroscope, and then the electronic device 100 can determine the foldable display according to the bending angle. Whether the screen is folded or unfolded.
  • the electronic device 100 may also determine the orientation of the foldable display screen in the folded state through one or more of a gravity sensor, an acceleration sensor and a gyroscope, and then determine a display area for displaying the interface content output by the system. For example, when the first screen area of the foldable display screen faces upward relative to the ground, the electronic device 100 may display the interface content output by the display system on the first screen area. When the second screen area of the foldable display screen faces upward relative to the ground, the electronic device 100 may display the interface content output by the display system on the second screen area.
  • the electronic device 100 may further include an angle sensor (not shown in FIG. 1 ).
  • the angle sensor may be disposed at the bending portion of the foldable display screen.
  • the electronic device 100 can measure the angle formed by the two ends of the bending part in the middle of the foldable display screen through an angle sensor (not shown in FIG. 1 ) arranged on the bending part of the foldable display screen, and when the angle is greater than When the angle is equal to or equal to the first angle, the electronic device 100 can recognize that the foldable display screen enters the unfolded state through the angle sensor. When the included angle is less than or equal to the first angle, the electronic device 100 can recognize through the angle sensor that the foldable display screen enters the folded state.
  • the electronic device 100 can also identify whether the foldable display screen is in a folded state through a physical switch disposed at the bending portion of the foldable display screen. For example, when the electronic device receives a user's folding operation on the foldable display screen, the physical switch provided on the electronic device is triggered to open, and the electronic device 100 may determine that the foldable display screen is in a folded state. When the electronic device 100 receives the user's unfolding operation on the foldable display screen, the physical switch provided on the electronic device is triggered to close, and the electronic device can determine that the foldable display screen is in the unfolded state.
  • a physical switch disposed at the bending portion of the foldable display screen. For example, when the electronic device receives a user's folding operation on the foldable display screen, the physical switch provided on the electronic device is triggered to open, and the electronic device 100 may determine that the foldable display screen is in a folded state. When the electronic device 100 receives the user's unfolding operation on the foldable display screen, the physical switch provided on the
  • the foldable display screen can display content in a full screen, or a partial area (such as the first screen area or the second screen area) Display content, or display content in two or more partial areas.
  • the interface content may occupy part of the display area of the foldable display screen.
  • the display screen 194 is a special-shaped cutting screen (Notch screen)
  • the special-shaped cutting screen The middle part of the screen displays the interface content, and when one or both edges of the screen are partially black, the foldable display screen can also be regarded as displaying the interface content in full screen.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element 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 provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical 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 formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it 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 frequency point energy and so on.
  • 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 of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented 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 realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 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, universal flash storage (UFS), and the like.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D can be the USB interface 130, or can be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, 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, the instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the angular velocity of electronic device 100 about 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 offset the shaking of the electronic device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. 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 electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense 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 a 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 realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order 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 avoid abnormal shutdown of the electronic device 100 caused by 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 called “touch panel”.
  • the touch sensor 180K may 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 touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 employs an eSIM, ie: an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
  • the hardware layer may include hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory).
  • the operating system of the operating system layer may be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system.
  • the application layer may include applications such as browsers, address books, word processing software, and instant messaging software.
  • the present application provides a system service recovery method.
  • SA SystemAbility
  • Common system capabilities include package management services, non-precise delay task scheduling services, distributed task scheduling services, telephone services, etc. Different system capabilities have different numbers. For example, the package management service number is 401, and the non-precise delay The number of the task scheduling service is 1904, the number of the distributed task scheduling service is 1401, and the number of the telephone service is 4001.
  • a system capability (SystemAbility, SA) process a container of system capabilities. There are multiple system capabilities in one SA process, which are managed by the only local manager (LocalAbilityManager) in the SA process. That is, each SA process has a unique local manager, one local manager is used to manage the system capabilities in one SA process, and each SA process has one or more system capabilities.
  • Local manager an entity that manages system capabilities of an SA process, is used to manage system capabilities in an SA process, and is specifically responsible for managing one or more system capabilities in an SA process.
  • a system capability manager responsible for managing all system capabilities in all SA processes in the electronic device 100 system, and providing services for registering, querying, and acquiring system capabilities.
  • the SAMGR process is a key service in the system.
  • the system will not be able to provide external services normally, such as application unresponsiveness and application crash.
  • the electronic device 100 needs to be restarted to restore the system service.
  • the time required for restarting the electronic device 100 is long, resulting in a long time to restore the system service and poor user experience.
  • the system service recovery method provided by the embodiment of the present application, when the SAMGR process crashes, the electronic device does not need to be restarted, but only the SAMGR process is restarted, which greatly reduces the time required for system service recovery and improves the system service recovery time. Efficiency, the user experience is better, and it has strong ease of use and practicability.
  • HarmonyOS is a microkernel-based distributed operating system for all scenarios, and is suitable for multiple electronic devices such as mobile phones, tablets, computers, smart cars, and wearable devices.
  • FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • the system provides a Binder mechanism, and communication between processes can be implemented through the Binder mechanism.
  • the system includes SA process, local manager, SAMGR process, Binder driver.
  • the Binder mechanism adopts the Client-Server (client-server) communication mode.
  • the SA process acts as the Client
  • the SAMGR process acts as the Server.
  • the two communicate with each other through the Binder driver.
  • the SA process, the local manager, and the SAMGR process are located in the user space
  • the Binder driver is located in the kernel space.
  • FIG. 3 is a schematic flowchart of a system service restoration method provided by an embodiment of the present application
  • FIG. 4 is a schematic interactive flowchart of a system service restoration method provided by an embodiment of the present application.
  • the execution body of the system service recovery method in the embodiment of the present application is the electronic device 100.
  • FIG. 4 the system service recovery method shown in FIG. 3 is described in detail, and the details are as follows:
  • the electronic device 100 controls the local manager in the system capability SA process to monitor the death notification information of the system capability manager SAMGR process through the Binder driver.
  • the local administrator may read the system capability startup configuration file, enable the system capabilities of the electronic device 100 in a predetermined order, and register the enabled system capabilities with the SAMGR through the binder driver in progress.
  • the electronic device 100 may also control the local administrator to register the death notification of the SAMGR process with the Binder driver.
  • the SAMGR process is provided with an interface for obtaining system capabilities (getSystemAbility), an interface for registering system capabilities (AddSystemAbility), and an interface for querying system capabilities (CheckSystemAbility).
  • the Binder driver can Register the system capability into the SAMGR process through the AddSystemAbility interface.
  • An application can obtain the system capabilities it needs to use through the SAMGR process.
  • the death notification information is information to notify the Binder driver of the crash of the SAMGR process. For example, when the SAMGR process terminates abnormally, the Binder driver cannot communicate with the proxy object of the SAMGR process. At this time, the Binder driver monitors the SAMGR process. When the process crashes, the binder driver calls the death notification interface to send the death notification information of the SAMGR process to the local manager.
  • the binder driver when the binder driver monitors the crash of the SAMGR process, the binder driver generates the death notification information of the SAMGR process and sends it to the local manager.
  • the local manager in the SA process registers the death notification of the SAMGR process with the death message notification interface of the Binder driver, so that when the Binder driver determines that the proxy object of the SAMGR process is dead, it calls the death message notification interface to the local manager. Send a death notification message.
  • the electronic device 100 controls the local manager to obtain the proxy object of the SAMGR process through the Binder driver.
  • the SAMGR process is the manager of the HarmonyOS system service.
  • the proxy object of the SAMGR process needs to be obtained before Binder communication can be performed.
  • Common system capabilities include package management services, non-precise delay task scheduling services, distributed task scheduling services, and telephone services. All these system capabilities are registered with the SAMGR process, so the SAMGR process maintains a list of all system capabilities in the HarmonyOS system. If any application wants to use these system capabilities, it must first request a reference to these system capabilities from the SAMGR process, so as to establish a connection with these system capabilities.
  • the local manager in the SA process can be quickly controlled to register the system capability in the SA process into the restarted SAMGR process, so as to restore the system service of the electronic device 100. , so that the electronic device 100 does not need to be restarted, and the ability of the electronic device 100 to provide external services can also be quickly restored, which improves the recovery efficiency of system service recovery and improves the user experience.
  • the daemon process monitors the death notification information of the SAMGR process through the Binder driver.
  • the electronic device 100 will control the daemon process to trigger a restart instruction of the SAMGR process to restart the SAMGR process.
  • the Binder driver will establish Binder communication with the SAMGR process, so that the local manager in the SA process can communicate with the Binder through the proxy object of the SAMGR process.
  • FIG. 5 is a schematic flowchart of a method for acquiring a proxy object of a SAMGR process provided by an embodiment of the present application.
  • the method for obtaining the proxy object of the SAMGR process as shown in FIG. 5 may include:
  • the electronic device 100 controls the SAMGR process to restart.
  • the electronic device 100 controls the restart of the SAMGR process through a daemon process.
  • the daemon process is used to start the SAMGR process, and to guard and monitor the SAMGR process.
  • the daemon process will receive a process termination SIGCHLD signal, the SIGCHLD signal is used to instruct the daemon process to trigger a restart instruction of the SAMGR process, so that the electronic device 100 restarts the SAMGR process according to the restart instruction. That is, before step S201, including:
  • the electronic device 100 controls the daemon process to trigger a restart instruction of the SAMGR process.
  • the electronic device 100 controls the Binder driver to perform Binder communication with the SAMGR process, and acquires the proxy object of the SAMGR process.
  • the binder driver keeps trying to establish binder communication with the proxy object of the SAMGR process.
  • the proxy object of the process establishes Binder communication, so that the SAMGR process can communicate with the proxy object of the SAMGR process.
  • S203 The electronic device 100 controls the Binder driver to send the proxy object of the SAMGR process to the local manager.
  • the Binder driver can send the proxy object of the SAMGR process to the local manager, so that the local manager can obtain the SAMGR process.
  • the proxy object implements Binder communication between the local manager and the SAMGR process.
  • the electronic device 100 controls the local manager to register the system capability in the SA process into the SAMGR process through the proxy object of the SAMGR process, so as to restore system services.
  • the electronic device 100 will control the SAMGR process to restart.
  • the restarted SAMGR process is an empty process, and the local administrator needs to register the system capabilities in the current SA process into the SAMGR process to recover.
  • the system service of the electronic device 100, and the local administrator needs to perform Binder communication with the SAMGR process to register the system capabilities in the current SA process into the SAMGR process, that is to say, the local administrator needs to obtain the proxy object of the SAMGR process. Only then can the system capability in the current SA process be registered in the SAMGR process.
  • the proxy object of the SAMGR process can be acquired by controlling the Binder driver to communicate with the SAMGR process; after the Binder driver acquires the proxy object of the SAMGR process, the electronic device 100 controls the Binder driver to send a message to the local administrator.
  • the proxy object of the SAMGR process so that the electronic device 100 can control the local administrator to register the system capabilities in the SA process into the SAMGR process through the proxy object of the SAMGR process to restore system services.
  • step S103 includes:
  • the local manager is controlled to send the system capability SA record information to the SAMGR process through the proxy object of the SAMGR process, and to register the system capabilities in the SA process into the SAMGR process.
  • the SA record information records relevant information of the system capability in the SA process, such as the serial number of the system capability, the proxy object of the system capability, and the like.
  • the electronic device 100 controls the proxy object of the SAMGR process and sends the SA record information to the SAMGR process, the local administrator realizes the purpose of registering the system capabilities in the SA process into the SAMGR process.
  • the local manager when controlling the local manager to register the system capabilities in the SA process into the SAMGR process through the proxy object of the SAMGR process, it is to control the local manager to pass the proxy object of the SAMGR process to the SAMGR process.
  • the system capability SA record information is sent so that the local administrator can register the system capability in the SA process into the SAMGR process.
  • the SAMGR process After the SAMGR process receives the SA record information sent by the local manager, the SAMGR process will record the number of the corresponding system capability and the proxy object of the corresponding system capability, etc., so that the application can obtain the required use of the system through the SAMGR process.
  • the serial number of the system capability can be obtained through the proxy object of the system capability, so as to realize the purpose of invoking the system capability by the application program.
  • the proxy object of the SAMGR process is obtained by the local manager in the SA process of the control system capability, and then the system capability in the SA process is registered in the SAMGR process through the proxy object of the SAMGR process to restore the system records, so that the system records are restored.
  • the electronic device 100 using the system recovery method provided by the embodiment of the present application does not need to restart the electronic device after the SAMGR process crashes, but only starts the crashed SAMGR process, which reduces the time required for system service recovery and improves the system performance. Efficiency of service restoration.
  • the embodiments of the present application further provide device embodiments for implementing the foregoing method embodiments.
  • FIG. 6 is a schematic diagram of a system service recovery apparatus provided by an embodiment of the present application. The included units are used to execute the steps in the embodiment corresponding to FIG. 3 . For details, please refer to the relevant description in the embodiment corresponding to FIG. 3 . For convenience of explanation, only the parts related to this embodiment are shown.
  • the system service recovery apparatus 200 includes:
  • the information monitoring unit 201 is used to control the local manager in the system capability SA process to monitor the death notification information of the system capability manager SAMGR process through the Binder driver, and the local manager is used to monitor the system capability in the SA process. to manage;
  • the proxy object obtaining unit 202 is configured to control the local manager to obtain the proxy object of the SAMGR process through the Binder driver after monitoring the death notification information of the SAMGR process;
  • the system capability registration unit 203 is configured to control the local administrator to register the system capability in the SA process into the SAMGR process through the proxy object of the SAMGR process, so as to restore system services.
  • system capability registration unit 203 is specifically configured to:
  • the proxy object obtaining unit 202 includes:
  • a SAMGR process restart subunit configured to control the restart of the SAMGR process
  • a proxy object acquisition subunit used to control the Binder driver to communicate with the SAMGR process to obtain a proxy object of the SAMGR process
  • the proxy object sending subunit is used to control the Binder driver to send the proxy object of the SAMGR process to the local manager.
  • the proxy object obtaining unit 202 further includes:
  • the restart instruction triggering subunit is used to control the daemon process to trigger the restart instruction of the SAMGR process when the daemon process monitors the death notification information of the SAMGR process, the daemon process is used to start the SAMGR process, and the daemon process Monitor the SAMGR process.
  • the proxy object of the SAMGR process is obtained by the local manager in the SA process of the control system capability, and then the system capability in the SA process is registered in the SAMGR process through the proxy object of the SAMGR process to restore the system records, so that the system records are restored.
  • the electronic device 100 using the system recovery method provided by the embodiment of the present application does not need to restart the electronic device after the SAMGR process crashes, but only starts the crashed SAMGR process, which reduces the time required for system service recovery and improves the system performance. Efficiency of service restoration.
  • Embodiments of the present application further provide a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium; when the computer-readable storage medium runs on the electronic device 100, the electronic device 100 is made to execute the following The method shown in FIG. 3 , FIG. 4 , or FIG. 5 .
  • 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 downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.).
  • wire eg, coaxial cable, optical fiber, digital subscriber line, DSL
  • wireless eg, infrared, wireless, microwave, etc.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or data storage devices including one or more servers, data centers, etc. that can be integrated with the medium.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media (eg, solid state disks (SSDs)), and the like.
  • Embodiments of the present application also provide a computer program product containing computer instructions, which, when executed on the electronic device 100 , enables the electronic device 100 to execute the method shown in FIG. 3 , FIG. 4 , or FIG. 5 .
  • FIG. 7 is a schematic structural diagram of a chip according to an embodiment of the present application.
  • the chip shown in FIG. 7 may be a general-purpose processor or a special-purpose processor.
  • the chip includes a processor 301 .
  • the processor 301 is configured to support the communication apparatus to perform the technical solutions shown in FIG. 3 , FIG. 4 , or FIG. 5 .
  • the chip further includes a transceiver 302, and the transceiver 302 is configured to accept the control of the processor 301 and to support the communication device to execute the technical solutions shown in FIG. 3, FIG. 4, or FIG. 5.
  • the chip shown in FIG. 7 may further include: a storage medium 303 .
  • the chip shown in FIG. 7 can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGA), programmable logic device (PLD) , controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout this application.
  • FPGA field programmable gate arrays
  • PLD programmable logic device
  • controllers state machines
  • gate logic discrete hardware components
  • discrete hardware components any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout this application.
  • the electronic device 100, computer storage medium, computer program product, and chip provided by the above embodiments of the present application are all used to execute the methods provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the corresponding methods provided above. The beneficial effects will not be repeated here.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions can be sent from one website site, computer, server or data center to another website site, computer, server or data center for transmission.
  • 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, data center, etc. that includes an integration of one or more available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
  • the process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed , which may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random storage memory RAM, magnetic disk or optical disk and other mediums that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

提供一种系统服务恢复方法、装置和电子设备,系统服务恢复方法包括:电子设备控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息(S101),本地管理者用于对SA进程中的系统能力进行管理;当监听到SAMGR进程的死亡通知信息后,电子设备控制本地管理者通过Binder驱动程序,获取SAMGR进程的代理对象(S102);电子设备控制本地管理者通过SAMGR进程的代理对象,把SA进程中的系统能力注册到SAMGR进程中,以恢复系统服务(S103),通过采用提供的系统服务恢复方法,可以有效降低系统服务恢复所需要的时长,提高系统服务恢复的效率,具有较强的易用性和实用性。

Description

一种系统服务恢复方法、装置和电子设备
本申请要求于2020年08月21日提交国家知识产权局、申请号为202010855466.5、申请名称为“一种系统服务恢复方法、装置和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及一种系统服务恢复方法、装置和电子设备。
背景技术
随着电子技术和互联网技术的发展,电子设备(例如手机、平板电脑等)已经成为人们生活中不可或缺的一部分,用户在电子设备上安装各种各样的第三方应用和服务软件来满足日常生活的需求,但同时基于电子设备的第三方应用和服务软件也涌现出了越来越多的兼容性问题,而第三方应用和服务软件的兼容性问题可能导致电子设备的系统进程出现崩溃。
现有的电子设备在系统进程出现崩溃时,一般是通过重启电子设备来恢复系统服务。然而,重启电子设备所需要的时间较长、效率较低,电子设备的系统进程需要较长时间才能正常对外提供服务,严重的影响了用户的使用体验。
发明内容
本申请公开了一种系统服务恢复方法、电子设备和计算机可读存储介质。可以有效降低系统服务恢复所需要的时长,提高系统服务恢复的效率。
第一方面,本申请实施例提供一种系统服务恢复方法,应用于电子设备中,该方法包括:电子设备控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;当监听到所述SAMGR进程的死亡通知信息后,电子设备控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;电子设备控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。
本申请实施例中通过控制系统能力SA进程中的本地管理者获取SAMGR进程的代理对象,再通过该SAMGR进程的代理对象把SA进程中的系统能力注册到SAMGR进程中以恢复系统记录,从而使得采用本申请实施例提供的系统恢复方法的电子设备在SAMGR进程崩溃后,不再需要重新启动电子设备,而仅是启动崩溃的SAMGR进程,降低了系统服务恢复所需要的时长,提高了系统服务恢复的效率,具有较强的易用性和实用性。
示例性的,每个SA进程中均具有唯一一个本地管理者,一个本地管理者用于管理一个SA进程中的系统能力,每个SA进程中有一个或多个系统能力。
示例性的,所述本地管理者可以读取系统能力启动配置文件,按照预定的顺序启 动电子设备的系统能力,并通过所述Binder驱动程序将所启动的系统能力注册到所述SAMGR进程中。所述本地管理者还可以向所述Binder驱动程序注册所述SAMGR进程的死亡通知。
示例性的,死亡通知信息为向Binder驱动程序通知所述SAMGR进程崩溃的信息,比如当SAMGR进程异常终止时,Binder驱动程序无法与SAMGR进程的代理对象进行Binder通信,这时,Binder驱动程序监听到所述SAMGR进程崩溃,所述Binder驱动程序调用死亡通知接口向本地管理者发送SAMGR进程的死亡通知信息。
示例性的,SAMGR进程用于管理电子设备中的所有SA进程中的系统能力,以及提供注册、查询和获取系统能力的服务。
示例性的,所述SAMGR进程中提供有获取系统能力(getSystemAbility)的接口、注册系统能力(AddSystemAbility)的接口,以及查询系统能力(CheckSystemAbility)的接口,在系统能力启动后,所述Binder驱动程序可以通过AddSystemAbility接口将该系统能力注册到SAMGR进程中。某一应用程序可以通过SAMGR进程获取其所需要使用到的系统能力。当SAMGR进程崩溃后,新启动的应用程序无法通过SAMGR进程获取到其所需要使用到的系统能力,该新启动的应用程序将会出现闪退的情况,通过采用本申请实施例提供的系统服务恢复方法,可以快速把SA进程中的系统能力注册到重新启动后的SAMGR进程中,以恢复电子设备的系统服务,从而不需要重新启动电子设备,也可以快速恢复电子设备对外提供服务的能力,提高了用户的使用体验。
在第一方面的第一种可能的实施方式中,所述控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,包括:控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中。
示例性的,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息,比如系统能力的编号、系统能力的代理对象等。
本申请实施例在控制本地管理者通过SAMGR进程的代理对象,把SA进程中的系统能力注册到所述SAMGR进程中,是通过控制本地管理者通过SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,以使得本地管理者可以把SA进程中的系统能力注册到所述SAMGR进程中。在SAMGR进程接收到本地管理者发送的SA记录信息后,SAMGR进程中将记录有相应系统能力的编号,以及相应系统能力的代理对象等,从而使得应用程序在通过SAMGR进程获取其所需要使用的系统能力时,可以通过该系统能力的代理对象获取到该系统能力的编号,实现应用程序调用该系统能力的目的。
在第一方面的第二种可能的实施方式中,所述控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象,包括:控制所述SAMGR进程重启;控制所述Binder驱动程序与所述SAMGR进程进行Binder通信,获取所述SAMGR进程的代理对象;控制所述Binder驱动程序向所述本地管理者发送所述SAMGR进程的代理对象。
本申请实施例中,SAMGR进程崩溃后,电子设备将控制该SAMGR进程重启, 重启后的SAMGR进程为空进程,需要本地管理者将当前SA进程中的系统能力注册到SAMGR进程中,才能恢复电子设备的系统服务,而本地管理者要将当前SA进程中的系统能力注册到SAMGR进程中,则需要与SAMGR进程进行Binder通信,也就是说本地管理者需要获取到SAMGR进程的代理对象,才能实现将当前SA进程中的系统能力注册到SAMGR进程中的目的。本申请实施例通过控制Binder驱动程序与SAMGR进程进行Binder通信,获取SAMGR进程的代理对象;在Binder驱动程序获取到SAMGR进程的代理对象后,电子设备控制Binder驱动程序向本地管理者发送SAMGR进程的代理对象。
在第一方面的第三种可能的实施方式中,在控制所述SAMGR进程重启之前,包括:当守护进程监听到所述SAMGR进程的死亡通知信息时,控制所述守护进程触发所述SAMGR进程的重启指令。
示例性的,所述守护进程用于启动SAMGR进程,以及守护并监视SAMGR进程。
本申请实施例中,当SAMGR进程崩溃时,守护进程通过Binder驱动程序监听到SAMGR进程的死亡通知信息,这时,电子设备将控制守护进程触发SAMGR进程的重启指令,以重新启动SAMGR进程。
在SAMGR进程重新启动后,Binder驱动程序将与SAMGR进程建立Binder通信,使得SA进程中的本地管理者可以通过SAMGR进程的代理对象进行Binder通信。
第二方面,本申请实施例提供一种系统服务恢复装置,该装置包括:信息监听单元,用于控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;代理对象获取单元,用于当监听到所述SAMGR进程的死亡通知信息后,控制由所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;系统能力注册单元,用于控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。
示例性的,所述系统能力注册单元,具体用于:控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息。
示例性的,所述代理对象获取单元,包括:SAMGR进程重启子单元,用于控制所述SAMGR进程重启;代理对象获取子单元,用于控制所述Binder驱动程序与所述SAMGR进程进行Binder通讯通信,获取所述SAMGR进程的代理对象;代理对象发送子单元,用于控制所述Binder驱动程序向所述本地管理者发送所述SAMGR进程的代理对象。
示例性的,所述代理对象获取单元,还包括:重启指令触发子单元,用于当守护进程监听到所述SAMGR进程的死亡通知信息时,控制所述守护进程触发所述SAMGR进程的重启指令,所述守护进程用于启动SAMGR进程,以及守护并监视SAMGR进程。
第三方面,本申请提供了一种电子设备,包括:处理器和存储器,所述处理器和所述存储器耦合,所述存储器用于存储计算机程序(也可称为指令或代码),当所述 处理器执行所述计算机程序时,使得上述电子设备执行如第一方面或者第一方面任一种可能的实施方式提供的方法。
第四方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在电子设备上运行时,使得上述电子设备执行如第一方面或者第一方面任一种可能的实施方式提供的方法。
第五方面,本申请实施例提供一种芯片,包括处理器,当所述处理器读取并执行存储器中存储的计算机程序时,实现如第一方面或者第一方面任一种可能的实施方式提供的方法。
第六方面,本申请实施例提供一种芯片系统,包括存储器和处理器,当上述芯片系统运行时,使得上述电子设备执行如第一方面或者第一方面任一种可能的实施方式提供的方法。上述芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。
可以理解地,上述提供的第三方面上述的电子设备、第四方面上述的计算机存储介质或者第六方面上述的芯片均用于执行第一方面或者第一方面任一种可能的实施方式提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
下面对本申请实施例用到的附图进行介绍。
图1是本申请实施例提供的电子设备100的结构示意图;
图2是本申请实施例提供的一种系统架构示意图;
图3是本申请实施例提供的一种系统服务恢复方法的流程示意图;
图4是本申请实施例提供的一种系统服务恢复方法的流程交互示意图;
图5是本申请实施例提供的一种获取SAMGR进程的代理对象的方法的流程示意图;
图6是本申请实施例提供的一种系统服务恢复装置的结构示意图;
图7是本申请实施例提供的一种芯片的结构示意图。
具体实施方式
下面结合本申请实施例中的附图对本申请实施例进行描述。本申请实施例的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请实施例中涉及的电子设备可以是手机、平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴电子设备、虚拟现实设备等。本申请对电子设备的具体类型不作限定。
请参阅图1,图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等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备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的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN, NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备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个或N个显示屏194,N为大于1的正整数。
在一些实施例中,当显示面板采用OLED、AMOLED、FLED等材料时,所述图1中的显示屏194可以被弯折。这里,所述显示屏194可以被弯折是指显示屏可以在任意部位弯折到任意角度,并可以在该角度保持。例如,显示屏194可以从中部左右对折,也可以从中部上下对折。本申请实施例中,将可以被弯折的显示屏称为可折叠显示屏。其中,该可折叠显示屏可以是一块屏幕,也可以是多块屏幕拼凑在一起组合成的显示屏,在此不作限定。
在一些实施例中,该电子设备100可以通过重力传感器、加速度传感器和陀螺仪中的一个或多个,可以判断该可折叠显示屏处于折叠形态还是处于展开形态,还可以判断该可折叠显示屏处于竖屏显示状态还是处于横屏显示状态。该电子设备100还可以通过重力传感器、加速度触感器和陀螺仪,检测该可折叠显示屏的弯折的夹角,然后,电子设备100可以根据该弯折的夹角,判断出该可折叠显示屏处于折叠形态还是处于展开形态。电子设备100还可与通过重力传感器、加速度传感器和陀螺仪中的一个或多个,判断折叠形态下,该可折叠显示屏的朝向,进而确定出显示系统所输出界面内容的显示区域。例如,当该可折叠显示屏的第一屏幕区域相对于地面朝向上方时,电子设备100可以将显示系统输出的界面内容,显示在第一屏幕区域上。当该可折叠显示屏的第二屏幕区域相对于地面朝向上方时,电子设备100可以将显示系统输出的界面内容,显示在第二屏幕区域上。
在一些实施例中,该电子设备100还可以包括角度传感器(图1中未示出)该角度传感器可以设置在该可折叠显示屏的弯折部位处。电子设备100可以通过设置在该可折叠显示屏的弯折部位的角度传感器(图1中未示出),测量该可折叠显示屏中间弯折部位两端所成夹角,当该夹角大于或等于第一角度时,电子设备100可以通过角度传感器识别出该可折叠显示屏进入展开状态。当该夹角小于或等于第一角度时,电子设备100可以通过角度传感器识别出该可折叠显示屏进入折叠形态。
在其他一些实施例中,电子设备100也可以通过设置在该可折叠显示屏的弯折部位的物理开关,识别出该可折叠显示屏是否处于折叠形态。例如,当电子设备接收到用户对该可折叠显示屏的折叠操作,该设置在该电子设备上的物理开关被触发打开,电子设备100可以确定该可折叠显示屏处于折叠形态。当电子设备100接收到用户对该可折叠显示屏展开操作,该设置在该电子设备上的物理开关被触发关闭,电子设备可以确定该可折叠显示屏处于展开形态。所述示例仅仅用于解释本申请,不应构成限定。
下文以可折叠显示屏为两折叠显示屏为例,当可折叠显示屏处于展开形态时,该可折叠显示屏可全屏显示内容,也可部分区域(例如第一屏幕区域或第二屏幕区域)显示内容,也可两个或两个以上部分区域显示内容。在一种可能的实现方式中,可折叠显示屏全屏显示界面内容时,该界面内容可以占用该可折叠显示屏的部分显示区域,例如显示屏194为异形切割屏(Notch屏)时,异形切割屏的中间部分显示该界面内容,一侧或两侧边缘部分黑屏时,也可以看作该可折叠显示屏全屏显示该界面内容。
电子设备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个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备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的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看 短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器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所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
在本申请实施例中,电子设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。其中,硬件层可以包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。操作系统层的操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。应用层可以包含浏览器、通讯录、文字处理软件、即时通信软件等应用。
本申请基于上述电子设备100,提供了一种系统服务恢复方法。
首先,对本申请实施例中涉及的部分用语进行解释说明,以便于本领域技术人员 容易理解。
系统能力(SystemAbility,SA):继承SA基类,提供跨进程服务能力。常见的系统能力有包管理服务、非精准延时任务调度服务、分布式任务调度服务、电话服务等,不同的系统能力对应有不同的编号,比如包管理服务的编号为401,非精准延时任务调度服务的编号为1904,分布式任务调度服务的编号为1401、电话服务的编号为4001。
系统能力(SystemAbility,SA)进程:系统能力的容器,一个SA进程中有多个系统能力,被SA进程中唯一一个本地管理者(LocalAbilityManager)进行管理。即每个SA进程中均具有唯一一个本地管理者,一个本地管理者用于管理一个SA进程中的系统能力,每个SA进程中有一个或多个系统能力。
本地管理者(LocalAbilityManager):SA进程管理系统能力的实体,用于对SA进程中的系统能力进行管理,具体负责对一个SA进程中的1个或多个系统能力进行管理。
系统能力管理者(SystemAbilityManager,SAMGR)进程:负责管理电子设备100系统中的所有SA进程中的所有系统能力,以及提供注册、查询和获取系统能力的服务。
可以理解的是,SAMGR进程为系统中的关键服务,当SAMGR进程崩溃时,系统将无法正常提供对外服务,比如会出现应用无响应、应用闪退等现象。现有技术中,如果关键服务崩溃,就需要重启电子设备100以恢复系统服务,然而,重启电子设备100所需要的时长较长,从而导致恢复系统服务的时间较长,使得用户使用体验较差。而通过采用本申请实施例提供的系统服务恢复方法,当SAMGR进程崩溃时,不需要重启电子设备,而仅是重启SAMGR进程,大大降低了系统服务恢复所需要的时长,提高了系统服务恢复的效率,用户的使用体验更好,具有较强的易用性和实用性。
本申请实施例中涉及的系统可以为鸿蒙系统HarmonyOS,该系统为基于微内核的面向全场景的分布式操作系统,适配于手机、平板、电脑、智能汽车、可穿戴设备等多电子设备。
图2是本申请实施例提供的一种系统架构示意图,参阅图2,该系统提供了Binder机制,通过Binder机制可以实现进程之间的通信。该系统包括SA进程、本地管理者、SAMGR进程、Binder驱动程序。
Binder机制采用Client-Server(客户端-服务端)通信模式,SA进程作为Client端,SAMGR进程作为Server端,两者之间通过Binder驱动程序进行通信。其中,SA进程、本地管理者、SAMGR进程位于用户空间,Binder驱动程序位于内核空间。
下面通过具体实施例,对本申请提供的系统服务恢复方法进行示例性说明。
请参阅图3和图4,图3是本申请实施例提供的一种系统服务恢复方法的流程示意图,图4是本申请实施例提供的一种系统服务恢复方法的交互流程示意图。本申请实施例中系统服务恢复方法的执行主体为电子设备100,结合图4,对如图3所示的系统服务恢复方法进行详细描述,具体如下:
S101、电子设备100控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息。
本申请实施例中,所述本地管理者可以读取系统能力启动配置文件,按照预定的顺序启动电子设备100的系统能力,并通过所述Binder驱动程序将所启动的系统能力注册到所述SAMGR进程中。电子设备100还可以控制所述本地管理者向所述Binder驱动程序注册所述SAMGR进程的死亡通知。
示例性的,所述SAMGR进程中提供有获取系统能力(getSystemAbility)的接口、注册系统能力(AddSystemAbility)的接口,以及查询系统能力(CheckSystemAbility)的接口,在系统能力启动后,述Binder驱动程序可以通过AddSystemAbility接口将该系统能力注册到SAMGR进程中。某一应用程序可以通过SAMGR进程获取其所需要使用到的系统能力。
死亡通知信息为向Binder驱动程序通知所述SAMGR进程崩溃的信息,比如当SAMGR进程异常终止时,Binder驱动程序无法与SAMGR进程的代理对象进行Binder通信,这时,Binder驱动程序监听到所述SAMGR进程崩溃,所述Binder驱动程序调用死亡通知接口向本地管理者发送SAMGR进程的死亡通知信息。
在本申请的一些实施例中,当所述Binder驱动程序监听到所述SAMGR进程崩溃时,所述Binder驱动程序生成SAMGR进程的死亡通知信息,发送给本地管理者。
具体的,SA进程中的本地管理者向Binder驱动程序的死亡消息通知接口注册SAMGR进程的死亡通知,使得Binder驱动程序在确定SAMGR进程的代理对象死亡时,调用该死亡消息通知接口向本地管理者发送死亡通知消息。
S102、当监听到所述SAMGR进程的死亡通知信息后,电子设备100控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象。
本申请实施例中,SAMGR进程是HarmonyOS系统服务的管理者,当SA进程与SAMGR进程进行Binder通信时,需要获得SAMGR进程的代理对象才能进行Binder通信。常见的系统能力有包管理服务、非精准延时任务调度服务、分布式任务调度服务、电话服务等。所有的这些系统能力都会向SAMGR进程注册,因此SAMGR进程就维护了HarmonyOS系统中的所有系统能力的一个列表。任何应用程序要想使用这些系统能力,首先要向SAMGR进程请求获得这些系统能力的引用,从而建立起和这些系统能力的联系。
当SAMGR进程崩溃后,新启动的应用程序无法通过SAMGR进程获取到其所需要使用到的系统能力,该新启动的应用程序将会出现闪退的情况。可以通过采用本申请实施例提供的系统服务恢复方法,可以快速地控制SA进程中的本地管理者把SA进程中的系统能力注册到重新启动后的SAMGR进程中,以恢复电子设备100的系统服务,使得不再需要重新启动电子设备100,也可以快速地恢复电子设备100对外提供服务的能力,提高了系统服务恢的恢复效率,以及提高了用户的使用体验。
本申请实施例中,当SAMGR进程崩溃时,守护进程通过Binder驱动程序监听到SAMGR进程的死亡通知信息,这时,电子设备100将控制守护进程触发SAMGR进程的重启指令,以重新启动SAMGR进程。在SAMGR进程重新启动后,Binder驱动程序将与SAMGR进程建立Binder通信,使得SA进程中的本地管理者可以通过SAMGR进程的代理对象进行Binder通信。
请参考图5,图5是本申请实施例提供的一种获取SAMGR进程的代理对象的方 法的流程示意图。如图5所示的获取SAMGR进程的代理对象的方法可包括:
S201、电子设备100控制所述SAMGR进程重启。
本申请实施例中,电子设备100通过守护进程控制所述SAMGR进程重启。所述守护进程用于启动SAMGR进程,以及守护并监视SAMGR进程。在SAMGR进程崩溃时,守护进程将会接收到一个进程终止SIGCHLD信号,该SIGCHLD信号用于指示所述守护进程触发SAMGR进程的重启指令,使得电子设备100根据该重启指令重新启动SAMGR进程。即在步骤S201之前,包括:
当守护进程监听到所述SAMGR进程的死亡通知信息时,电子设备100控制所述守护进程触发所述SAMGR进程的重启指令。
S202、电子设备100控制所述Binder驱动程序与所述SAMGR进程进行Binder通信,获取所述SAMGR进程的代理对象。
本申请实施例中,Binder驱动程序在SAMGR进程崩溃后,一直尝试与SAMGR进程的代理对象建立Binder通信,在SAMGR进程重启后,Binder驱动程序可以获取到SAMGR进程的代理对象,与重启后的SAMGR进程的代理对象建立Binder通信,使得SAMGR进程可以和SAMGR进程的代理对象通信。
S203、电子设备100控制所述Binder驱动程序向所述本地管理者发送所述SAMGR进程的代理对象。
本申请实施例中,电子设备100在控制Binder驱动程序与SAMGR进程的代理对象建立Binder通信后,Binder驱动程序可以向本地管理者发送SAMGR进程的代理对象,从而使得本地管理者可以获取到SAMGR进程的代理对象,实现本地管理者和SAMGR进程之间的Binder通信。
S103、电子设备100控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。
本申请实施例中,SAMGR进程崩溃后,电子设备100将控制该SAMGR进程重启,重启后的SAMGR进程为空进程,需要本地管理者将当前SA进程中的系统能力注册到SAMGR进程中,才能恢复电子设备100的系统服务,而本地管理者要将当前SA进程中的系统能力注册到SAMGR进程中,则需要与SAMGR进程进行Binder通信,也就是说本地管理者需要获取到SAMGR进程的代理对象,才能实现将当前SA进程中的系统能力注册到SAMGR进程中的目的。
本申请实施例通过控制Binder驱动程序与SAMGR进程进行Binder通信,可以获取到SAMGR进程的代理对象;在Binder驱动程序获取到SAMGR进程的代理对象后,电子设备100控制Binder驱动程序向本地管理者发送SAMGR进程的代理对象,从而使得电子设备100可以控制本地管理者通过SAMGR进程的代理对象,把SA进程中的系统能力注册到所述SAMGR进程中以恢复系统服务。
具体的,步骤S103包括:
控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中。
本申请实施例中,SA记录信息中记录有SA进程中的系统能力的相关信息,比如系统能力的编号、系统能力的代理对象等。在电子设备100控制SAMGR进程的代理 对象,向SAMGR进程发送SA记录信息后,本地管理者实现了把SA进程中的系统能力注册到SAMGR进程中的目的。
可以理解的是,在控制本地管理者通过SAMGR进程的代理对象,把SA进程中的系统能力注册到所述SAMGR进程中,是通过控制本地管理者通过SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,以使得本地管理者可以把SA进程中的系统能力注册到所述SAMGR进程中。在SAMGR进程接收到本地管理者发送的SA记录信息后,SAMGR进程中将记录有相应系统能力的编号,以及相应系统能力的代理对象等,从而使得应用程序在通过SAMGR进程获取其所需要使用的系统能力时,可以通过该系统能力的代理对象获取到该系统能力的编号,实现应用程序调用该系统能力的目的。
本申请实施例中通过控制系统能力SA进程中的本地管理者获取SAMGR进程的代理对象,再通过该SAMGR进程的代理对象把SA进程中的系统能力注册到SAMGR进程中以恢复系统记录,从而使得采用本申请实施例提供的系统恢复方法的电子设备100在SAMGR进程崩溃后,不再需要重新启动电子设备,而仅是启动崩溃的SAMGR进程,降低了系统服务恢复所需要的时长,提高了系统服务恢复的效率。
基于上述实施例所提供的系统服务恢复方法,本申请实施例进一步给出实现上述方法实施例的装置实施例。
请参阅图6,图6是本申请实施例提供的系统服务恢复装置的示意图。包括的各单元用于执行图3对应的实施例中的各步骤。具体请参阅图3对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。参阅图6,系统服务恢复装置200包括:
信息监听单元201,用于控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;
代理对象获取单元202,用于当监听到所述SAMGR进程的死亡通知信息后,控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;
系统能力注册单元203,用于控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。
示例性的,所述系统能力注册单元203,具体用于:
控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息。
示例性的,所述代理对象获取单元202,包括:
SAMGR进程重启子单元,用于控制所述SAMGR进程重启;
代理对象获取子单元,用于控制所述Binder驱动程序与所述SAMGR进程进行Binder通讯通信,获取所述SAMGR进程的代理对象;
代理对象发送子单元,用于控制所述Binder驱动程序向所述本地管理者发送所述SAMGR进程的代理对象。
示例性的,所述代理对象获取单元202,还包括:
重启指令触发子单元,用于当守护进程监听到所述SAMGR进程的死亡通知信息时,控制所述守护进程触发所述SAMGR进程的重启指令,所述守护进程用于启动SAMGR进程,以及守护并监视SAMGR进程。
本申请实施例中通过控制系统能力SA进程中的本地管理者获取SAMGR进程的代理对象,再通过该SAMGR进程的代理对象把SA进程中的系统能力注册到SAMGR进程中以恢复系统记录,从而使得采用本申请实施例提供的系统恢复方法的电子设备100在SAMGR进程崩溃后,不再需要重新启动电子设备,而仅是启动崩溃的SAMGR进程,降低了系统服务恢复所需要的时长,提高了系统服务恢复的效率。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机指令;当所述计算机可读存储介质在电子设备100上运行时,使得该电子设备100执行如图3、图4、或者图5所示的方法。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
本申请实施例还提供了一种包含计算机指令的计算机程序产品,当其在电子设备100上运行时,使得电子设备100可以执行图3、图4、或者图5所示的方法。
图7为本申请实施例提供的一种芯片的结构示意图。图7所示的芯片可以为通用处理器,也可以为专用处理器。该芯片包括处理器301。其中,处理器301用于支持通信装置执行图3、图4、或者图5所示的技术方案。
可选的,该芯片还包括收发器302,收发器302用于接受处理器301的控制,用于支持通信装置执行图3、图4、或者图5所示的技术方案。
可选的,图7所示的芯片还可以包括:存储介质303。
需要说明的是,图7所示的芯片可以使用下述电路或者器件来实现:一个或多个现场可编程门阵列(field programmable gate array,FPGA)、可编程逻辑器件(programmable logic device,PLD)、控制器、状态机、门逻辑、分立硬件部件、任何其他适合的电路、或者能够执行本申请通篇所描述的各种功能的电路的任意组合。
上述本申请实施例提供的电子设备100、计算机存储介质、计算机程序产品、芯片均用于执行上文所提供的方法,因此,其所能达到的有益效果可参考上文所提供的方法对应的有益效果,在此不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储 在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。

Claims (10)

  1. 一种系统服务恢复方法,应用于电子设备,其特征在于,包括:
    控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;
    当监听到所述SAMGR进程的死亡通知信息后,控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;
    控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。
  2. 如权利要求1所述的系统服务恢复方法,其特征在于,所述控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,包括:
    控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息。
  3. 如权利要求1所述的系统服务恢复方法,其特征在于,所述控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象,包括:
    控制所述SAMGR进程重启;
    控制所述Binder驱动程序与所述SAMGR进程进行Binder通信,获取所述SAMGR进程的代理对象;
    控制所述Binder驱动程序向所述本地管理者发送所述SAMGR进程的代理对象。
  4. 如权利要求3所述的系统服务恢复方法,其特征在于,在控制所述SAMGR进程重启之前,包括:
    当守护进程监听到所述SAMGR进程的死亡通知信息时,控制所述守护进程触发所述SAMGR进程的重启指令,所述守护进程用于启动SAMGR进程,以及守护并监视SAMGR进程。
  5. 如权利要求1至4任一项所述的系统服务恢复方法,其特征在于,每个SA进程中具有唯一一个本地管理者,一个本地管理者用于管理一个SA进程中的系统能力。
  6. 一种系统服务恢复装置,其特征在于,包括:
    信息监听单元,用于控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;
    代理对象获取单元,用于当监听到所述SAMGR进程的死亡通知信息后,控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;
    系统能力注册单元,用于控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。
  7. 如权利要求6所述的系统服务恢复装置,其特征在于,所述系统能力注册单元,用于:
    控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发 送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息。
  8. 一种电子设备,其特征在于,包括:处理器和存储器,所述处理器和所述存储器耦合,所述存储器用于存储计算机程序,当所述处理器执行所述计算机程序时,使得电子设备执行如权利要求1至5中任一项所述的系统服务恢复方法。
  9. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,当所述计算机程序在电子设备上运行时,使得电子设备执行如权利要求1至5任一项所述的系统服务恢复方法。
  10. 一种芯片,其特征在于,包括处理器,当所述处理器读取并执行存储器中存储的计算机程序时,实现如权利要求1至5任一项所述的系统服务恢复方法。
PCT/CN2021/125423 2020-08-21 2021-10-21 一种系统服务恢复方法、装置和电子设备 WO2022037725A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010855466.5 2020-08-21
CN202010855466.5A CN114077519B (zh) 2020-08-21 2020-08-21 一种系统服务恢复方法、装置和电子设备

Publications (1)

Publication Number Publication Date
WO2022037725A1 true WO2022037725A1 (zh) 2022-02-24

Family

ID=80282672

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/125423 WO2022037725A1 (zh) 2020-08-21 2021-10-21 一种系统服务恢复方法、装置和电子设备

Country Status (2)

Country Link
CN (1) CN114077519B (zh)
WO (1) WO2022037725A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116048744A (zh) * 2022-08-19 2023-05-02 荣耀终端有限公司 一种图像获取方法及相关电子设备
CN117707626A (zh) * 2022-10-09 2024-03-15 荣耀终端有限公司 系统启动方法及电子设备

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5386544A (en) * 1991-06-03 1995-01-31 Fujitsu, Ltd. Data processing system with a standby process mechanism for saving and restoring operations
US5528750A (en) * 1991-09-11 1996-06-18 International Business Machines Corporation Method/apparatus for recovering from a process within the system kernel without creating a recovery environment
CN1740983A (zh) * 2004-08-25 2006-03-01 埃沃列姆公司 进程管理系统
US20070101197A1 (en) * 2005-11-03 2007-05-03 International Business Machines Corporation System and method for representing system capabilities as software packages in a software package management system
CN102436411A (zh) * 2011-12-31 2012-05-02 曙光信息产业股份有限公司 计算机系统进程恢复方法
US20160154701A1 (en) * 2014-12-02 2016-06-02 International Business Machines Corporation Enhanced restart of a core dumping application
CN106406963A (zh) * 2016-09-29 2017-02-15 杭州迪普科技有限公司 一种Linux系统的初始化方法和装置
CN108415734A (zh) * 2018-03-22 2018-08-17 车智互联(北京)科技有限公司 一种应用恢复装置、方法和移动终端
CN110321241A (zh) * 2018-03-30 2019-10-11 华为技术有限公司 一种应用程序的重启方法及终端设备
CN111008044A (zh) * 2019-11-29 2020-04-14 支付宝实验室(新加坡)有限公司 一种应用程序的恢复方法、系统以及电子设备
CN111459623A (zh) * 2019-01-18 2020-07-28 华为技术有限公司 应用程序恢复运行的方法、装置及计算机

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9098437B2 (en) * 2010-10-01 2015-08-04 Z124 Cross-environment communication framework
CN1293473C (zh) * 2002-06-10 2007-01-03 联想(北京)有限公司 系统进程的保护方法
US7063118B2 (en) * 2003-11-20 2006-06-20 Adc Acquisition Company Composite tape laying apparatus and method
US7309480B2 (en) * 2004-04-16 2007-12-18 H2Gen Innovations, Inc. Catalyst for hydrogen generation through steam reforming of hydrocarbons
US7282473B2 (en) * 2004-09-02 2007-10-16 Invista North America S.àr.l. Binder systems for microcapsule treatments to fibers, fabrics and garments
CN106708641B (zh) * 2016-06-20 2018-09-04 腾讯科技(深圳)有限公司 进程守护方法及装置
CN106371911A (zh) * 2016-09-06 2017-02-01 北京海誉动想科技股份有限公司 守护进程重启被守护进程的方法
CN106484461A (zh) * 2016-09-13 2017-03-08 北京智能管家科技有限公司 智能终端中的服务保活方法及装置
CN108345496B (zh) * 2017-01-23 2020-12-15 华为技术有限公司 一种运行应用程序的方法及装置
CN107066374B (zh) * 2017-03-20 2020-07-10 Oppo广东移动通信有限公司 一种数据处理方法及移动终端
US10652338B2 (en) * 2017-06-19 2020-05-12 Sap Se Event processing in background services
CN108984321B (zh) * 2018-06-29 2021-03-19 Oppo(重庆)智能科技有限公司 一种移动终端及其进程间通信的限制方法、存储介质

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5386544A (en) * 1991-06-03 1995-01-31 Fujitsu, Ltd. Data processing system with a standby process mechanism for saving and restoring operations
US5528750A (en) * 1991-09-11 1996-06-18 International Business Machines Corporation Method/apparatus for recovering from a process within the system kernel without creating a recovery environment
CN1740983A (zh) * 2004-08-25 2006-03-01 埃沃列姆公司 进程管理系统
US20070101197A1 (en) * 2005-11-03 2007-05-03 International Business Machines Corporation System and method for representing system capabilities as software packages in a software package management system
CN102436411A (zh) * 2011-12-31 2012-05-02 曙光信息产业股份有限公司 计算机系统进程恢复方法
US20160154701A1 (en) * 2014-12-02 2016-06-02 International Business Machines Corporation Enhanced restart of a core dumping application
CN106406963A (zh) * 2016-09-29 2017-02-15 杭州迪普科技有限公司 一种Linux系统的初始化方法和装置
CN108415734A (zh) * 2018-03-22 2018-08-17 车智互联(北京)科技有限公司 一种应用恢复装置、方法和移动终端
CN110321241A (zh) * 2018-03-30 2019-10-11 华为技术有限公司 一种应用程序的重启方法及终端设备
CN111459623A (zh) * 2019-01-18 2020-07-28 华为技术有限公司 应用程序恢复运行的方法、装置及计算机
CN111008044A (zh) * 2019-11-29 2020-04-14 支付宝实验室(新加坡)有限公司 一种应用程序的恢复方法、系统以及电子设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116048744A (zh) * 2022-08-19 2023-05-02 荣耀终端有限公司 一种图像获取方法及相关电子设备
CN116048744B (zh) * 2022-08-19 2023-09-12 荣耀终端有限公司 一种图像获取方法及相关电子设备
CN117707626A (zh) * 2022-10-09 2024-03-15 荣耀终端有限公司 系统启动方法及电子设备

Also Published As

Publication number Publication date
CN114077519B (zh) 2022-11-18
CN114077519A (zh) 2022-02-22

Similar Documents

Publication Publication Date Title
WO2020259452A1 (zh) 一种移动终端的全屏显示方法及设备
WO2020168965A1 (zh) 一种具有折叠屏的电子设备的控制方法及电子设备
WO2021017889A1 (zh) 一种应用于电子设备的视频通话的显示方法及相关装置
WO2020224449A1 (zh) 一种分屏显示的操作方法及电子设备
WO2020000448A1 (zh) 一种柔性屏幕的显示方法及终端
WO2021213164A1 (zh) 应用界面交互方法、电子设备和计算机可读存储介质
EP4024168A1 (en) Hand gesture interaction method and apparatus, and terminal device
WO2021063311A1 (zh) 具有折叠屏的电子设备的显示控制方法及电子设备
WO2021185105A1 (zh) SIM卡和eSIM卡的切换方法及电子设备
WO2020173370A1 (zh) 一种应用图标的移动方法及电子设备
WO2020168968A1 (zh) 一种具有折叠屏的电子设备的控制方法及电子设备
WO2021159746A1 (zh) 文件共享方法、系统及相关设备
WO2021052204A1 (zh) 基于通讯录的设备发现方法、音视频通信方法及电子设备
WO2020015259A1 (zh) 一种数据备份方法及终端
WO2022042770A1 (zh) 控制通信服务状态的方法、终端设备和可读存储介质
CN113704205B (zh) 日志存储的方法、芯片、电子设备和可读存储介质
WO2022089000A1 (zh) 文件系统检测方法、电子设备及计算机可读存储介质
WO2022001258A1 (zh) 多屏显示方法、装置、终端设备及存储介质
WO2022037725A1 (zh) 一种系统服务恢复方法、装置和电子设备
WO2022170856A1 (zh) 建立连接的方法与电子设备
WO2022143180A1 (zh) 协同显示方法、终端设备及计算机可读存储介质
JP7204902B2 (ja) ファイル転送方法および電子デバイス
US11467894B2 (en) Screen freezing processing method and terminal
WO2022170854A1 (zh) 视频通话的方法与相关设备
CN113901485B (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: 21857812

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21857812

Country of ref document: EP

Kind code of ref document: A1