Movatterモバイル変換


[0]ホーム

URL:


CN114077519B - A system service recovery method, device and electronic equipment - Google Patents

A system service recovery method, device and electronic equipment
Download PDF

Info

Publication number
CN114077519B
CN114077519BCN202010855466.5ACN202010855466ACN114077519BCN 114077519 BCN114077519 BCN 114077519BCN 202010855466 ACN202010855466 ACN 202010855466ACN 114077519 BCN114077519 BCN 114077519B
Authority
CN
China
Prior art keywords
samgr
electronic device
proxy object
local manager
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010855466.5A
Other languages
Chinese (zh)
Other versions
CN114077519A (en
Inventor
胡跃川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co LtdfiledCriticalHonor Device Co Ltd
Priority to CN202010855466.5ApriorityCriticalpatent/CN114077519B/en
Priority to PCT/CN2021/125423prioritypatent/WO2022037725A1/en
Publication of CN114077519ApublicationCriticalpatent/CN114077519A/en
Application grantedgrantedCritical
Publication of CN114077519BpublicationCriticalpatent/CN114077519B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

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

Figure 202010855466

The embodiment of the present application provides a system service recovery method, device and electronic equipment, the method includes: the local administrator in the electronic equipment control system capability SA process listens to the death notification information of the system capability manager SAMGR process through the Binder driver program, 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 obtain the 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, so as to restore system services, implemented by using this application The system service recovery method provided can effectively reduce the time required for system service recovery, improve the efficiency of system service recovery, and has strong usability and practicability.

Figure 202010855466

Description

Translated fromChinese
一种系统服务恢复方法、装置和电子设备A system service recovery method, device and electronic equipment

技术领域technical field

本申请涉及电子技术领域,尤其涉及一种系统服务恢复方法、装置和电子设备。The present application relates to the field of electronic technology, and in particular to a system service recovery method, device and electronic equipment.

背景技术Background technique

随着电子技术和互联网技术的发展,电子设备(例如手机、平板电脑等)已经成为人们生活中不可或缺的一部分,用户在电子设备上安装各种各样的第三方应用和服务软件来满足日常生活的需求,但同时基于电子设备的第三方应用和服务软件也涌现出了越来越多的兼容性问题,而第三方应用和服务软件的兼容性问题可能导致电子设备的系统进程出现崩溃。With the development of electronic technology and Internet technology, electronic devices (such as mobile phones, tablet computers, etc.) have become an indispensable part of people's lives. Users install various third-party applications and service software on electronic devices to meet The needs of daily life, but at the same time, more and more compatibility problems have emerged in third-party applications and service software based on electronic devices, and the compatibility problems of third-party applications and service software may cause the system process of electronic devices to crash .

现有的电子设备在系统进程出现崩溃时,一般是通过重启电子设备来恢复系统服务。然而,重启电子设备所需要的时间较长、效率较低,电子设备的系统进程需要较长时间才能正常对外提供服务,严重的影响了用户的使用体验。When a system process of an existing electronic device crashes, the system service is generally restored by restarting the electronic device. However, it takes a long time and low efficiency to restart the electronic device, and it takes a long time for the system process of the electronic device to provide external services normally, which seriously affects the user experience.

发明内容Contents of the invention

本申请公开了一种系统服务恢复方法、电子设备和计算机可读存储介质。可以有效降低系统服务恢复所需要的时长,提高系统服务恢复的效率。The application discloses a system service recovery method, electronic equipment and a computer-readable storage medium. It can effectively reduce the time required for system service recovery and improve the efficiency of system service recovery.

第一方面,本申请实施例提供一种系统服务恢复方法,应用于电子设备中,该方法包括:电子设备控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;当监听到所述SAMGR进程的死亡通知信息后,电子设备控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;电子设备控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。In the first aspect, the embodiment of the present application provides a system service recovery method, which is applied to electronic equipment, and the method includes: the local administrator in the electronic equipment control system capability SA process listens to the system capability manager SAMGR process through the Binder driver program The death notification information of 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 the Binder The program obtains the proxy object of the SAMGR process; the electronic device controls the local administrator to register the system capabilities in the SA process into the SAMGR process through the proxy object of the SAMGR process, so as to restore system services.

本申请实施例中通过控制系统能力SA进程中的本地管理者获取SAMGR进程的代理对象,再通过该SAMGR进程的代理对象把SA进程中的系统能力注册到SAMGR进程中以恢复系统记录,从而使得采用本申请实施例提供的系统恢复方法的电子设备在SAMGR进程崩溃后,不再需要重新启动电子设备,而仅是启动崩溃的SAMGR进程,降低了系统服务恢复所需要的时长,提高了系统服务恢复的效率,具有较强的易用性和实用性。In the embodiment of the present application, the local manager in the control system capability SA process obtains the proxy object of the SAMGR process, and then registers the system capability in the SA process into the SAMGR process through the proxy object of the SAMGR process to restore the system record, so that The electronic device using the system recovery method provided by the embodiment of the present application no longer needs to restart the electronic device after the SAMGR process crashes, but only starts the collapsed SAMGR process, which reduces the time required for system service recovery and improves system service. Recovery efficiency, with strong ease of use and practicality.

示例性的,每个SA进程中均具有唯一一个本地管理者,一个本地管理者用于管理一个SA进程中的系统能力,每个SA进程中有一个或多个系统能力。Exemplarily, each SA process has a unique local manager, and one local manager is used to manage system capabilities in one SA process, and each SA process has one or more system capabilities.

示例性的,所述本地管理者可以读取系统能力启动配置文件,按照预定的顺序启动电子设备的系统能力,并通过所述Binder驱动程序将所启动的系统能力注册到所述SAMGR进程中。所述本地管理者还可以向所述Binder驱动程序注册所述SAMGR进程的死亡通知。Exemplarily, the local administrator may read the system capability activation configuration file, activate the system capabilities of the electronic device in a predetermined order, and register the activated system capabilities into the SAMGR process through the Binder driver. The local manager can also register the death notification of the SAMGR process with the Binder driver.

示例性的,死亡通知信息为向Binder驱动程序通知所述SAMGR进程崩溃的信息,比如当SAMGR进程异常终止时,Binder驱动程序无法与SAMGR进程的代理对象进行Binder通信,这时,Binder驱动程序监听到所述SAMGR进程崩溃,所述Binder驱动程序调用死亡通知接口向本地管理者发送SAMGR进程的死亡通知信息。Exemplary, the death notification information is the information that notifies the Binder driver of the collapse of the SAMGR process. For example, when the SAMGR process terminates abnormally, the Binder driver cannot perform Binder communication with the proxy object of the SAMGR process. At this time, the Binder driver monitors When the SAMGR process crashes, the Binder driver calls the death notification interface to send the death notification information of the SAMGR process to the local manager.

示例性的,SAMGR进程用于管理电子设备中的所有SA进程中的系统能力,以及提供注册、查询和获取系统能力的服务。Exemplarily, the SAMGR process is used to manage system capabilities in all SA processes in the electronic device, and provide services for registering, querying, and obtaining system capabilities.

示例性的,所述SAMGR进程中提供有获取系统能力(getSystemAbility)的接口、注册系统能力(AddSystemAbility)的接口,以及查询系统能力(CheckSystemAbility)的接口,在系统能力启动后,所述Binder驱动程序可以通过AddSystemAbility接口将该系统能力注册到SAMGR进程中。某一应用程序可以通过SAMGR进程获取其所需要使用到的系统能力。当SAMGR进程崩溃后,新启动的应用程序无法通过SAMGR进程获取到其所需要使用到的系统能力,该新启动的应用程序将会出现闪退的情况,通过采用本申请实施例提供的系统服务恢复方法,可以快速把SA进程中的系统能力注册到重新启动后的SAMGR进程中,以恢复电子设备的系统服务,从而不需要重新启动电子设备,也可以快速恢复电子设备对外提供服务的能力,提高了用户的使用体验。Exemplarily, 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). After the system capabilities are started, the Binder driver The system capability can be registered in the SAMGR process through the AddSystemAbility interface. An application program can obtain the system capabilities it needs to use through the SAMGR process. When the SAMGR process crashes, the newly started application program cannot obtain the system capabilities it needs to use through the SAMGR process, and the newly started application program will flash back. By using the system service provided by the embodiment of the present application 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 device, so that the electronic device does not need to be restarted, and the ability of the electronic device to provide external services can also be quickly restored. Improved user experience.

在第一方面的第一种可能的实施方式中,所述控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,包括:控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中。In a first possible implementation manner of the first aspect, the controlling the local manager to register the system capabilities in the SA process into the SAMGR process through a proxy object of the SAMGR process includes: Controlling the local manager to send 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 into the SAMGR process.

示例性的,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息,比如系统能力的编号、系统能力的代理对象等。Exemplarily, the SA record information records information related to system capabilities in the SA process, such as system capability numbers, system capability proxy objects, and the like.

本申请实施例在控制本地管理者通过SAMGR进程的代理对象,把SA进程中的系统能力注册到所述SAMGR进程中,是通过控制本地管理者通过SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,以使得本地管理者可以把SA进程中的系统能力注册到所述SAMGR进程中。在SAMGR进程接收到本地管理者发送的SA记录信息后,SAMGR进程中将记录有相应系统能力的编号,以及相应系统能力的代理对象等,从而使得应用程序在通过SAMGR进程获取其所需要使用的系统能力时,可以通过该系统能力的代理对象获取到该系统能力的编号,实现应用程序调用该系统能力的目的。The embodiment of the present application controls the local administrator to register the system capabilities in the SA process into the SAMGR process through the proxy object of the SAMGR process, and sends the The system capability SA records information so that the local administrator can register the system capabilities in the SA process into the SAMGR process. After the SAMGR process receives the SA record information sent by the local administrator, the SAMGR process will record the number of the corresponding system capability and the proxy object of the corresponding system capability, so that the application can obtain the information it needs to use through the SAMGR process. When using a system capability, the serial number of the system capability can be obtained through the proxy object of the system capability, so as to achieve the purpose of calling the system capability by the application program.

在第一方面的第二种可能的实施方式中,所述控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象,包括:控制所述SAMGR进程重启;控制所述Binder驱动程序与所述SAMGR进程进行Binder通信,获取所述SAMGR进程的代理对象;控制所述Binder驱动程序向所述本地管理者发送所述SAMGR进程的代理对象。In the second possible implementation manner of the first aspect, the 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; and controls the Binder driver to send the proxy object of the SAMGR process to the local manager.

本申请实施例中,SAMGR进程崩溃后,电子设备将控制该SAMGR进程重启,重启后的SAMGR进程为空进程,需要本地管理者将当前SA进程中的系统能力注册到SAMGR进程中,才能恢复电子设备的系统服务,而本地管理者要将当前SA进程中的系统能力注册到SAMGR进程中,则需要与SAMGR进程进行Binder通信,也就是说本地管理者需要获取到SAMGR进程的代理对象,才能实现将当前SA进程中的系统能力注册到SAMGR进程中的目的。本申请实施例通过控制Binder驱动程序与SAMGR进程进行Binder通信,获取SAMGR进程的代理对象;在Binder驱动程序获取到SAMGR进程的代理对象后,电子设备控制Binder驱动程序向本地管理者发送SAMGR进程的代理对象。In the embodiment of this application, after the SAMGR process crashes, the electronic device will control the restart of the SAMGR process. 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 if the local administrator wants to register the system capabilities in the current SA process into the SAMGR process, it needs to communicate with the SAMGR process through Binder, that is to say, the local administrator needs to obtain the proxy object of the SAMGR process to realize The purpose of registering the system capabilities in the current SA process into the SAMGR process. The embodiment of the present application carries out Binder communication by controlling the Binder driver and the SAMGR process to obtain the proxy object of the SAMGR process; after the Binder driver obtains the proxy object of the SAMGR process, the electronic device controls the Binder driver to send the SAMGR process to the local manager proxy object.

在第一方面的第三种可能的实施方式中,在控制所述SAMGR进程重启之前,包括:当守护进程监听到所述SAMGR进程的死亡通知信息时,控制所述守护进程触发所述SAMGR进程的重启指令。In a third possible implementation manner of the first aspect, before controlling the restart of the SAMGR process, it 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.

示例性的,所述守护进程用于启动SAMGR进程,以及守护并监视SAMGR进程。Exemplarily, the daemon process is used to start the SAMGR process, and guard and monitor the SAMGR process.

本申请实施例中,当SAMGR进程崩溃时,守护进程通过Binder驱动程序监听到SAMGR进程的死亡通知信息,这时,电子设备将控制守护进程触发SAMGR进程的重启指令,以重新启动SAMGR进程。In the embodiment of the present application, when the SAMGR process crashes, 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 the restart command of the SAMGR process to restart the SAMGR process.

在SAMGR进程重新启动后,Binder驱动程序将与SAMGR进程建立Binder通信,使得SA进程中的本地管理者可以通过SAMGR进程的代理对象进行Binder通信。After the SAMGR process is restarted, the Binder driver will establish Binder communication with the SAMGR process, so that the local manager in the SA process can perform Binder communication through the proxy object of the SAMGR process.

第二方面,本申请实施例提供一种系统服务恢复装置,该装置包括:信息监听单元,用于控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;代理对象获取单元,用于当监听到所述SAMGR进程的死亡通知信息后,控制由所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;系统能力注册单元,用于控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。In the second aspect, the embodiment of the present application provides a system service recovery device, which includes: an information monitoring unit, used to control the local manager in the system capability SA process to monitor the death of the system capability manager SAMGR process through the 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 through the 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.

示例性的,所述系统能力注册单元,具体用于:控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息。Exemplarily, the system capability registration unit is specifically configured to: control the local manager to send 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 Capabilities are registered in the SAMGR process, and information about system capabilities in the SA process is recorded in the SA record information.

示例性的,所述代理对象获取单元,包括:SAMGR进程重启子单元,用于控制所述SAMGR进程重启;代理对象获取子单元,用于控制所述Binder驱动程序与所述SAMGR进程进行Binder通讯通信,获取所述SAMGR进程的代理对象;代理对象发送子单元,用于控制所述Binder驱动程序向所述本地管理者发送所述SAMGR进程的代理对象。Exemplarily, the proxy object acquisition unit includes: a SAMGR process restart subunit, used to control the restart of the SAMGR process; a proxy object acquisition 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.

示例性的,所述代理对象获取单元,还包括:重启指令触发子单元,用于当守护进程监听到所述SAMGR进程的死亡通知信息时,控制所述守护进程触发所述SAMGR进程的重启指令,所述守护进程用于启动SAMGR进程,以及守护并监视SAMGR进程。Exemplarily, the proxy object acquiring unit further includes: a restart command triggering subunit, configured to control the daemon process to trigger the restart command 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 guard and monitor the SAMGR process.

第三方面,本申请提供了一种电子设备,包括:处理器和存储器,所述处理器和所述存储器耦合,所述存储器用于存储计算机程序(也可称为指令或代码),当所述处理器执行所述计算机程序时,使得上述电子设备执行如第一方面或者第一方面任一种可能的实施方式提供的方法。In a third aspect, the present application provides an electronic device, including: a processor and a memory, the processor and the memory are coupled, and the memory is used to store computer programs (also referred to as instructions or codes), when the When the processor executes the computer program, the electronic device executes the method provided in the first aspect or any possible implementation manner of the first aspect.

第四方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在电子设备上运行时,使得上述电子设备执行如第一方面或者第一方面任一种可能的实施方式提供的方法。In a fourth aspect, the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is run on an electronic device, the above-mentioned electronic device executes the method described in the first aspect or The method provided in any possible implementation manner of the first aspect.

第五方面,本申请实施例提供一种芯片,包括处理器,当所述处理器读取并执行存储器中存储的计算机程序时,实现如第一方面或者第一方面任一种可能的实施方式提供的方法。In the fifth aspect, the embodiment of the present application provides a chip, including a processor, and when the processor reads and executes the computer program stored in the memory, the first aspect or any possible implementation manner of the first aspect can be realized provided method.

第六方面,本申请实施例提供一种芯片系统,包括存储器和处理器,当上述芯片系统运行时,使得上述电子设备执行如第一方面或者第一方面任一种可能的实施方式提供的方法。上述芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。In a sixth aspect, an embodiment of the present application provides a system-on-a-chip, including a memory and a processor. When the above-mentioned system-on-a-chip is running, the above-mentioned electronic device executes the method provided in 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.

可以理解地,上述提供的第三方面上述的电子设备、第四方面上述的计算机存储介质或者第六方面上述的芯片均用于执行第一方面或者第一方面任一种可能的实施方式提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。It can be understood that the above-mentioned electronic device in the third aspect, the computer storage medium in the fourth aspect, or the chip in the sixth aspect are all used to implement the first aspect or any one of the possible implementations of the first aspect. method. Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method, and will not be repeated here.

附图说明Description of drawings

下面对本申请实施例用到的附图进行介绍。The accompanying drawings used in the embodiments of the present application are introduced below.

图1是本申请实施例提供的电子设备100的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application;

图2是本申请实施例提供的一种系统架构示意图;FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application;

图3是本申请实施例提供的一种系统服务恢复方法的流程示意图;FIG. 3 is a schematic flowchart of a system service recovery method provided in an embodiment of the present application;

图4是本申请实施例提供的一种系统服务恢复方法的流程交互示意图;FIG. 4 is a schematic flow diagram of a system service recovery method provided in an embodiment of the present application;

图5是本申请实施例提供的一种获取SAMGR进程的代理对象的方法的流程示意图;Fig. 5 is a schematic flow diagram of a method for obtaining a proxy object of a SAMGR process provided by an embodiment of the present application;

图6是本申请实施例提供的一种系统服务恢复装置的结构示意图;FIG. 6 is a schematic structural diagram of a device for restoring system services provided by an embodiment of the present application;

图7是本申请实施例提供的一种芯片的结构示意图。FIG. 7 is a schematic structural diagram of a chip provided by an embodiment of the present application.

具体实施方式Detailed ways

下面结合本申请实施例中的附图对本申请实施例进行描述。本申请实施例的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。Embodiments of the present application are described below with reference to the drawings in the embodiments of the present application. The terms used in the implementation of the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

本申请实施例中涉及的电子设备可以是手机、平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴电子设备、虚拟现实设备等。本申请对电子设备的具体类型不作限定。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 (ultra-mobile personal computer, UMPC), handheld computers, netbooks, personal digital assistants (personal digital assistant, PDA), wearable electronic devices, virtual reality devices, etc. The present application does not limit the specific type of electronic equipment.

请参阅图1,图1是本申请实施例提供的一种电子设备100的结构示意图。Please refer to FIG. 1 . FIG. 1 is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.

电子设备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等。The electronic device 100 may include aprocessor 110, anexternal memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 ,mobile communication module 150, wireless communication module 160,audio module 170,speaker 170A,receiver 170B,microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM)card interface 195 and the like. 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, an ambient light sensor 180L, bone conduction sensor 180M, etc.

可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。Theprocessor 110 may include one or more processing units, for example: theprocessor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor ( image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. . Wherein, different processing units may be independent devices, or may be integrated in one or more processors.

其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Wherein, 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 opcode and timing signal, and complete the control of fetching and executing the instruction.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in theprocessor 110 for storing instructions and data. In some embodiments, the memory inprocessor 110 is a cache memory. The memory may hold instructions or data that theprocessor 110 has just used or recycled. If theprocessor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of theprocessor 110 is reduced, thus improving the efficiency of the system.

在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments,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 circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or A universal serial bus (universal serial bus, USB) interface, etc.

I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments,processor 110 may include multiple sets of I2C buses. Theprocessor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces. For example, theprocessor 110 may be coupled to the touch sensor 180K through the I2C interface, so that theprocessor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .

I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments,processor 110 may include multiple sets of I2S buses. Theprocessor 110 may be coupled to theaudio module 170 through an I2S bus to implement communication between theprocessor 110 and theaudio module 170 . In some embodiments, theaudio 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 the Bluetooth headset.

PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, theaudio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, theaudio 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.

UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect theprocessor 110 and the wireless communication module 160 . For example: theprocessor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, theaudio 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.

MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect theprocessor 110 with peripheral devices such as the display screen 194 and the camera 193 . The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (displayserial interface, DSI), and the like. In some embodiments, theprocessor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 . Theprocessor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .

GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect theprocessor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , theaudio module 170 , the sensor module 180 and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.

USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 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 and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.

可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用所述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection modes in the above embodiments, or a combination of multiple interface connection modes.

充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .

电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and theprocessor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for theprocessor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in theprocessor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.

电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , themobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.

天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.

移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。Themobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . Themobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. Themobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. Themobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of themobile communication module 150 may be set in theprocessor 110 . In some embodiments, at least part of the functional modules of themobile communication module 150 and at least part of the modules of theprocessor 110 may be set in the same device.

调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited tospeaker 170A,receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from theprocessor 110, and be set in the same device as themobile communication module 150 or other functional modules.

无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal 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转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to theprocessor 110 . The wireless communication module 160 can also receive the signal to be sent from theprocessor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.

在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,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),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to themobile communication module 150, and the antenna 2 is coupled to 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 (general packet radio service, GPRS), code division multiple access (codedivision multiple access, CDMA), wideband code Wideband 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 (global navigation satellite system, GLONASS), a Beidou satellite navigation system (beidounavigation satellite system, BDS), a quasi-zenith satellite system (quasi- zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).

电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel may 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 emitting diode). AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.

在一些实施例中,当显示面板采用OLED、AMOLED、FLED等材料时,所述图1中的显示屏194可以被弯折。这里,所述显示屏194可以被弯折是指显示屏可以在任意部位弯折到任意角度,并可以在该角度保持。例如,显示屏194可以从中部左右对折,也可以从中部上下对折。本申请实施例中,将可以被弯折的显示屏称为可折叠显示屏。其中,该可折叠显示屏可以是一块屏幕,也可以是多块屏幕拼凑在一起组合成的显示屏,在此不作限定。In some embodiments, when OLED, AMOLED, FLED and other materials are used for the display panel, the display screen 194 in FIG. 1 can be bent. Here, the display screen 194 being bendable means that the display screen 194 can be bent at any position to any angle and can be kept at this angle. For example, the display screen 194 can be folded in half from the middle part left and right, or can be folded in half from the middle part up and down. In the embodiments of the present application, a display screen that can be bent is called a foldable display screen. Wherein, the foldable display screen may be one screen, or may be a display screen composed of multiple screens pieced together, which is not limited here.

在一些实施例中,该电子设备100可以通过重力传感器、加速度传感器和陀螺仪中的一个或多个,可以判断该可折叠显示屏处于折叠形态还是处于展开形态,还可以判断该可折叠显示屏处于竖屏显示状态还是处于横屏显示状态。该电子设备100还可以通过重力传感器、加速度触感器和陀螺仪,检测该可折叠显示屏的弯折的夹角,然后,电子设备100可以根据该弯折的夹角,判断出该可折叠显示屏处于折叠形态还是处于展开形态。电子设备100还可与通过重力传感器、加速度传感器和陀螺仪中的一个或多个,判断折叠形态下,该可折叠显示屏的朝向,进而确定出显示系统所输出界面内容的显示区域。例如,当该可折叠显示屏的第一屏幕区域相对于地面朝向上方时,电子设备100可以将显示系统输出的界面内容,显示在第一屏幕区域上。当该可折叠显示屏的第二屏幕区域相对于地面朝向上方时,电子设备100可以将显示系统输出的界面内容,显示在第二屏幕区域上。In some embodiments, the electronic device 100 can use one or more of the gravity sensor, acceleration sensor and gyroscope to determine whether the foldable display screen is in the folded state or in the unfolded state, and can also determine whether the foldable display screen is in the folded state or in the unfolded state. Whether it is in the portrait display state or in the landscape display state. The electronic device 100 can also detect the bending angle of the foldable display screen through the gravity sensor, acceleration touch sensor and gyroscope, and then, the electronic device 100 can judge the foldable display screen according to the bending angle. Whether the screen is folded or unfolded. The electronic device 100 can also use one or more of the gravity sensor, acceleration sensor and gyroscope to determine the orientation of the foldable display screen in the folded state, and then determine the 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.

在一些实施例中,该电子设备100还可以包括角度传感器(图1中未示出)该角度传感器可以设置在该可折叠显示屏的弯折部位处。电子设备100可以通过设置在该可折叠显示屏的弯折部位的角度传感器(图1中未示出),测量该可折叠显示屏中间弯折部位两端所成夹角,当该夹角大于或等于第一角度时,电子设备100可以通过角度传感器识别出该可折叠显示屏进入展开状态。当该夹角小于或等于第一角度时,电子设备100可以通过角度传感器识别出该可折叠显示屏进入折叠形态。In some embodiments, the electronic device 100 may further include an angle sensor (not shown in FIG. 1 ). The angle sensor may be disposed at a bending portion of the foldable display screen. The electronic device 100 can measure the included angle formed by the two ends of the middle bending part of the foldable display screen through an angle sensor (not shown in FIG. 1 ) arranged at the bending part of the foldable display screen. When the included 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 may recognize through the angle sensor that the foldable display screen enters the folded state.

在其他一些实施例中,电子设备100也可以通过设置在该可折叠显示屏的弯折部位的物理开关,识别出该可折叠显示屏是否处于折叠形态。例如,当电子设备接收到用户对该可折叠显示屏的折叠操作,该设置在该电子设备上的物理开关被触发打开,电子设备100可以确定该可折叠显示屏处于折叠形态。当电子设备100接收到用户对该可折叠显示屏展开操作,该设置在该电子设备上的物理开关被触发关闭,电子设备可以确定该可折叠显示屏处于展开形态。所述示例仅仅用于解释本申请,不应构成限定。In some other embodiments, the electronic device 100 may also identify whether the foldable display is in a folded state through a physical switch provided at a bending portion of the foldable display. For example, when the electronic device receives a user's folding operation on the foldable display screen, and the physical switch provided on the electronic device is triggered to open, 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 off, and the electronic device can determine that the foldable display screen is in an unfolded state. The examples are for the purpose of explaining the application only and should not be construed as limiting.

下文以可折叠显示屏为两折叠显示屏为例,当可折叠显示屏处于展开形态时,该可折叠显示屏可全屏显示内容,也可部分区域(例如第一屏幕区域或第二屏幕区域)显示内容,也可两个或两个以上部分区域显示内容。在一种可能的实现方式中,可折叠显示屏全屏显示界面内容时,该界面内容可以占用该可折叠显示屏的部分显示区域,例如显示屏194为异形切割屏(Notch屏)时,异形切割屏的中间部分显示该界面内容,一侧或两侧边缘部分黑屏时,也可以看作该可折叠显示屏全屏显示该界面内容。The following takes the foldable display as an example of a two-fold display. When the foldable display is in the unfolded state, the foldable display can display content on the 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. In a possible implementation, when the foldable display screen displays the interface content in full screen, the interface content may occupy part of the display area of the foldable display screen. For example, when the display screen 194 is a special-shaped cutting screen (Notch screen), the special-shaped cutting The middle part of the screen displays the content of the interface, and when one or both edges are black, the foldable display screen can also be regarded as displaying the content of the interface in full screen.

电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.

ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .

摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (complementary metal-oxide-semiconductor, CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.

数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.

视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.

外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。Theexternal memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with theprocessor 110 through theexternal memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.

内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store computer-executable program codes including instructions. Theprocessor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 . The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.

电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through theaudio module 170 , thespeaker 170A, thereceiver 170B, themicrophone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.

音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。Theaudio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. Theaudio module 170 may also be used to encode and decode audio signals. In some embodiments, theaudio module 170 may be set in theprocessor 110 , or some functional modules of theaudio module 170 may be set in theprocessor 110 .

扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music throughspeaker 170A, or listen to hands-free calls.

受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, thereceiver 170B can be placed close to the human ear to receive the voice.

麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。Themicrophone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to themicrophone 170C to make a sound, and input the sound signal to themicrophone 170C. The electronic device 100 may be provided with at least onemicrophone 170C. In some other embodiments, the electronic device 100 may be provided with twomicrophones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four ormore microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.

耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used for connecting wired earphones. The earphone interface 170D may be the USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may be comprised of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of 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. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.

陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.

加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.

距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.

接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。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 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 may 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 is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.

环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used for sensing ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.

指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.

温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .

骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, 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 human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone. Theaudio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired 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 beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.

按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100 .

马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.

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分离。TheSIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 100 by inserting it into theSIM card interface 195 or pulling it out from theSIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the sameSIM card interface 195 at the same time. The types of the multiple cards may be the same or different. TheSIM card interface 195 is also compatible with different types of SIM cards. TheSIM 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 calling and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .

在本申请实施例中,电子设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。其中,硬件层可以包括中央处理器(central processingunit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。操作系统层的操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。应用层可以包含浏览器、通讯录、文字处理软件、即时通信软件等应用。In the embodiment of the present application, 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. Wherein, the hardware layer may include hardware such as a central processing unit (central processing unit, CPU), a memory management unit (memory management unit, MMU), and memory (also called main memory). The operating system of the operating system layer can be any one or more computer operating systems that realize business processing through processes, for example, Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system. The application layer may include applications such as browsers, address books, word processing software, and instant messaging software.

本申请基于上述电子设备100,提供了一种系统服务恢复方法。The present application provides a system service recovery method based on the above-mentioned electronic device 100 .

首先,对本申请实施例中涉及的部分用语进行解释说明,以便于本领域技术人员容易理解。First, some terms involved in the embodiments of the present application are explained so as to be easily understood by those skilled in the art.

系统能力(SystemAbility,SA):继承SA基类,提供跨进程服务能力。常见的系统能力有包管理服务、非精准延时任务调度服务、分布式任务调度服务、电话服务等,不同的系统能力对应有不同的编号,比如包管理服务的编号为401,非精准延时任务调度服务的编号为1904,分布式任务调度服务的编号为1401、电话服务的编号为4001。System Ability (SystemAbility, SA): Inherit the SA base class to provide cross-process service capabilities. Common system capabilities include package management service, non-precise delay task scheduling service, distributed task scheduling service, telephone service, etc. Different system capabilities correspond to different numbers. For example, the package management service number is 401, and the non-precise delay time 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.

系统能力(SystemAbility,SA)进程:系统能力的容器,一个SA进程中有多个系统能力,被SA进程中唯一一个本地管理者(LocalAbilityManager)进行管理。即每个SA进程中均具有唯一一个本地管理者,一个本地管理者用于管理一个SA进程中的系统能力,每个SA进程中有一个或多个系统能力。System Ability (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 only one local manager, and one local manager is used to manage system capabilities in one SA process, and each SA process has one or more system capabilities.

本地管理者(LocalAbilityManager):SA进程管理系统能力的实体,用于对SA进程中的系统能力进行管理,具体负责对一个SA进程中的1个或多个系统能力进行管理。LocalAbilityManager: an entity that manages system capabilities in an SA process, used to manage system capabilities in an SA process, and is specifically responsible for managing one or more system capabilities in an SA process.

系统能力管理者(SystemAbilityManager,SAMGR)进程:负责管理电子设备100系统中的所有SA进程中的所有系统能力,以及提供注册、查询和获取系统能力的服务。System Ability Manager (SystemAbilityManager, SAMGR) process: responsible for managing all system capabilities in all SA processes in the electronic device 100 system, and providing services for registration, query and acquisition of system capabilities.

可以理解的是,SAMGR进程为系统中的关键服务,当SAMGR进程崩溃时,系统将无法正常提供对外服务,比如会出现应用无响应、应用闪退等现象。现有技术中,如果关键服务崩溃,就需要重启电子设备100以恢复系统服务,然而,重启电子设备100所需要的时长较长,从而导致恢复系统服务的时间较长,使得用户使用体验较差。而通过采用本申请实施例提供的系统服务恢复方法,当SAMGR进程崩溃时,不需要重启电子设备,而仅是重启SAMGR进程,大大降低了系统服务恢复所需要的时长,提高了系统服务恢复的效率,用户的使用体验更好,具有较强的易用性和实用性。It is understandable that the SAMGR process is a key service in the system. When the SAMGR process crashes, the system will not be able to provide external services normally, for example, the application will not respond, the application will crash and so on. In the prior art, if a key service crashes, the electronic device 100 needs to be restarted to restore the system service. However, it takes a long time to restart the electronic device 100, resulting in a long time to restore the system service, which makes the user experience poor. . And by adopting 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 recovery of system service. Efficiency, better user experience, strong ease of use and practicality.

本申请实施例中涉及的系统可以为鸿蒙系统HarmonyOS,该系统为基于微内核的面向全场景的分布式操作系统,适配于手机、平板、电脑、智能汽车、可穿戴设备等多电子设备。The system involved in the embodiment of the present application may be HarmonyOS, the HarmonyOS system, which is a microkernel-based distributed operating system for all scenarios, and is adapted to multiple electronic devices such as mobile phones, tablets, computers, smart cars, and wearable devices.

图2是本申请实施例提供的一种系统架构示意图,参阅图2,该系统提供了Binder机制,通过Binder机制可以实现进程之间的通信。该系统包括SA进程、本地管理者、SAMGR进程、Binder驱动程序。FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application. Referring to FIG. 2 , the system provides a Binder mechanism through which communication between processes can be realized. The system includes SA process, local manager, SAMGR process, and Binder driver.

Binder机制采用Client-Server(客户端-服务端)通信模式,SA进程作为Client端,SAMGR进程作为Server端,两者之间通过Binder驱动程序进行通信。其中,SA进程、本地管理者、SAMGR进程位于用户空间,Binder驱动程序位于内核空间。The Binder mechanism adopts the Client-Server (client-server) communication mode, the SA process acts as the Client end, the SAMGR process acts as the Server end, and the two communicate through the Binder driver. Among them, the SA process, the local manager, and the SAMGR process are located in the user space, and the Binder driver is located in the kernel space.

下面通过具体实施例,对本申请提供的系统服务恢复方法进行示例性说明。The method for restoring system services provided by the present application will be exemplarily described below through specific embodiments.

请参阅图3和图4,图3是本申请实施例提供的一种系统服务恢复方法的流程示意图,图4是本申请实施例提供的一种系统服务恢复方法的交互流程示意图。本申请实施例中系统服务恢复方法的执行主体为电子设备100,结合图4,对如图3所示的系统服务恢复方法进行详细描述,具体如下:Please refer to FIG. 3 and FIG. 4. FIG. 3 is a schematic flowchart of a system service recovery method provided by an embodiment of the present application, and FIG. 4 is a schematic flowchart of an interaction process of a system service recovery method provided by an embodiment of the present application. In the embodiment of the present application, the execution subject of the system service recovery method is the electronic device 100. With reference to FIG. 4, the system service recovery method shown in FIG. 3 is described in detail, as follows:

S101、电子设备100控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息。S101. 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.

本申请实施例中,所述本地管理者可以读取系统能力启动配置文件,按照预定的顺序启动电子设备100的系统能力,并通过所述Binder驱动程序将所启动的系统能力注册到所述SAMGR进程中。电子设备100还可以控制所述本地管理者向所述Binder驱动程序注册所述SAMGR进程的死亡通知。In the embodiment of the present application, the local administrator can read the system capability activation configuration file, activate the system capability of the electronic device 100 in a predetermined order, and register the activated system capability to the SAMGR through the Binder driver. in progress. The electronic device 100 may also control the local manager to register the death notification of the SAMGR process with the Binder driver.

示例性的,所述SAMGR进程中提供有获取系统能力(getSystemAbility)的接口、注册系统能力(AddSystemAbility)的接口,以及查询系统能力(CheckSystemAbility)的接口,在系统能力启动后,述Binder驱动程序可以通过AddSystemAbility接口将该系统能力注册到SAMGR进程中。某一应用程序可以通过SAMGR进程获取其所需要使用到的系统能力。Exemplarily, 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). After the system capabilities are started, the Binder driver can Register the system capability into the SAMGR process through the AddSystemAbility interface. An application program can obtain the system capabilities it needs to use through the SAMGR process.

死亡通知信息为向Binder驱动程序通知所述SAMGR进程崩溃的信息,比如当SAMGR进程异常终止时,Binder驱动程序无法与SAMGR进程的代理对象进行Binder通信,这时,Binder驱动程序监听到所述SAMGR进程崩溃,所述Binder驱动程序调用死亡通知接口向本地管理者发送SAMGR进程的死亡通知信息。The death notification information is to notify the Binder driver of the collapse 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 listens to the SAMGR The process crashes, and the Binder driver calls the death notification interface to send the death notification information of the SAMGR process to the local manager.

在本申请的一些实施例中,当所述Binder驱动程序监听到所述SAMGR进程崩溃时,所述Binder驱动程序生成SAMGR进程的死亡通知信息,发送给本地管理者。In some embodiments of the present application, when the Binder driver monitors that the SAMGR process crashes, the Binder driver generates a death notification message of the SAMGR process and sends it to the local administrator.

具体的,SA进程中的本地管理者向Binder驱动程序的死亡消息通知接口注册SAMGR进程的死亡通知,使得Binder驱动程序在确定SAMGR进程的代理对象死亡时,调用该死亡消息通知接口向本地管理者发送死亡通知消息。Specifically, 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 the Binder driver calls the death message notification interface to the local manager when determining that the proxy object of the SAMGR process is dead. Send a death notification message.

S102、当监听到所述SAMGR进程的死亡通知信息后,电子设备100控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象。S102. After monitoring the death notification information of the SAMGR process, the electronic device 100 controls the local manager to obtain the proxy object of the SAMGR process through the Binder driver.

本申请实施例中,SAMGR进程是HarmonyOS系统服务的管理者,当SA进程与SAMGR进程进行Binder通信时,需要获得SAMGR进程的代理对象才能进行Binder通信。常见的系统能力有包管理服务、非精准延时任务调度服务、分布式任务调度服务、电话服务等。所有的这些系统能力都会向SAMGR进程注册,因此SAMGR进程就维护了HarmonyOS系统中的所有系统能力的一个列表。任何应用程序要想使用这些系统能力,首先要向SAMGR进程请求获得这些系统能力的引用,从而建立起和这些系统能力的联系。In the embodiment of this application, the SAMGR process is the manager of the HarmonyOS system service. When the SA process and the SAMGR process perform Binder communication, the proxy object of the SAMGR process needs to be obtained to perform the Binder communication. Common system capabilities include package management services, imprecise delay task scheduling services, distributed task scheduling services, and telephone services. All these system capabilities will be registered with the SAMGR process, so the SAMGR process maintains a list of all system capabilities in the HarmonyOS system. If any application program wants to use these system capabilities, it must first request the reference of these system capabilities from the SAMGR process, so as to establish a connection with these system capabilities.

当SAMGR进程崩溃后,新启动的应用程序无法通过SAMGR进程获取到其所需要使用到的系统能力,该新启动的应用程序将会出现闪退的情况。可以通过采用本申请实施例提供的系统服务恢复方法,可以快速地控制SA进程中的本地管理者把SA进程中的系统能力注册到重新启动后的SAMGR进程中,以恢复电子设备100的系统服务,使得不再需要重新启动电子设备100,也可以快速地恢复电子设备100对外提供服务的能力,提高了系统服务恢的恢复效率,以及提高了用户的使用体验。When the SAMGR process crashes, the newly started application program cannot obtain the system capabilities it needs to use through the SAMGR process, and the newly started application program will crash. By adopting the system service recovery method provided by the embodiment of the present application, the local administrator in the SA process can be quickly controlled to register the system capabilities in the SA process into the restarted SAMGR process, so as to restore the system service of the electronic device 100 , so that it is no longer necessary to restart the electronic device 100, and the ability of the electronic device 100 to provide external services can be quickly restored, which improves the recovery efficiency of system service recovery and improves user experience.

本申请实施例中,当SAMGR进程崩溃时,守护进程通过Binder驱动程序监听到SAMGR进程的死亡通知信息,这时,电子设备100将控制守护进程触发SAMGR进程的重启指令,以重新启动SAMGR进程。在SAMGR进程重新启动后,Binder驱动程序将与SAMGR进程建立Binder通信,使得SA进程中的本地管理者可以通过SAMGR进程的代理对象进行Binder通信。In the embodiment of the present application, when the SAMGR process crashes, the daemon process monitors the death notification information of the SAMGR process through the Binder driver. At this time, the electronic device 100 will control the daemon process to trigger a restart command of the SAMGR process to restart the SAMGR process. After the SAMGR process is restarted, the Binder driver will establish Binder communication with the SAMGR process, so that the local manager in the SA process can perform Binder communication through the proxy object of the SAMGR process.

请参考图5,图5是本申请实施例提供的一种获取SAMGR进程的代理对象的方法的流程示意图。如图5所示的获取SAMGR进程的代理对象的方法可包括:Please refer to FIG. 5 . 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 Figure 5 may include:

S201、电子设备100控制所述SAMGR进程重启。S201. The electronic device 100 controls the restart of the SAMGR process.

本申请实施例中,电子设备100通过守护进程控制所述SAMGR进程重启。所述守护进程用于启动SAMGR进程,以及守护并监视SAMGR进程。在SAMGR进程崩溃时,守护进程将会接收到一个进程终止SIGCHLD信号,该SIGCHLD信号用于指示所述守护进程触发SAMGR进程的重启指令,使得电子设备100根据该重启指令重新启动SAMGR进程。即在步骤S201之前,包括:In the embodiment of the present application, 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 guard and monitor the SAMGR process. When the SAMGR process crashes, the daemon process will receive a process termination SIGCHLD signal, and 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:

当守护进程监听到所述SAMGR进程的死亡通知信息时,电子设备100控制所述守护进程触发所述SAMGR进程的重启指令。When the daemon process detects the death notification information of the SAMGR process, the electronic device 100 controls the daemon process to trigger a restart instruction of the SAMGR process.

S202、电子设备100控制所述Binder驱动程序与所述SAMGR进程进行Binder通信,获取所述SAMGR进程的代理对象。S202. The electronic device 100 controls the Binder driver to perform Binder communication with the SAMGR process, and acquires a proxy object of the SAMGR process.

本申请实施例中,Binder驱动程序在SAMGR进程崩溃后,一直尝试与SAMGR进程的代理对象建立Binder通信,在SAMGR进程重启后,Binder驱动程序可以获取到SAMGR进程的代理对象,与重启后的SAMGR进程的代理对象建立Binder通信,使得SAMGR进程可以和SAMGR进程的代理对象通信。In the embodiment of this application, after the SAMGR process crashes, the Binder driver always tries 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、电子设备100控制所述Binder驱动程序向所述本地管理者发送所述SAMGR进程的代理对象。S203. The electronic device 100 controls the Binder driver to send the proxy object of the SAMGR process to the local manager.

本申请实施例中,电子设备100在控制Binder驱动程序与SAMGR进程的代理对象建立Binder通信后,Binder驱动程序可以向本地管理者发送SAMGR进程的代理对象,从而使得本地管理者可以获取到SAMGR进程的代理对象,实现本地管理者和SAMGR进程之间的Binder通信。In the embodiment of the present application, after the electronic device 100 controls the Binder driver to establish Binder communication with the proxy object of the SAMGR process, 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 the Binder communication between the local manager and the SAMGR process.

S103、电子设备100控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。S103. The electronic device 100 controls the local administrator to register the system capabilities in the SA process into the SAMGR process through the proxy object of the SAMGR process, so as to restore system services.

本申请实施例中,SAMGR进程崩溃后,电子设备100将控制该SAMGR进程重启,重启后的SAMGR进程为空进程,需要本地管理者将当前SA进程中的系统能力注册到SAMGR进程中,才能恢复电子设备100的系统服务,而本地管理者要将当前SA进程中的系统能力注册到SAMGR进程中,则需要与SAMGR进程进行Binder通信,也就是说本地管理者需要获取到SAMGR进程的代理对象,才能实现将当前SA进程中的系统能力注册到SAMGR进程中的目的。In the embodiment of this application, after the SAMGR process crashes, the electronic device 100 will control the restart of the SAMGR process, and 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 purpose of registering the system capabilities in the current SA process into the SAMGR process be realized.

本申请实施例通过控制Binder驱动程序与SAMGR进程进行Binder通信,可以获取到SAMGR进程的代理对象;在Binder驱动程序获取到SAMGR进程的代理对象后,电子设备100控制Binder驱动程序向本地管理者发送SAMGR进程的代理对象,从而使得电子设备100可以控制本地管理者通过SAMGR进程的代理对象,把SA进程中的系统能力注册到所述SAMGR进程中以恢复系统服务。In the embodiment of the present application, the proxy object of the SAMGR process can be obtained by controlling the Binder driver to communicate with the SAMGR process through Binder; after the Binder driver obtains the proxy object of the SAMGR process, the electronic device 100 controls the Binder driver to send the proxy object to the local manager. 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.

具体的,步骤S103包括:Specifically, step S103 includes:

控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中。Controlling the local manager to send 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 into the SAMGR process.

本申请实施例中,SA记录信息中记录有SA进程中的系统能力的相关信息,比如系统能力的编号、系统能力的代理对象等。在电子设备100控制SAMGR进程的代理对象,向SAMGR进程发送SA记录信息后,本地管理者实现了把SA进程中的系统能力注册到SAMGR进程中的目的。In this embodiment of the present application, information related to system capabilities in the SA process is recorded in the SA record information, such as system capability numbers, system capability proxy objects, and the like. After 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.

可以理解的是,在控制本地管理者通过SAMGR进程的代理对象,把SA进程中的系统能力注册到所述SAMGR进程中,是通过控制本地管理者通过SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,以使得本地管理者可以把SA进程中的系统能力注册到所述SAMGR进程中。在SAMGR进程接收到本地管理者发送的SA记录信息后,SAMGR进程中将记录有相应系统能力的编号,以及相应系统能力的代理对象等,从而使得应用程序在通过SAMGR进程获取其所需要使用的系统能力时,可以通过该系统能力的代理对象获取到该系统能力的编号,实现应用程序调用该系统能力的目的。It can be understood that, 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 by controlling the local manager to pass the proxy object of the SAMGR process to the SAMGR process Send the system capability SA record information, so that the local administrator can register the system capability in the SA process into the SAMGR process. After the SAMGR process receives the SA record information sent by the local administrator, the SAMGR process will record the number of the corresponding system capability and the proxy object of the corresponding system capability, so that the application can obtain the information it needs to use through the SAMGR process. When using a system capability, the serial number of the system capability can be obtained through the proxy object of the system capability, so as to achieve the purpose of calling the system capability by the application program.

本申请实施例中通过控制系统能力SA进程中的本地管理者获取SAMGR进程的代理对象,再通过该SAMGR进程的代理对象把SA进程中的系统能力注册到SAMGR进程中以恢复系统记录,从而使得采用本申请实施例提供的系统恢复方法的电子设备100在SAMGR进程崩溃后,不再需要重新启动电子设备,而仅是启动崩溃的SAMGR进程,降低了系统服务恢复所需要的时长,提高了系统服务恢复的效率。In the embodiment of the present application, the local manager in the control system capability SA process obtains the proxy object of the SAMGR process, and then registers the system capability in the SA process into the SAMGR process through the proxy object of the SAMGR process to restore the system record, so that The electronic device 100 using the system recovery method provided by the embodiment of the present application no longer needs to restart the electronic device after the SAMGR process crashes, but only starts the collapsed SAMGR process, which reduces the time required for system service recovery and improves the system performance. Efficiency of service restoration.

基于上述实施例所提供的系统服务恢复方法,本申请实施例进一步给出实现上述方法实施例的装置实施例。Based on the system service restoration method provided by the foregoing embodiments, the embodiments of the present application further provide device embodiments for implementing the foregoing method embodiments.

请参阅图6,图6是本申请实施例提供的系统服务恢复装置的示意图。包括的各单元用于执行图3对应的实施例中的各步骤。具体请参阅图3对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。参阅图6,系统服务恢复装置200包括:Please refer to FIG. 6 . FIG. 6 is a schematic diagram of an apparatus for restoring system services provided by an embodiment of the present application. Each included unit is used to execute each step in the embodiment corresponding to FIG. 3 . For details, refer to the relevant description in the embodiment corresponding to FIG. 3 . For ease of description, only the parts related to this embodiment are shown. Referring to FIG. 6, the system service recovery device 200 includes:

信息监听单元201,用于控制系统能力SA进程中的本地管理者通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;The information monitoring unit 201 is used to control the local administrator 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 administrator is used to monitor the system capability in the SA process. to manage;

代理对象获取单元202,用于当监听到所述SAMGR进程的死亡通知信息后,控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;Proxy object acquiring unit 202, 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;

系统能力注册单元203,用于控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。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.

示例性的,所述系统能力注册单元203,具体用于:Exemplarily, the system capability registration unit 203 is specifically used for:

控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息。Controlling the local manager to send system capability SA record information to the SAMGR process through the proxy object of the SAMGR process, registering the system capability in the SA process into the SAMGR process, and the SA record information Information related to system capabilities in the SA process is recorded.

示例性的,所述代理对象获取单元202,包括:Exemplarily, the proxy object acquiring unit 202 includes:

SAMGR进程重启子单元,用于控制所述SAMGR进程重启;The SAMGR process restart subunit is used to control the restart of the SAMGR process;

代理对象获取子单元,用于控制所述Binder驱动程序与所述SAMGR进程进行Binder通讯通信,获取所述SAMGR进程的代理对象;Proxy object acquisition subunit, used to control the Binder driver to perform Binder communication with the SAMGR process, to obtain the proxy object of the SAMGR process;

代理对象发送子单元,用于控制所述Binder驱动程序向所述本地管理者发送所述SAMGR进程的代理对象。The proxy object sending subunit is configured to control the Binder driver to send the proxy object of the SAMGR process to the local manager.

示例性的,所述代理对象获取单元202,还包括:Exemplarily, the proxy object acquiring unit 202 further includes:

重启指令触发子单元,用于当守护进程监听到所述SAMGR进程的死亡通知信息时,控制所述守护进程触发所述SAMGR进程的重启指令,所述守护进程用于启动SAMGR进程,以及守护并监视SAMGR进程。The restart command triggering subunit is used to control the restart command of the daemon process to trigger the SAMGR process when the daemon process monitors the death notification information of the SAMGR process, and the daemon process is used to start the SAMGR process, and guard and Monitor the SAMGR process.

本申请实施例中通过控制系统能力SA进程中的本地管理者获取SAMGR进程的代理对象,再通过该SAMGR进程的代理对象把SA进程中的系统能力注册到SAMGR进程中以恢复系统记录,从而使得采用本申请实施例提供的系统恢复方法的电子设备100在SAMGR进程崩溃后,不再需要重新启动电子设备,而仅是启动崩溃的SAMGR进程,降低了系统服务恢复所需要的时长,提高了系统服务恢复的效率。In the embodiment of the present application, the local manager in the control system capability SA process obtains the proxy object of the SAMGR process, and then registers the system capability in the SA process into the SAMGR process through the proxy object of the SAMGR process to restore the system record, so that The electronic device 100 using the system recovery method provided by the embodiment of the present application no longer needs to restart the electronic device after the SAMGR process crashes, but only starts the collapsed SAMGR process, which reduces the time required for system service recovery and improves the system performance. Efficiency of service restoration.

本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机指令;当所述计算机可读存储介质在电子设备100上运行时,使得该电子设备100执行如图3、图4、或者图5所示的方法。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions; when the computer-readable storage medium runs on the electronic device 100, the electronic device 100 executes such 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 transmitted from a website, computer, server, or data center Transmission to another website site, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or may be a data storage device including one or more servers, data centers, etc. that can be integrated with the medium. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium, or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)) and the like.

本申请实施例还提供了一种包含计算机指令的计算机程序产品,当其在电子设备100上运行时,使得电子设备100可以执行图3、图4、或者图5所示的方法。The embodiment of the present application also provides a computer program product including computer instructions, which, when run on the electronic device 100, enables the electronic device 100 to execute the method shown in FIG. 3 , FIG. 4 , or FIG. 5 .

图7为本申请实施例提供的一种芯片的结构示意图。图7所示的芯片可以为通用处理器,也可以为专用处理器。该芯片包括处理器301。其中,处理器301用于支持通信装置执行图3、图4、或者图5所示的技术方案。FIG. 7 is a schematic structural diagram of a chip provided by 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 aprocessor 301 . Wherein, theprocessor 301 is configured to support the communication device to execute the technical solutions shown in FIG. 3 , FIG. 4 , or FIG. 5 .

可选的,该芯片还包括收发器302,收发器302用于接受处理器301的控制,用于支持通信装置执行图3、图4、或者图5所示的技术方案。Optionally, the chip further includes atransceiver 302, and thetransceiver 302 is configured to be controlled by theprocessor 301, and configured to support the communication device to execute the technical solution shown in FIG. 3, FIG. 4, or FIG.

可选的,图7所示的芯片还可以包括:存储介质303。Optionally, the chip shown in FIG. 7 may further include: astorage medium 303 .

需要说明的是,图7所示的芯片可以使用下述电路或者器件来实现:一个或多个现场可编程门阵列(field programmable gate array,FPGA)、可编程逻辑器件(programmable logicdevice,PLD)、控制器、状态机、门逻辑、分立硬件部件、任何其他适合的电路、或者能够执行本申请通篇所描述的各种功能的电路的任意组合。It should be noted that the chip shown in FIG. 7 can be implemented using the following circuits or devices: one or more field programmable gate arrays (field programmable gate array, FPGA), programmable logic device (programmable logic device, PLD), Any combination of controllers, state machines, gate logic, discrete hardware components, any other suitable circuitry, or circuitry capable of performing the various functions described throughout this application.

上述本申请实施例提供的电子设备100、计算机存储介质、计算机程序产品、芯片均用于执行上文所提供的方法,因此,其所能达到的有益效果可参考上文所提供的方法对应的有益效果,在此不再赘述。The electronic device 100, computer storage medium, computer program product, and chip provided by the above-mentioned embodiments of the present application are all used to execute the method provided above. Therefore, the beneficial effects that it can achieve can refer to the corresponding Beneficial effects are not repeated here.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted via a computer-readable storage medium. The computer instructions may be transmitted from one web site, computer, server, or data center to another web 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 or a data center integrated with one or more available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)) and the like.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are realized. The processes can be completed by computer programs to instruct related hardware. The programs can be stored in computer-readable storage media. When the programs are executed , may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.

以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。The above is only the specific implementation of the embodiment of the application, but the protection scope of the embodiment of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the application shall be covered by this application. Within the scope of protection of the application examples. Therefore, the protection scope of the embodiments of the present application should be based on the protection scope of the claims.

Claims (8)

Translated fromChinese
1.一种系统服务恢复方法,应用于电子设备,其特征在于,包括:1. A system service recovery method applied to electronic equipment, characterized in that it comprises:控制系统能力SA进程中的本地管理者以及守护进程通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;The local manager and the daemon process in the control system capability SA process monitor the death notification information of the system capability manager SAMGR process through the Binder driver, and the local manager is used to manage the system capability in the SA process;当监听到所述SAMGR进程的死亡通知信息后,控制所述守护进程触发所述SAMGR进程的重启指令,以重新启动SAMGR进程;在所述SAMGR进程重新启动后,控制所述Binder驱动程序与所述SAMGR进程建立Binder通信,控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;After monitoring the death notification information of the SAMGR process, control the daemon process to trigger the restart instruction of the SAMGR process to restart the SAMGR process; after the SAMGR process restarts, control the Binder driver and the Described SAMGR process establishes Binder communication, controls described local manager to obtain the proxy object of described SAMGR process by described Binder driver;控制所述本地管理者通过所述SAMGR进程的代理对象进行Binder通信,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。Controlling the local manager to perform Binder communication through the proxy object of the SAMGR process, registering the system capabilities in the SA process into the SAMGR process, so as to restore system services.2.如权利要求1所述的系统服务恢复方法,其特征在于,所述控制所述本地管理者通过所述SAMGR进程的代理对象,把所述SA进程中的系统能力注册到所述SAMGR进程中,包括:2. The system service recovery method according to claim 1, wherein the local manager of the control registers the system capability in the SA process to the SAMGR process through the proxy object of the SAMGR process , including:控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息。Controlling the local manager to send system capability SA record information to the SAMGR process through the proxy object of the SAMGR process, registering the system capability in the SA process into the SAMGR process, and the SA record information Information related to system capabilities in the SA process is recorded.3.如权利要求1至2任一项所述的系统服务恢复方法,其特征在于,每个SA进程中具有唯一一个本地管理者,一个本地管理者用于管理一个SA进程中的系统能力。3. The system service restoration method according to any one of claims 1 to 2, wherein each SA process has a unique local manager, and one local manager is used to manage system capabilities in one SA process.4.一种系统服务恢复装置,其特征在于,包括:4. A device for restoring system services, comprising:信息监听单元,用于控制系统能力SA进程中的本地管理者以及守护进程通过Binder驱动程序,监听系统能力管理者SAMGR进程的死亡通知信息,所述本地管理者用于对所述SA进程中的系统能力进行管理;The information monitoring unit is used to control the local manager and the daemon process 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 death notification information of the SA process system capacity management;代理对象获取单元,用于当监听到所述SAMGR进程的死亡通知信息后,控制所述守护进程触发所述SAMGR进程的重启指令,以重新启动SAMGR进程;在所述SAMGR进程重新启动后,控制所述Binder驱动程序与所述SAMGR进程建立Binder通信,控制所述本地管理者通过所述Binder驱动程序,获取所述SAMGR进程的代理对象;The proxy object acquisition unit is used to control the daemon process to trigger the restart instruction of the SAMGR process to restart the SAMGR process after the death notification information of the SAMGR process is monitored; after the restart of the SAMGR process, the control The Binder driver establishes Binder communication with the SAMGR process, and controls the local manager to obtain the proxy object of the SAMGR process through the Binder driver;系统能力注册单元,用于控制所述本地管理者通过所述SAMGR进程的代理对象进行Binder通信,把所述SA进程中的系统能力注册到所述SAMGR进程中,以恢复系统服务。The system capability registration unit is used to control the local manager to perform Binder communication through the proxy object of the SAMGR process, and register the system capability in the SA process into the SAMGR process, so as to restore system services.5.如权利要求4所述的系统服务恢复装置,其特征在于,所述系统能力注册单元,用于:5. The system service recovery device according to claim 4, wherein the system capability registration unit is configured to:控制所述本地管理者通过所述SAMGR进程的代理对象,向所述SAMGR进程发送系统能力SA记录信息,把所述SA进程中的系统能力注册到所述SAMGR进程中,所述SA记录信息中记录有所述SA进程中的系统能力的相关信息。Controlling the local manager to send system capability SA record information to the SAMGR process through the proxy object of the SAMGR process, registering the system capability in the SA process into the SAMGR process, and the SA record information Information related to system capabilities in the SA process is recorded.6.一种电子设备,其特征在于,包括:处理器和存储器,所述处理器和所述存储器耦合,所述存储器用于存储计算机程序,当所述处理器执行所述计算机程序时,使得电子设备执行如权利要求1至3中任一项所述的系统服务恢复方法。6. An electronic device, characterized in that it comprises: a processor and a memory, the processor is coupled to the memory, the memory is used to store a computer program, and when the processor executes the computer program, the The electronic device executes the system service recovery method according to any one of claims 1-3.7.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,当所述计算机程序在电子设备上运行时,使得电子设备执行如权利要求1至3任一项所述的系统服务恢复方法。7. A computer-readable storage medium, the computer-readable storage medium stores a computer program, characterized in that, when the computer program runs on an electronic device, the electronic device executes any one of claims 1 to 3. The system service recovery method described in the item.8.一种芯片,其特征在于,包括处理器,当所述处理器读取并执行存储器中存储的计算机程序时,实现如权利要求1至3任一项所述的系统服务恢复方法。8. A chip, characterized by comprising a processor, and when the processor reads and executes the computer program stored in the memory, implements the system service recovery method according to any one of claims 1 to 3.
CN202010855466.5A2020-08-212020-08-21 A system service recovery method, device and electronic equipmentActiveCN114077519B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN202010855466.5ACN114077519B (en)2020-08-212020-08-21 A system service recovery method, device and electronic equipment
PCT/CN2021/125423WO2022037725A1 (en)2020-08-212021-10-21System service recovery method and apparatus, and electronic device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010855466.5ACN114077519B (en)2020-08-212020-08-21 A system service recovery method, device and electronic equipment

Publications (2)

Publication NumberPublication Date
CN114077519A CN114077519A (en)2022-02-22
CN114077519Btrue CN114077519B (en)2022-11-18

Family

ID=80282672

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010855466.5AActiveCN114077519B (en)2020-08-212020-08-21 A system service recovery method, device and electronic equipment

Country Status (2)

CountryLink
CN (1)CN114077519B (en)
WO (1)WO2022037725A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116048744B (en)*2022-08-192023-09-12荣耀终端有限公司 Image acquisition method and related electronic equipment
CN115328563B (en)*2022-10-092023-04-14荣耀终端有限公司 System startup method and electronic device

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106371911A (en)*2016-09-062017-02-01北京海誉动想科技股份有限公司Method for rebooting guarded process by daemon processes

Family Cites Families (22)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP3189903B2 (en)*1991-06-032001-07-16富士通株式会社 Device with capability saving / restoring mechanism
JPH0812616B2 (en)*1991-09-111996-02-07インターナショナル・ビジネス・マシーンズ・コーポレイション Passive recovery method and system for operating system kernel
US9152582B2 (en)*2010-10-012015-10-06Z124Auto-configuration of a docked system in a multi-OS environment
CN1293473C (en)*2002-06-102007-01-03联想(北京)有限公司System process protection method
US7063118B2 (en)*2003-11-202006-06-20Adc Acquisition CompanyComposite tape laying apparatus and method
US7309480B2 (en)*2004-04-162007-12-18H2Gen Innovations, Inc.Catalyst for hydrogen generation through steam reforming of hydrocarbons
JP2006065440A (en)*2004-08-252006-03-09Evolium SasProcess management system
US7282473B2 (en)*2004-09-022007-10-16Invista North America S.àr.l.Binder systems for microcapsule treatments to fibers, fabrics and garments
US20070101197A1 (en)*2005-11-032007-05-03International Business Machines CorporationSystem and method for representing system capabilities as software packages in a software package management system
CN102436411B (en)*2011-12-312015-07-22曙光信息产业股份有限公司Method for recovering process of computer system
US9740551B2 (en)*2014-12-022017-08-22International Business Machines CorporationEnhanced restart of a core dumping application
CN106708641B (en)*2016-06-202018-09-04腾讯科技(深圳)有限公司Process guard method and device
CN106484461A (en)*2016-09-132017-03-08北京智能管家科技有限公司 Service keeping alive method and device in intelligent terminal
CN106406963B (en)*2016-09-292020-09-08杭州迪普科技股份有限公司Initialization method and device of Linux system
CN108345496B (en)*2017-01-232020-12-15华为技术有限公司 A method and device for running an application program
CN107066374B (en)*2017-03-202020-07-10Oppo广东移动通信有限公司 A data processing method and mobile terminal
US10652338B2 (en)*2017-06-192020-05-12Sap SeEvent processing in background services
CN108415734A (en)*2018-03-222018-08-17车智互联(北京)科技有限公司A kind of application recovery device, method and mobile terminal
CN110321241A (en)*2018-03-302019-10-11华为技术有限公司A kind of method for restarting and terminal device of application program
CN108984321B (en)*2018-06-292021-03-19Oppo(重庆)智能科技有限公司 A mobile terminal and method for limiting inter-process communication thereof, and storage medium
CN111459623B (en)*2019-01-182024-04-12华为技术有限公司Method, device and computer for restoring running of application program
CN111008044A (en)*2019-11-292020-04-14支付宝实验室(新加坡)有限公司Application program recovery method and system and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106371911A (en)*2016-09-062017-02-01北京海誉动想科技股份有限公司Method for rebooting guarded process by daemon processes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于系统内核与共享内存的守护进程实现研究;王晨等;《工业控制计算机》;20200325(第03期);全文*

Also Published As

Publication numberPublication date
WO2022037725A1 (en)2022-02-24
CN114077519A (en)2022-02-22

Similar Documents

PublicationPublication DateTitle
CN113542839B (en) Screen projection method of electronic device and electronic device
WO2020259452A1 (en)Full-screen display method for mobile terminal, and apparatus
WO2020000448A1 (en)Flexible screen display method and terminal
WO2020224449A1 (en)Split-screen display operation method and electronic device
CN110012154A (en)A kind of control method and electronic equipment of the electronic equipment with Folding screen
CN110489215A (en)The treating method and apparatus of scene is waited in a kind of application program
WO2021063311A1 (en)Display control method for electronic device having foldable screen, and electronic device
CN114089932B (en)Multi-screen display method, device, terminal equipment and storage medium
CN114880251B (en) Storage unit access method, access device and terminal equipment
CN116723384B (en) Process control method, electronic device and readable storage medium
WO2022170856A1 (en)Method for establishing connection, and electronic device
CN115460445B (en) Screen projection method of electronic equipment and electronic equipment
CN114915747B (en) Video call method, electronic device and readable storage medium
CN111356222A (en)Transmission power adjustment method, terminal, storage medium, and electronic device
CN114490174B (en) File system detection method, electronic device and computer-readable storage medium
CN114077519B (en) A system service recovery method, device and electronic equipment
CN111061410B (en) Freeze screen processing method and terminal
CN111801931B (en) The method of connecting and hanging up the call when SRVCC switching occurs in the call
CN116684520A (en)Shutdown method and electronic equipment
WO2021129453A1 (en)Screenshot method and related device
CN117729420B (en) Continuous shooting method and electronic equipment
CN115495716B (en) A local authentication method and electronic device
HK40069651B (en)System service recovery method and apparatus, and electronic device
HK40069651A (en)System service recovery method and apparatus, and electronic device
CN114449622B (en) Method and electronic device for calculating Wi-Fi power consumption

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
REGReference to a national code

Ref country code:HK

Ref legal event code:DE

Ref document number:40069651

Country of ref document:HK

GR01Patent grant
GR01Patent grant
CP03Change of name, title or address
CP03Change of name, title or address

Address after:Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after:Honor Terminal Co.,Ltd.

Country or region after:China

Address before:3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before:Honor Device Co.,Ltd.

Country or region before:China


[8]ページ先頭

©2009-2025 Movatter.jp