[go: up one dir, main page]

CN115017487B - Switching method for login account of electronic equipment and electronic equipment - Google Patents

Switching method for login account of electronic equipment and electronic equipment Download PDF

Info

Publication number
CN115017487B
CN115017487B CN202111390076.6A CN202111390076A CN115017487B CN 115017487 B CN115017487 B CN 115017487B CN 202111390076 A CN202111390076 A CN 202111390076A CN 115017487 B CN115017487 B CN 115017487B
Authority
CN
China
Prior art keywords
electronic device
account
desktop
private space
user
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
CN202111390076.6A
Other languages
Chinese (zh)
Other versions
CN115017487A (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 Ltd filed Critical Honor Device Co Ltd
Priority to CN202111390076.6A priority Critical patent/CN115017487B/en
Publication of CN115017487A publication Critical patent/CN115017487A/en
Application granted granted Critical
Publication of CN115017487B publication Critical patent/CN115017487B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a switching method of electronic equipment login accounts and electronic equipment, and relates to the field of electronic equipment to optimize the switching process of the electronic equipment login accounts. The specific scheme is as follows: the method comprises the steps that the electronic equipment receives a first operation of a user, wherein the first operation is used for triggering switching from a second account to a first account, and the second account is an account which is logged in at present by the electronic equipment; responding to the first operation, the electronic equipment acquires the activity corresponding to the second account; the method comprises the steps that when the activities corresponding to the second account number comprise activities corresponding to the desktop of the second account number, and the desktop of the first account number runs in the background of the electronic equipment, the electronic equipment displays the desktop of the first account number, wherein the desktop of the first account number is loaded by the electronic equipment before the electronic equipment receives a first operation of a user; and the electronic equipment loads and displays the content corresponding to the first account on the desktop of the first account according to the first data.

Description

一种电子设备登录账号的切换方法及电子设备Method for switching electronic device login account and electronic device

技术领域technical field

本申请涉及电子设备领域,尤其涉及一种电子设备登录账号的切换方法及电子设备。The present application relates to the field of electronic equipment, in particular to a method for switching login accounts of electronic equipment and electronic equipment.

背景技术Background technique

目前,为了确保手机上用户的隐私数据(如保存在相册的照片或视频)和应用(如社交类应用)的安全,电子设备可以提供一个隐私空间给用户使用。At present, in order to ensure the security of users' private data (such as photos or videos stored in albums) and applications (such as social applications) on mobile phones, electronic devices can provide a private space for users to use.

发明内容Contents of the invention

本申请实施例提供了一种电子设备登录账号的切换方法及电子设备,以优化电子设备登录账号的切换过程。Embodiments of the present application provide a method for switching a login account of an electronic device and the electronic device, so as to optimize the process of switching a login account of the electronic device.

在一些场景中,用户可以在手机上建立不同登录账号,不同的登录账号对应不同的存储空间。例如,用户可以在手机上建立登录账号1和登录账号2,手机可以将一般的数据和应用存在登录账号1对应的存储空间(如称为普通空间),将隐私数据和应用存储在登录账号2对应的存储空间(如称为隐私空间),手机可以通过不同的密码或指纹进入登录账号1或登录账号2,从而可以将隐私的数据和应用与一般的数据和应用隔离开。在用户通过登录账号2对应的密码或指纹进入该登录账号时,手机可以获取隐私空间中存储的隐私数据和应用,以呈现给用户。In some scenarios, the user can create different login accounts on the mobile phone, and different login accounts correspond to different storage spaces. For example, a user can create a login account 1 and a login account 2 on the mobile phone, and the mobile phone can store general data and applications in the storage space corresponding to the login account 1 (such as a common space), and store private data and applications in the login account 2 For the corresponding storage space (such as called private space), the mobile phone can enter login account 1 or login account 2 through different passwords or fingerprints, so that private data and applications can be isolated from general data and applications. When the user enters the login account through the password or fingerprint corresponding to the login account 2, the mobile phone can obtain private data and applications stored in the private space to present to the user.

在一些场景中,手机在不同的登录账号之间进行切换,如从普通空间对应的登录账号切换到隐私空间对应的登录账号时,手机会重新加载隐私空间对应的桌面。由于手机重新加载隐私空间对应的桌面,会导致隐私空间对应的桌面上的应用程序图标需要重新加载。而隐私空间对应的桌面上的应用程序图标重新加载是逐个加载,这就导致应用程序图标加载较慢,从而导致手机切换隐私空间的时间较长,手机切换隐私空间的效率较低,用户体验较差。此外,由于手机需要重新加载隐私空间对应的桌面,隐私空间对应的壁纸也需要重新绘制,在壁纸绘制时,手机显示的是黑屏。而壁纸绘制通常需要较长的时间,在壁纸绘制时,手机一直显示的是黑屏,进一步导致手机切换隐私空间的时间较长,进而手机切换隐私空间的效率较低,用户体验较差。In some scenarios, the mobile phone switches between different login accounts. For example, when switching from the login account corresponding to the common space to the login account corresponding to the private space, the mobile phone will reload the desktop corresponding to the private space. Since the mobile phone reloads the desktop corresponding to the private space, the application icon on the desktop corresponding to the private space needs to be reloaded. However, the application icons on the desktop corresponding to the private space are reloaded one by one, which leads to slow loading of the application program icons, resulting in a long time for the mobile phone to switch the private space, low efficiency of the mobile phone switching private space, and poor user experience. Difference. In addition, since the mobile phone needs to reload the desktop corresponding to the private space, the wallpaper corresponding to the private space also needs to be redrawn. When the wallpaper is drawn, the mobile phone displays a black screen. However, it usually takes a long time to draw the wallpaper. When the wallpaper is drawn, the mobile phone always displays a black screen, which further leads to a long time for the mobile phone to switch the private space, and then the efficiency of the mobile phone to switch the private space is low, and the user experience is poor.

第一方面,本申请实施例提供一种电子设备登录账号的切换方法,应用于电子设备,该电子设备包括多个账号,多个账号包括第一账号,该方法可以包括:电子设备接收用户的第一操作,第一操作用于触发从第二账号切换到第一账号,第二账号为电子设备当前登录的账号;响应于第一操作,电子设备获取第二账号对应的活动;在第二账号对应的活动中包括第二账号的桌面对应的活动,且第一账号的桌面在电子设备的后台运行的情况下,电子设备显示第一账号的桌面,第一账号的桌面是电子设备在接收用户的第一操作之前加载的;电子设备根据第一数据,加载并在第一账号的桌面上显示第一账号对应的内容。In the first aspect, an embodiment of the present application provides a method for switching login accounts of an electronic device, which is applied to an electronic device. The electronic device includes multiple accounts, and the multiple accounts include the first account. The method may include: the electronic device receives the user The first operation, the first operation is used to trigger switching from the second account to the first account, the second account is the account currently logged in by the electronic device; in response to the first operation, the electronic device obtains the activity corresponding to the second account; in the second The activities corresponding to the account include activities corresponding to the desktop of the second account, and when the desktop of the first account is running in the background of the electronic device, the electronic device displays the desktop of the first account, and the desktop of the first account is received by the electronic device. Loaded before the user's first operation; the electronic device loads and displays the content corresponding to the first account on the desktop of the first account according to the first data.

基于第一方面所述的电子设备登录账号的切换方法,在电子设备切换到隐私空间,隐私空间的桌面在电子设备的后台运行时,电子设备可以不重新加载隐私空间对应的桌面,而是将隐私空间对应的桌面从后台切换到前台,从而隐私空间对应的桌面上的应用程序图标不需要重新加载以及隐私空间的壁纸也不需要重新绘制,从而可以避免逐个加载隐私空间对应的桌面上的应用程序图标,以及避免手机显示黑屏,进而可以缩短手机切换隐私空间的时间,提高切换隐私空间的效率,提高用户体验。此外,由于电子设备不重新加载隐私空间对应的桌面,而是将隐私空间对应的桌面从后台切换到前台,因此,该隐私空间对应的桌面可以是用户设置的桌面,并不是固定的桌面,从而能够提高用户体验。Based on the method for switching the login account of the electronic device described in the first aspect, when the electronic device is switched to the private space, and the desktop of the private space is running in the background of the electronic device, the electronic device may not reload the desktop corresponding to the private space, but The desktop corresponding to the private space is switched from the background to the foreground, so that the application icons on the desktop corresponding to the private space do not need to be reloaded and the wallpaper of the private space does not need to be redrawn, thereby avoiding loading the applications on the desktop corresponding to the private space one by one Program icons, and prevent the mobile phone from displaying a black screen, thereby shortening the time for switching the private space on the mobile phone, improving the efficiency of switching the private space, and improving user experience. In addition, because the electronic device does not reload the desktop corresponding to the private space, but switches the desktop corresponding to the private space from the background to the foreground, therefore, the desktop corresponding to the private space may be a desktop set by the user, not a fixed desktop, thus Can improve user experience.

结合第一方面,在一种可能的实现方式中,在电子设备接收用户的第一操作之前,上述电子设备登录账号的切换方法还可以包括:电子设备接收用户触发切换到第一账号的第二操作;响应于第二操作,电子设备根据第一数据,加载第一账号的桌面,并根据第一数据加载并在第一账号的桌面上显示第一账号对应的内容;电子设备存储加载的第一账号的桌面;电子设备接收用户触发从第一账号切换到其他账号的第三操作;响应于第三操作,电子设备将电子设备当前登录的账号从第一账号切换到其他账号。With reference to the first aspect, in a possible implementation manner, before the electronic device receives the user's first operation, the above method for switching the login account of the electronic device may further include: the electronic device receives a second operation triggered by the user to switch to the first account. Operation; in response to the second operation, the electronic device loads the desktop of the first account according to the first data, and loads and displays the content corresponding to the first account on the desktop of the first account according to the first data; the electronic device stores the loaded first account The desktop of an account; the electronic device receives a third operation triggered by the user to switch from the first account to another account; in response to the third operation, the electronic device switches the account currently logged in by the electronic device from the first account to other accounts.

基于该可能的实现方式,电子设备可以在隐私空间的桌面没有在电子设备的后台运行的情况下,电子设备可以加载隐私空间的桌面,进而根据隐私空间的数据,加载隐私空间的界面,从而能够提高电子设备进行切换登录账号的成功率。Based on this possible implementation, the electronic device can load the desktop of the private space when the desktop of the private space is not running in the background of the electronic device, and then load the interface of the private space according to the data of the private space, thereby being able to The success rate of switching login accounts by electronic devices is improved.

结合第一方面,在一种可能的实现方式中,在电子设备根据第一数据,加载第一账号的桌面之后,上述电子设备登录账号的切换方法还可以包括:电子设备记录切换标记,切换标记用于指示第一账号的桌面在电子设备的后台运行。在电子设备显示第一账号的桌面之前,上述电子设备登录账号的切换方法还可以包括:电子设备根据切换标记,确定第一账号的桌面在电子设备的后台运行。With reference to the first aspect, in a possible implementation manner, after the electronic device loads the desktop of the first account according to the first data, the method for switching the login account of the electronic device may further include: the electronic device records the switching flag, the switching flag The desktop used to indicate the first account runs in the background of the electronic device. Before the electronic device displays the desktop of the first account, the method for switching the login account of the electronic device may further include: the electronic device determines that the desktop of the first account is running in the background of the electronic device according to the switch flag.

基于该可能的实现方式,电子设备可以在冷切到隐私空间时,电子设备可以记录切换标记,指示隐私空间的桌面在电子设备的后台运行,从而电子设备在下一次切换到隐私空间(即热切)时,电子设备可以根据切换标记,确定隐私空间的桌面在电子设备的后台运行。Based on this possible implementation, when the electronic device switches to the private space coldly, the electronic device can record the switching flag, indicating that the desktop of the private space runs in the background of the electronic device, so that the electronic device switches to the private space next time (that is, eager) At this time, the electronic device can determine that the desktop of the private space is running in the background of the electronic device according to the switching flag.

结合第一方面,在一种可能的实现方式中,第一账号为电子设备上的隐私空间对应的账号。With reference to the first aspect, in a possible implementation manner, the first account is an account corresponding to a private space on the electronic device.

基于该可能的实现方式,通过第一账号为电子设备上的隐私空间对应的账号,用户可以将隐私的数据存储在对应的空间中,从而与其他的数据隔离开,提高用户隐私数据的安全性。Based on this possible implementation, by using the first account as the account corresponding to the private space on the electronic device, the user can store private data in the corresponding space, thereby isolating it from other data and improving the security of the user's private data .

第二方面,本申请实施例提供一种电子设备登录账号的切换装置,该装置可以应用于电子设备,用于实现上述第一方面中的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,接收模块、获取模块、显示模块和加载模块等。In a second aspect, an embodiment of the present application provides an apparatus for switching a login account of an electronic device, and the apparatus can be applied to an electronic device to implement the method in the first aspect above. The functions of the device can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions, for example, a receiving module, an acquiring module, a display module, and a loading module.

其中,接收模块,可以用于接收用户的第一操作,第一操作用于触发从第二账号切换到第一账号,第二账号为所述电子设备当前登录的账号。Wherein, the receiving module may be configured to receive a first operation of the user, the first operation is used to trigger switching from the second account to the first account, and the second account is the account currently logged in by the electronic device.

获取模块,可以用于响应于第一操作,电子设备获取第二账号对应的活动。The obtaining module may be configured to, in response to the first operation, the electronic device obtain activities corresponding to the second account.

显示模块,可以用于在第二账号对应的活动中包括第二账号的桌面对应的活动,且第一账号的桌面在电子设备的后台运行的情况下,电子设备显示第一账号的桌面,第一账号的桌面是电子设备在接收用户的第一操作之前加载的。The display module can be used to include activities corresponding to the desktop of the second account in the activities corresponding to the second account, and when the desktop of the first account is running in the background of the electronic device, the electronic device displays the desktop of the first account, and the desktop of the second account is displayed on the electronic device. The desktop of an account is loaded by the electronic device before receiving the user's first operation.

加载模块,可以用于根据第一数据,加载第一账号对应的内容。The loading module can be used to load the content corresponding to the first account according to the first data.

显示模块,还可以用于在第一账号的桌面上显示第一账号对应的内容。The display module can also be used to display content corresponding to the first account on the desktop of the first account.

结合第二方面,在另一种可能的实现方式中,接收模块,还可以用于接收用户触发切换到第一账号的第二操作。加载模块,还可以用于响应于第二操作,电子设备根据第一数据,加载第一账号的桌面,并根据第一数据加载第一账号对应的内容。显示模块,还可以用于在第一账号的桌面上显示第一账号对应的内容。上述电子设备还可以包括存储模块。存储模块,可以用于存储加载的第一账号的桌面。With reference to the second aspect, in another possible implementation manner, the receiving module may also be configured to receive a second operation triggered by the user to switch to the first account. The loading module may also be configured to, in response to the second operation, load the desktop of the first account on the electronic device according to the first data, and load the content corresponding to the first account according to the first data. The display module can also be used to display content corresponding to the first account on the desktop of the first account. The above electronic device may further include a storage module. The storage module can be used to store the loaded desktop of the first account.

接收模块,还可以用于接收用户触发从第一账号切换到其他账号的第三操作。上述电子设备还可以包括切换模块。切换模块,可以用于响应于第三操作,将电子设备当前登录的账号从第一账号切换到其他账号。The receiving module may also be configured to receive a third operation triggered by the user to switch from the first account to another account. The above-mentioned electronic device may also include a switching module. The switching module may be configured to switch the account currently logged in by the electronic device from the first account to another account in response to the third operation.

结合第二方面,在另一种可能的实现方式中,上述电子设备还可以包括记录模块。记录模块,可以用于记录切换标记,切换标记用于指示第一账号的桌面在电子设备的后台运行。上述电子设备还可以包括确定模块。确定模块,可以用于根据切换标记,确定第一账号的桌面在电子设备的后台运行。With reference to the second aspect, in another possible implementation manner, the foregoing electronic device may further include a recording module. The recording module can be used to record the switching mark, and the switching mark is used to indicate that the desktop of the first account is running in the background of the electronic device. The above-mentioned electronic device may further include a determination module. The determination module can be configured to determine that the desktop of the first account is running in the background of the electronic device according to the switching flag.

结合第二方面,在另一种可能的实现方式中,第一账号为电子设备上的隐私空间对应的账号。With reference to the second aspect, in another possible implementation manner, the first account is an account corresponding to a private space on the electronic device.

第三方面,本申请实施例提供一种电子设备,包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的地理围栏的使用方法。In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, and a memory configured to store instructions executable by the processor. When the processor is configured to execute the above instructions, the electronic device implements the method for using a geo-fence as described in any one of the first aspect or possible implementation manners of the first aspect.

第四方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的地理围栏的使用方法。In a fourth aspect, the embodiment of the present application provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by the electronic device, the electronic device is made to implement the method for using the geofence described in any one of the first aspect or the possible implementation manners of the first aspect.

第五方面,本申请实施例提供一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的地理围栏的使用方法。In the fifth aspect, the embodiment of the present application provides a computer program product, including computer readable code, when the computer readable code is run in the electronic device, the electronic device realizes the possible functions of the first aspect or the first aspect. A method for using the geo-fence described in any one of the implementation manners.

应当理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It should be understood that, for the beneficial effects of the above-mentioned second aspect to the fifth aspect, reference may be made to relevant descriptions in the above-mentioned first aspect, and details are not repeated here.

附图说明Description of drawings

图1为本申请实施例提供的电子设备的显示界面示意图一;FIG. 1 is a first schematic diagram of a display interface of an electronic device provided by an embodiment of the present application;

图2为本申请实施例提供的电子设备登录账号切换示意图;FIG. 2 is a schematic diagram of electronic device login account switching provided by the embodiment of the present application;

图3为本申请实施例提供的电子设备的冷切过程示意图;Fig. 3 is the schematic diagram of the cold cutting process of the electronic equipment provided by the embodiment of the present application;

图4为本申请实施例提供的电子设备的热切过程示意图;FIG. 4 is a schematic diagram of an eager process of an electronic device provided by an embodiment of the present application;

图5为本申请实施例提供的电子设备的显示界面示意图二;FIG. 5 is a second schematic diagram of the display interface of the electronic device provided by the embodiment of the present application;

图6为本申请实施例提供的电子设备的显示界面示意图三;FIG. 6 is a third schematic diagram of the display interface of the electronic device provided by the embodiment of the present application;

图7为本申请实施例提供的一种电子设备的硬件结构示意图;FIG. 7 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application;

图8为本申请实施例提供的一种电子设备的软件结构示意图;FIG. 8 is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;

图9为本申请实施例提供的一种电子设备登录账号的切换方法示意图一;FIG. 9 is a first schematic diagram of a method for switching a login account of an electronic device provided by an embodiment of the present application;

图10为本申请实施例提供的一种电子设备登录账号的切换方法示意图二;FIG. 10 is a second schematic diagram of a method for switching login accounts of an electronic device provided in an embodiment of the present application;

图11为本申请实施例提供的电子设备的显示界面示意图四;FIG. 11 is a fourth schematic diagram of the display interface of the electronic device provided by the embodiment of the present application;

图12为本申请实施例提供的一种电子设备登录账号的切换装置的结构示意图。FIG. 12 is a schematic structural diagram of an apparatus for switching a login account of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。The terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the present application, unless otherwise specified, "plurality" means two or more.

目前,用户可以在手机上建立不同登录账号,不同的登录账号对应不同的存储空间。例如,用户可以在手机上建立登录账号1和登录账号2,手机可以将一般的数据和应用存在登录账号1对应的存储空间(该存储空间可以称为主空间,也可以称为普通空间),将隐私数据和应用存储在登录账号2对应的存储空间(如称为隐私空间),在手机通过登录账号2对应的密码或指纹进入该登录账号时,手机可以获取隐私空间中存储的隐私数据和应用,以呈现给用户。Currently, the user can create different login accounts on the mobile phone, and different login accounts correspond to different storage spaces. For example, a user can create a login account 1 and a login account 2 on the mobile phone, and the mobile phone can store general data and applications in the storage space corresponding to the login account 1 (the storage space can be called the main space or the common space), Store the private data and applications in the storage space corresponding to the login account 2 (for example, called the private space). When the mobile phone enters the login account through the password or fingerprint corresponding to the login account 2, the mobile phone can obtain the private data and applications stored in the private space. application to present to the user.

例如,如图1中的(a)所示,用户可以在手机上建立不同的登录账号,如登录账号1和登录账号2。手机的锁屏界面上可以显示建立的登录账号。登录账号1可以对应一普通空间,用于存储用户的一般数据和应用,即手机可以将用户的一般数据和应用存储在登录账号1对应的普通空间中。登录账号2可以对应一隐私空间,用于存储用户的隐私数据和应用,即手机可以将用户的隐私数据和应用存储在登录账号2对应的隐私空间中。For example, as shown in (a) in FIG. 1 , the user can create different login accounts, such as login account 1 and login account 2, on the mobile phone. The created login account can be displayed on the lock screen interface of the mobile phone. The login account 1 may correspond to a common space for storing the user's general data and applications, that is, the mobile phone may store the user's general data and applications in the common space corresponding to the login account 1. The login account 2 may correspond to a private space for storing the user's private data and applications, that is, the mobile phone may store the user's private data and applications in the private space corresponding to the login account 2.

用户可以在手机锁屏界面的指纹输入区域101上输入不同的指纹,从而进入登录账号1或登录账号2。如,用户可以通过在指纹输入区域101上输入左手拇指的指纹,以使得手机获取普通空间中存储的用户的一般数据和应用。即在用户输入的登录账号1对应的密码或指纹正确时,手机可以获取普通空间中存储的用户的一般数据和应用,进而手机可以显示如图1中的(b)所示的登录账号1对应的界面102供用户查看,登录账号1对应的界面101中可以显示用户的一般数据和应用。The user can input different fingerprints on the fingerprint input area 101 of the lock screen interface of the mobile phone to enter the login account 1 or login account 2 . For example, the user may input the fingerprint of the left thumb in the fingerprint input area 101, so that the mobile phone obtains the user's general data and applications stored in the common space. That is, when the password or fingerprint corresponding to the login account 1 entered by the user is correct, the mobile phone can obtain the user's general data and applications stored in the ordinary space, and then the mobile phone can display the corresponding login account 1 as shown in (b) in Figure 1. The interface 102 is for the user to view, and the interface 101 corresponding to the login account 1 can display the user's general data and applications.

又如,用户可以在指纹输入区域101上输入右手拇指的指纹,以使得手机获取隐私空间中存储的用户的隐私数据和应用。在用户输入的登录账号2对应的密码或指纹正确时,手机可以获取隐私空间中存储的用户的隐私数据和应用,进而手机可以显示如图1中的(c)所示的登录账号2对应的界面103供用户查看,登录账号2对应的界面103中可以显示用户的隐私数据和应用,该界面103也可以称为隐私空间对应的界面。在手机显示隐私空间对应的界面时,即手机切换到了隐私空间。As another example, the user may input the fingerprint of the right thumb in the fingerprint input area 101, so that the mobile phone obtains the user's private data and applications stored in the private space. When the password or fingerprint corresponding to the login account 2 input by the user is correct, the mobile phone can obtain the user's private data and applications stored in the private space, and then the mobile phone can display the password corresponding to the login account 2 as shown in (c) in Figure 1. The interface 103 is for the user to view. The interface 103 corresponding to the login account 2 can display the user's private data and applications. The interface 103 can also be called the interface corresponding to the private space. When the mobile phone displays the interface corresponding to the private space, the mobile phone is switched to the private space.

目前,手机切换不同的登录账号的过程可以包括冷切过程和热切过程。冷切,即在手机切换到某个登录账号之前,该登录账号的状态为停止状态,如该登录账号对应的桌面为停止状态,即该登录账号对应的桌面并没有在手机的后台运行。热切,即在手机切换到某个登录账号之前,该登录账号的状态为运行状态,如该登录账号对应的桌面在手机的后台运行。At present, the process of switching different login accounts on the mobile phone may include a cold switching process and an eager switching process. Cold cutting means that before the mobile phone is switched to a login account, the status of the login account is stopped. If the desktop corresponding to the login account is in the stopped state, that is, the desktop corresponding to the login account is not running in the background of the mobile phone. Eager, that is, before the mobile phone is switched to a certain login account, the status of the login account is running, for example, the desktop corresponding to the login account is running in the background of the mobile phone.

例如,结合图2所示,在手机上的登录账号1和登录账号2均为运行状态(如登录账号1可以在手机的前台运行,登录账号2可以在手机的后台运行)时,手机从登录账号1切换到登录账号2,或者从登录账号2切换到登录账号1,均可以称为热切。而在手机上的登录账号1为运行状态,登录账号2为停止状态时,手机从登录账号1切换到登录账号2,可以称为冷切,此时手机可以启动登录账号2,即登录账号2从停止状态变为运行状态。在手机上的登录账号1和登录账号2均为运行状态时,手机可以通过登录账号1退出登录账号2,即将登录账号2从运行状态变为停止状态。For example, as shown in Figure 2, when both the login account 1 and the login account 2 on the mobile phone are running (for example, the login account 1 can run in the foreground of the mobile phone, and the login account 2 can run in the background of the mobile phone), the mobile phone starts from the login Switching from account 1 to login account 2, or switching from login account 2 to login account 1, can be called eagerness. When the login account 1 on the mobile phone is in the running state and the login account 2 is in the stopped state, the mobile phone switches from the login account 1 to the login account 2, which can be called cold switching. At this time, the mobile phone can start the login account 2, that is, the login account 2 From stop state to run state. When the login account 1 and login account 2 on the mobile phone are both in the running state, the mobile phone can log out of the login account 2 through the login account 1, that is, the login account 2 will change from the running state to the stopped state.

例如,手机在开机之后,首次从普通空间对应的登录账号,切换到隐私空间对应的登录账号时,隐私空间对应的登录账号的状态为停止状态,如该隐私空间对应的登录账号的桌面并没有在手机的后台运行,该切换过程可以称为冷切过程。又如,手机在创建隐私空间对应的登录账号之后,首次从普通空间对应的登录账号,切换到隐私空间对应的登录账号时,隐私空间对应的登录账号的状态为停止状态,该隐私空间对应的登录账号的桌面并没有在手机的后台运行,该切换过程也可以称为冷切过程。For example, after the mobile phone is turned on, when the login account corresponding to the normal space is switched to the login account corresponding to the private space for the first time, the status of the login account corresponding to the private space is stopped. For example, the desktop of the login account corresponding to the private space does not have Running in the background of the mobile phone, this switching process can be called a cold cutting process. For another example, when the mobile phone switches from the login account corresponding to the normal space to the login account corresponding to the private space for the first time after creating the login account corresponding to the private space, the status of the login account corresponding to the private space is stopped, and the login account corresponding to the private space The desktop of the login account does not run in the background of the mobile phone, and this switching process can also be called a cold switching process.

在登录隐私空间对应的登录账号之后,从隐私空间对应的登录账号切换到普通空间对应的登录账号时,普通空间对应的登录账号的状态为运行状态,如该普通空间对应的登录账号的桌面在手机的后台运行,该切换过程可以称为热切过程。或者,手机再次从普通空间对应的登录账号切换到隐私空间对应的登录账号时,隐私空间对应的登录账号的状态为运行状态,该切换过程也可以称为热切过程。After logging in to the login account corresponding to the private space, when switching from the login account corresponding to the private space to the login account corresponding to the common space, the status of the login account corresponding to the normal space is running. The mobile phone runs in the background, and this switching process can be called an eager process. Alternatively, when the mobile phone is switched from the login account corresponding to the common space to the login account corresponding to the private space again, the state of the login account corresponding to the private space is running, and this switching process may also be called an eager process.

例如,结合图3所示,现有技术中冷切过程可以包括以下步骤:For example, as shown in Figure 3, the cold cutting process in the prior art may include the following steps:

在用户触发手机切换到隐私空间,并输入用户凭证(如指纹或密码)后,手机中的锁屏服务可以确定用户凭据(如指纹或密码)是否认证通过。在锁屏服务确定用户凭据认证通过时,手机可以获取隐私空间对应的数据,并加载切换后的登录账号对应的界面,即加载隐私空间对应的界面。After the user triggers the mobile phone to switch to the private space and enters user credentials (such as fingerprints or passwords), the lock screen service in the mobile phone can determine whether the user credentials (such as fingerprints or passwords) are authenticated. When the lock screen service determines that the user credentials are authenticated, the mobile phone may obtain data corresponding to the private space, and load an interface corresponding to the switched login account, that is, load an interface corresponding to the private space.

在锁屏服务确定用户凭据认证通过时,锁屏服务可以启动隐私空间切换线程,用于启动用户控制器。When the lock screen service determines that the user credential authentication is passed, the lock screen service may start a privacy space switching thread for starting the user controller.

在用户控制器启动之后,用户控制器可以拉起切换服务,用于获取隐私空间的数据,如隐私空间的系统配置,如获取隐私空间的主题、桌面以及壁纸等配置。即用户控制器可以获取隐私空间对应的数据,如隐私空间对应的主题、桌面以及壁纸等数据。在用户控制器获取到隐私空间对应的数据之后,用户控制器还可以向手机上的其他系统服务(如窗口管理器、用户管理服务、系统服务管理器、桌面服务、活动任务管理服务器服务以及存储管理服务器服务等)发送隐私空间的系统配置。After the user controller is started, the user controller can pull up the switching service to obtain the data of the private space, such as the system configuration of the private space, such as obtaining the configuration of the theme, desktop and wallpaper of the private space. That is, the user controller can obtain data corresponding to the private space, such as data corresponding to the theme, desktop, and wallpaper of the private space. After the user controller obtains the data corresponding to the privacy space, the user controller can also provide other system services (such as window manager, user management service, system service manager, desktop service, activity task management server service and storage) on the mobile phone. management server service, etc.) to send the system configuration of PrivacySpace.

在其他系统服务接收到用户控制器发送的隐私空间的系统配置之后,其他系统服务可以根据隐私空间的系统配置进行配置。例如,在其他系统服务为桌面服务时,桌面服务接收到用户控制器发送的隐私空间的系统配置之后,桌面服务可以根据隐私空间的系统配置包括的桌面数据,对隐私空间对应的桌面进行配置。After other system services receive the system configuration of the privacy space sent by the user controller, other system services may be configured according to the system configuration of the privacy space. For example, when the other system service is a desktop service, after the desktop service receives the system configuration of the private space sent by the user controller, the desktop service may configure the desktop corresponding to the private space according to the desktop data included in the system configuration of the private space.

在用户控制器向手机上的其他系统服务发送隐私空间的系统配置之后,用户控制器还可以将普通空间对应的桌面切换到后台运行,并启动桌面进程,从而可以拉起隐私空间对应的桌面。即用户控制器可以将普通空间对应的桌面切换到后台,并启动隐私空间对应的桌面。After the user controller sends the system configuration of the private space to other system services on the mobile phone, the user controller can also switch the desktop corresponding to the common space to run in the background, and start the desktop process, so that the desktop corresponding to the private space can be pulled up. That is, the user controller can switch the desktop corresponding to the common space to the background, and start the desktop corresponding to the private space.

在用户控制器将普通空间对应的桌面切换到后台,并启动隐私空间对应的桌面之后,用户控制器可以向手机上的其他系统服务发送启动隐私空间消息。After the user controller switches the desktop corresponding to the common space to the background and starts the desktop corresponding to the private space, the user controller can send a message of starting the private space to other system services on the mobile phone.

在其他系统服务接收到用户控制器发送的启动隐私空间消息之后,其他系统服务可以根据用户控制器发送的隐私空间的系统配置进行相应的配置。其他系统服务可以通过遍历所有其他系统服务回调,来确定所有其他系统服务根据隐私空间的系统配置进行配置是否完成。由于冷切过程中,隐私空间对应的登录账号的并没有在手机的后台运行,因此,需要先启动隐私空间的系统配置,即其他系统服务需要先根据用户控制器发送的隐私空间的系统配置进行相应的配置。After other system services receive the private space start message sent by the user controller, other system services may perform corresponding configurations according to the system configuration of the private space sent by the user controller. Other system services can determine whether all other system services are configured according to the system configuration of the privacy space by traversing all other system service callbacks. Since the login account corresponding to the private space does not run in the background of the mobile phone during the cold cutting process, the system configuration of the private space needs to be started first, that is, other system services need to be performed according to the system configuration of the private space sent by the user controller corresponding configuration.

在其他系统服务根据隐私空间的系统配置进行配置完成之后,用户控制器还可以向其他系统服务发送切换隐私空间消息,用于将隐私空间对应的系统配置调用到前台。其他系统服务可以通过遍历所有其他系统服务回调,来确定所有其他系统服务将隐私空间对应的系统配置调用到前台是否完成。After other system services are configured according to the system configuration of the private space, the user controller may also send a message of switching the private space to other system services, so as to call the system configuration corresponding to the private space to the foreground. Other system services can determine whether all other system services call the system configuration corresponding to the privacy space to the foreground by traversing all other system service callbacks.

在其他系统服务将隐私空间对应的系统配置调用到前台完成之后,用户控制器还可以向壁纸服务发送切换壁纸消息,用于切换壁纸,并加载壁纸,即将普通空间对应的壁纸切换到后台,并加载隐私空间的对应的壁纸。After other system services call the system configuration corresponding to the private space to the foreground, the user controller can also send a wallpaper switching message to the wallpaper service to switch the wallpaper and load the wallpaper, that is, switch the wallpaper corresponding to the normal space to the background, and Load the corresponding wallpaper of the PrivateSpace.

在其他系统服务将隐私空间的系统配置调用到前台完成之后,用户控制器还可以向其他系统服务发送屏幕解冻消息,用于解冻屏幕。其他系统服务可以通过遍历所有观察者回调,来确定所有其他系统服务将隐私空间的系统配置调用到前台是否完成。即每一个隐私空间的系统配置对应一个观察者,通过观察者的回调可以确定该隐私空间的系统配置是否调用到前台完成。After other system services call the system configuration of the private space to the foreground, the user controller can also send a screen unfreezing message to other system services for unfreezing the screen. Other system services can determine whether all other system services call the system configuration of the private space to the foreground by traversing all observer callbacks. That is, the system configuration of each private space corresponds to an observer, and the callback of the observer can determine whether the system configuration of the private space is called to the foreground to complete.

在其他系统服务将屏幕解冻完成之后,用户控制器还可以向锁屏服务发送隐私空间切换完成消息。在锁屏服务接收到用户控制器发送的隐私空间切换完成消息之后,锁屏服务可以退出锁屏,从而手机可以显示隐私空间对应的界面。After other system services complete unfreezing the screen, the user controller may also send a private space switching completion message to the lock screen service. After the screen lock service receives the private space switching completion message sent by the user controller, the screen lock service may exit the screen lock, so that the mobile phone may display an interface corresponding to the private space.

又如,结合图4所示,现有技术中热切过程可以包括以下步骤:As another example, as shown in FIG. 4, the eager process in the prior art may include the following steps:

在用户触发手机切换到隐私空间,并输入用户凭证(如指纹或密码)后,手机中的锁屏服务可以确定用户凭据是否认证通过。在锁屏服务确定用户凭据认证通过时,手机可以获取隐私空间对应的数据,并加载切换后的登录账号对应的界面,即加载隐私空间对应的界面。After the user triggers the mobile phone to switch to the private space and enters user credentials (such as fingerprints or passwords), the lock screen service in the mobile phone can determine whether the user credentials are authenticated. When the lock screen service determines that the user credentials are authenticated, the mobile phone may obtain data corresponding to the private space, and load an interface corresponding to the switched login account, that is, load an interface corresponding to the private space.

在锁屏服务确定用户凭据认证通过时,锁屏服务可以启动隐私空间切换线程,用于启动用户控制器。When the lock screen service determines that the user credential authentication is passed, the lock screen service may start a privacy space switching thread for starting the user controller.

在用户控制器启动之后,用户控制器可以拉起切换服务,用于获取隐私空间的系统配置,如获取隐私空间的主题、桌面以及壁纸等配置。即用户控制器可以获取隐私空间对应的数据,如隐私空间对应的主题、桌面以及壁纸等数据。在用户控制器获取到隐私空间对应的数据之后,用户控制器还可以向手机上的其他系统服务发送隐私空间的系统配置。After the user controller is started, the user controller can pull up the switching service for obtaining the system configuration of the private space, such as obtaining configurations such as theme, desktop and wallpaper of the private space. That is, the user controller can obtain data corresponding to the private space, such as data corresponding to the theme, desktop, and wallpaper of the private space. After the user controller acquires the data corresponding to the private space, the user controller can also send the system configuration of the private space to other system services on the mobile phone.

在其他系统服务接收到用户控制器发送的隐私空间的系统配置之后,其他系统服务可以根据隐私空间的系统配置进行配置。After other system services receive the system configuration of the privacy space sent by the user controller, other system services may be configured according to the system configuration of the privacy space.

在用户控制器向手机上的其他系统服务发送隐私空间的系统配置之后,用户控制器还可以将普通空间对应的桌面切换到后台运行,并启动桌面进程,从而可以拉起隐私空间对应的桌面。即用户控制器可以将普通空间对应的桌面切换到后台,并启动隐私空间对应的桌面。After the user controller sends the system configuration of the private space to other system services on the mobile phone, the user controller can also switch the desktop corresponding to the common space to run in the background, and start the desktop process, so that the desktop corresponding to the private space can be pulled up. That is, the user controller can switch the desktop corresponding to the common space to the background, and start the desktop corresponding to the private space.

在用户控制器将普通空间对应的桌面切换到后台,并启动隐私空间对应的桌面之后,用户控制器可以向手机上的其他系统服务发送切换隐私空间消息,用于将隐私空间对应的系统配置调用到前台。由于热切过程中,隐私空间对应的登录账号在手机的后台运行,因此,不需要启动隐私空间的系统配置,只需将隐私空间的系统配置切换到前台。其他系统服务可以通过遍历所有其他系统服务回调,来确定所有其他系统服务将隐私空间对应的系统配置调用到前台是否完成。After the user controller switches the desktop corresponding to the normal space to the background and starts the desktop corresponding to the private space, the user controller can send a message of switching the private space to other system services on the mobile phone, which is used to call the system configuration corresponding to the private space to the front desk. Since the login account corresponding to the PrivateSpace runs in the background of the mobile phone during the eager process, there is no need to start the system configuration of the PrivateSpace, and only need to switch the system configuration of the PrivateSpace to the foreground. Other system services can determine whether all other system services call the system configuration corresponding to the privacy space to the foreground by traversing all other system service callbacks.

在其他系统服务将隐私空间的系统配置切换到前台完成之后,用户控制器还可以向壁纸服务发送切换壁纸消息,用于切换壁纸,并加载壁纸,即将普通空间对应的壁纸切换到后台,并加载隐私空间的对应的壁纸。After other system services have switched the system configuration of the private space to the foreground, the user controller can also send a switch wallpaper message to the wallpaper service to switch the wallpaper and load the wallpaper, that is, to switch the wallpaper corresponding to the normal space to the background and load it. Corresponding wallpapers for PrivateSpace.

在其他系统服务将隐私空间的系统配置调用到前台之后,用户控制器还可以向其他系统服务发送屏幕解冻消息,用于解冻屏幕。其他系统服务可以通过遍历所有观察者回调,来确定所有其他系统服务将隐私空间的系统配置调用到前台是否完成。即每一个隐私空间的系统配置对应一个观察者,通过观察者的回调可以确定该隐私空间的系统配置是否调用到前台完成。After other system services call the system configuration of the private space to the foreground, the user controller can also send a screen unfreezing message to other system services for unfreezing the screen. Other system services can determine whether all other system services call the system configuration of the private space to the foreground by traversing all observer callbacks. That is, the system configuration of each private space corresponds to an observer, and the callback of the observer can determine whether the system configuration of the private space is called to the foreground to complete.

在其他系统服务将屏幕解冻完成之后,用户控制器还可以向锁屏服务发送隐私空间切换完成消息。在锁屏服务接收到用户控制器发送的隐私空间切换完成消息之后,锁屏服务可以退出锁屏,从而手机可以显示隐私空间对应的界面。After other system services complete unfreezing the screen, the user controller may also send a private space switching completion message to the lock screen service. After the screen lock service receives the private space switching completion message sent by the user controller, the screen lock service may exit the screen lock, so that the mobile phone may display an interface corresponding to the private space.

由此可知,现有技术中在手机冷切或者热切到隐私空间时,手机均需要启动隐私空间对应的桌面。也就是说,即使隐私空间对应的桌面在手机的后台运行,手机也需要重新加载隐私空间对应的桌面。在手机重新加载隐私空间对应的桌面后,隐私空间对应的桌面上的应用程序图标均需要再次加载,且隐私空间对应的桌面上的应用程序图标的加载过程是异步过程,即应用程序图标是逐个加载。此外,在手机重新加载隐私空间对应的桌面后,隐私空间对应的壁纸也需要重新绘制,在壁纸绘制时,手机显示的是黑屏。It can be seen that, in the prior art, when the mobile phone is cold or eagerly switched to the private space, the mobile phone needs to start the desktop corresponding to the private space. That is to say, even if the desktop corresponding to the private space is running in the background of the mobile phone, the mobile phone also needs to reload the desktop corresponding to the private space. After the mobile phone reloads the desktop corresponding to the private space, the application icons on the desktop corresponding to the private space need to be loaded again, and the loading process of the application icons on the desktop corresponding to the private space is an asynchronous process, that is, the application icons are one by one load. In addition, after the mobile phone reloads the desktop corresponding to the private space, the wallpaper corresponding to the private space also needs to be redrawn. When the wallpaper is drawn, the mobile phone displays a black screen.

例如,以用户在手机上建立不同的登录账号,如登录账号1和登录账号2,手机的锁屏界面上显示建立的登录账号为例。登录账号1对应一普通空间,用于存储用户的一般数据和应用。登录账号2对应一隐私空间,用于存储用户的隐私数据和应用。For example, take a case where a user establishes different login accounts on a mobile phone, such as login account 1 and login account 2, and the created login accounts are displayed on the lock screen interface of the mobile phone as an example. Login account 1 corresponds to a common space, which is used to store the user's general data and applications. The login account 2 corresponds to a private space, which is used to store the user's private data and applications.

结合图5中的(a)所示,用户可以在手机锁屏界面的指纹输入区域上输入登录账号2对应的指纹。在用户输入的登录账号2对应的指纹正确时,手机可以获取隐私空间中存储的用户的隐私数据和应用,如隐私空间的系统配置。手机可以重新启动隐私空间对应的桌面。As shown in (a) in FIG. 5 , the user can input the fingerprint corresponding to the login account 2 on the fingerprint input area of the lock screen interface of the mobile phone. When the fingerprint corresponding to the login account 2 input by the user is correct, the mobile phone can obtain the user's private data and applications stored in the private space, such as the system configuration of the private space. The mobile phone can restart the desktop corresponding to the private space.

在手机重新启动隐私空间对应的桌面后,手机隐私空间对应的壁纸需要重新绘制。在手机绘制壁纸的过程中,如图5中的(b)所示,手机显示黑屏。在手机重新启动隐私空间对应的桌面后,隐私空间对应的桌面上的应用程序图标逐个加载。即,如图5中的(c)所示,手机会在隐私空间对应的桌面上先加载一个应用程序图标。After the mobile phone restarts the desktop corresponding to the private space, the wallpaper corresponding to the private space of the mobile phone needs to be redrawn. During the process of the mobile phone drawing the wallpaper, as shown in (b) in FIG. 5 , the mobile phone displays a black screen. After the mobile phone restarts the desktop corresponding to the private space, the application icons on the desktop corresponding to the private space are loaded one by one. That is, as shown in (c) in FIG. 5 , the mobile phone will first load an application program icon on the desktop corresponding to the privacy space.

之后,如图5中的(d)所示,手机会在隐私空间对应的桌面上再加载一个应用程序图标,直到隐私空间对应的桌面上的所有应用程序图标加载完成,手机显示隐私空间对应的界面,此时手机切换到了隐私空间。Afterwards, as shown in (d) in Figure 5, the mobile phone will load another application program icon on the desktop corresponding to the private space until all application program icons on the desktop corresponding to the private space are loaded, and the mobile phone displays the corresponding program icon of the private space. interface, the phone switches to the privacy space.

可见,现有技术中在手机冷切或者热切到隐私空间时,即使隐私空间对应的桌面在手机的后台运行,手机也需要重新加载隐私空间对应的桌面,导致隐私空间对应的桌面上的应用程序图标需要重新加载,而隐私空间对应的桌面上的应用程序图标重新加载时是逐个加载,这就导致应用程序图标加载较慢,从而导致手机切换隐私空间的时间较长,手机切换隐私空间的效率较低,用户体验较差。It can be seen that in the prior art, when the mobile phone is cold or eager to the private space, even if the desktop corresponding to the private space is running in the background of the mobile phone, the mobile phone needs to reload the desktop corresponding to the private space, resulting in the application program on the desktop corresponding to the private space Icons need to be reloaded, and the application icons on the desktop corresponding to the private space are reloaded one by one, which leads to slow loading of application icons, which leads to a long time for the mobile phone to switch to the private space, and the efficiency of the mobile phone to switch to the private space Lower, poorer user experience.

此外,由于手机需要重新加载隐私空间对应的桌面,隐私空间对应的壁纸也需要重新绘制,在壁纸绘制时,手机显示的是黑屏。而壁纸绘制通常需要较长的时间,在壁纸绘制时,手机一直显示的是黑屏,导致手机切换隐私空间的时间较长,进而手机切换隐私空间的效率较低,用户体验较差。In addition, since the mobile phone needs to reload the desktop corresponding to the private space, the wallpaper corresponding to the private space also needs to be redrawn. When the wallpaper is drawn, the mobile phone displays a black screen. However, it usually takes a long time to draw the wallpaper. When the wallpaper is drawn, the mobile phone always displays a black screen, which leads to a long time for the mobile phone to switch the privacy space, and then the efficiency of switching the privacy space of the mobile phone is low, and the user experience is poor.

相关技术中,可以将隐私空间的主题设置为默认的主题,例如,将隐私空间对应的桌面设置为默认的桌面,将隐私空间的壁纸设置为默认壁纸,从而在手机热切的过程中,手机可以避免隐私空间对应的桌面上的应用程序图标逐个加载,以及避免壁纸重新绘制,从而避免手机显示黑屏。In related technologies, the theme of the private space can be set as the default theme, for example, the desktop corresponding to the private space is set as the default desktop, and the wallpaper of the private space is set as the default wallpaper, so that when the mobile phone is eager, the mobile phone can Avoid loading application icons on the desktop corresponding to the private space one by one, and avoid redrawing the wallpaper, thereby preventing the mobile phone from displaying a black screen.

例如,结合图6中的(a)所示,手机的界面上可以包括切换分身应用的图标601。如,用户在手机上已经建立了登录账号1和登录账号2,登录账号1对应一普通空间,登录账号2对应一隐私空间时,用户可以点击切换分身应用的图标601。For example, as shown in (a) of FIG. 6 , the interface of the mobile phone may include an icon 601 for switching the avatar application. For example, the user has created a login account 1 and a login account 2 on the mobile phone. When the login account 1 corresponds to a common space and the login account 2 corresponds to a private space, the user can click the icon 601 to switch the avatar application.

之后,如图6中的(b)所示,手机可以显示锁屏界面,用户可以在锁屏界面上输入登录账号2对应密码或指纹。在用户输入的登录账号2对应的指纹正确时,手机可以获取隐私空间中存储的用户的隐私数据和应用。手机可以将隐私空间对应的默认桌面切换到前台以及将隐私空间对应的默认壁纸切换到前台,并显示隐私数据和应用。之后,如图6中的(c)所示,手机可以显示隐私空间对应的界面,此时手机切换到了隐私空间。Afterwards, as shown in (b) in FIG. 6 , the mobile phone can display a lock screen interface, and the user can enter the password or fingerprint corresponding to the login account 2 on the lock screen interface. When the fingerprint corresponding to the login account 2 input by the user is correct, the mobile phone can obtain the user's private data and applications stored in the private space. The mobile phone can switch the default desktop corresponding to the private space to the foreground and the default wallpaper corresponding to the private space to the foreground, and display private data and applications. Afterwards, as shown in (c) in FIG. 6 , the mobile phone may display an interface corresponding to the private space, and at this time, the mobile phone switches to the private space.

虽然该相关技术中在手机热切到隐私空间时,并没有重新逐个加载隐私空间对应的桌面上的应用程序图标,也没有显示黑屏。但是,该相关技术中,隐私空间的主题为默认的主题,用户不能改变隐私空间的主题,如用户不能将隐私空间对应的桌面设置为其他的桌面,或者用户不能将隐私空间的壁纸设置为其他的壁纸,这导致用户的体验较低。因此,该相关技术并未很好的解决切换隐私空间的时间较长、且切换过程中手机显示黑屏的问题。Although in this related technology, when the mobile phone eagerly enters the private space, the application icons on the desktop corresponding to the private space are not reloaded one by one, and a black screen is not displayed. However, in this related technology, the theme of the private space is the default theme, and the user cannot change the theme of the private space, such as the user cannot set the desktop corresponding to the private space to other desktops, or the user cannot set the wallpaper of the private space to other desktops. wallpaper, which results in a poor user experience. Therefore, this related technology does not well solve the problem that it takes a long time to switch the privacy space and the mobile phone displays a black screen during the switching process.

针对上述问题,本申请实施例提供一种电子设备登录账号的切换方法,应用于电子设备。在电子设备热切到隐私空间时,电子设备可以不重新加载隐私空间对应的桌面,而是将隐私空间对应的桌面从后台切换到前台,从而隐私空间对应的桌面上的应用程序图标不需要重新加载以及隐私空间的壁纸也不需要重新绘制,从而可以避免逐个加载隐私空间对应的桌面上的应用程序图标,以及避免手机显示黑屏,进而可以缩短手机切换隐私空间的时间,提高切换隐私空间的效率,提高用户体验。此外,由于电子设备不重新加载隐私空间对应的桌面,而是将隐私空间对应的桌面从后台切换到前台,因此,该隐私空间对应的桌面可以是用户设置的桌面,并不是固定的桌面,从而能够提高用户体验。In view of the above problems, an embodiment of the present application provides a method for switching a login account of an electronic device, which is applied to an electronic device. When the electronic device eagerly enters the private space, the electronic device may not reload the desktop corresponding to the private space, but switch the desktop corresponding to the private space from the background to the foreground, so that the application icon on the desktop corresponding to the private space does not need to be reloaded And the wallpaper of the private space does not need to be redrawn, so that it can avoid loading the application icons on the desktop corresponding to the private space one by one, and prevent the mobile phone from displaying a black screen, thereby shortening the time for the mobile phone to switch the private space and improving the efficiency of switching the private space. Improve user experience. In addition, because the electronic device does not reload the desktop corresponding to the private space, but switches the desktop corresponding to the private space from the background to the foreground, therefore, the desktop corresponding to the private space may be a desktop set by the user, not a fixed desktop, thus Can improve user experience.

下面对本申请实施例提供的电子设备登录账号的切换方法进行描述。The method for switching the login account of the electronic device provided by the embodiment of the present application is described below.

本申请实施例提供的电子设备登录账号的切换方法可以应用于电子设备。在一些实施例中,上述电子设备可以是手机、平板电脑、手持计算机,个人计算机(personalcomputer,PC),蜂窝电话,个人数字助理(personal digital assistant,PDA),可穿戴式设备等具有NFC功能的电子设备。本申请实施例在此对电子设备的具体形态不做限制。The method for switching the login account of the electronic device provided in the embodiment of the present application may be applied to the electronic device. In some embodiments, the above-mentioned electronic device may be a mobile phone, a tablet computer, a handheld computer, a personal computer (personal computer, PC), a cellular phone, a personal digital assistant (personal digital assistant, PDA), a wearable device, etc. with NFC function Electronic equipment. The embodiment of the present application does not limit the specific form of the electronic device.

示例地,以电子设备为手机为例,图7示出了本申请实施例提供的一种电子设备的结构示意图。Exemplarily, taking the electronic device as a mobile phone as an example, FIG. 7 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.

如图7所示,电子设备可以包括处理器710,外部存储器接口720,内部存储器721,通用串行总线(universal serial bus,USB)接口730,充电管理模块740,电源管理模块741,电池742,天线1,天线2,移动通信模块750,无线通信模块760,音频模块770,扬声器770A,受话器770B,麦克风770C,耳机接口770D,传感器模块780,按键790,马达791,指示器792,摄像头793,显示屏794,以及用户标识模块(subscriber identification module,SIM)卡接口795等。其中,传感器模块780可以包括压力传感器780A,陀螺仪传感器780B,气压传感器780C,磁传感器780D,加速度传感器780E,距离传感器780F,接近光传感器780G,指纹传感器780H,温度传感器780J,触摸传感器780K,环境光传感器780L,骨传导传感器780M等。As shown in FIG. 7, the electronic device may include a processor 710, an external memory interface 720, an internal memory 721, a universal serial bus (universal serial bus, USB) interface 730, a charging management module 740, a power management module 741, a battery 742, Antenna 1, antenna 2, mobile communication module 750, wireless communication module 760, audio module 770, speaker 770A, receiver 770B, microphone 770C, earphone jack 770D, sensor module 780, button 790, motor 791, indicator 792, camera 793, A display screen 794, a subscriber identification module (subscriber identification module, SIM) card interface 795, and the like. Among them, the sensor module 780 may include a pressure sensor 780A, a gyroscope sensor 780B, an air pressure sensor 780C, a magnetic sensor 780D, an acceleration sensor 780E, a distance sensor 780F, a proximity light sensor 780G, a fingerprint sensor 780H, a temperature sensor 780J, a touch sensor 780K, an environment Light sensor 780L, bone conduction sensor 780M, etc.

可以理解的是,本实施例示意的结构并不构成对电子设备的具体限定。在另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It should be understood that the structure shown in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, 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.

处理器710可以包括一个或多个处理单元,例如:处理器710可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 710 may include one or more processing units, for example: the processor 710 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.

控制器可以是电子设备的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。A controller can be the nerve center and command center of an electronic device. 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.

处理器710中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器710中的存储器为高速缓冲存储器。该存储器可以保存处理器710刚用过或循环使用的指令或数据。如果处理器710需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器710的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 710 for storing instructions and data. In some embodiments, the memory in processor 710 is a cache memory. The memory may hold instructions or data that the processor 710 has just used or recycled. If the processor 710 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 the processor 710 is reduced, thus improving the efficiency of the system.

在一些实施例中,处理器710可以包括一个或多个接口。接口可以包括集成电路(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 710 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.

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

显示屏794用于显示图像,视频等。显示屏794包括显示面板。显示面板可以采用液晶显示屏(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)等。在一些实施例中,电子设备可以包括1个或N个显示屏794,N为大于1的正整数。The display screen 794 is used to display images, videos and the like. Display 794 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 may include 1 or N display screens 794, where N is a positive integer greater than 1.

本申请实施例中,显示屏794可用于显示电子设备的界面。In the embodiment of the present application, the display screen 794 may be used to display the interface of the electronic device.

电子设备可以通过ISP,摄像头793,视频编解码器,GPU,显示屏794以及应用处理器等实现拍摄功能。在一些实施例中,电子设备可以包括1个或N个摄像头793,N为大于1的正整数。The electronic device can realize the shooting function through ISP, camera 793 , video codec, GPU, display screen 794 and application processor. In some embodiments, the electronic device may include 1 or N cameras 793, where N is a positive integer greater than 1.

当然,可以理解的,上述图7所示仅仅为电子设备的形态为手机时的示例性说明。若电子设备是平板电脑,手持计算机,PC,PDA,可穿戴式设备(如:智能手表、智能手环)等其他设备形态时,电子设备的结构中可以包括比图6中所示更少的结构,也可以包括比图7中所示更多的结构,在此不作限制。Of course, it can be understood that the above FIG. 7 is only an exemplary description when the form of the electronic device is a mobile phone. If the electronic device is in the form of a tablet computer, a handheld computer, a PC, a PDA, a wearable device (such as a smart watch, a smart bracelet), etc., the structure of the electronic device may include fewer The structure may also include more structures than those shown in FIG. 7, which is not limited here.

电子设备的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备的软件结构。The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In this embodiment of the present application, the Android system with layered architecture is taken as an example to illustrate the software structure of the electronic device.

图8是本申请实施例的电子设备的软件结构框图。FIG. 8 is a block diagram of a software structure of an electronic device according to an embodiment of the present application.

分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.

应用程序层可以包括一系列应用程序包。如图8所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。The application layer can consist of a series of application packages. As shown in FIG. 8, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

如图8所示,应用程序框架层可以包括系统服务,如窗口管理器,锁屏服务,用户控制器,活动任务管理服务,活动线程,硬件主题管理器,壁纸服务以及桌面服务。As shown in Figure 8, the application framework layer may include system services such as window manager, lock screen service, user controller, active task management service, active thread, hardware theme manager, wallpaper service, and desktop service.

窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.

锁屏服务,可以用于对用户输入的凭据(如指纹或密码)进行验证。在用户输入的凭据验证通过时,锁屏服务启动隐私空间切换线程,即启动用户控制器。The lock screen service can be used to verify the credentials (such as fingerprint or password) entered by the user. When the credentials input by the user are verified, the lock screen service starts the private space switching thread, that is, starts the user controller.

用户控制器,可以用于获取隐私空间的系统配置,用户控制器可以为电子设备中的UserController。用户控制器,还可以用于向电子设备上的所有其他系统服务发送隐私空间的系统配置。用户控制器,还可以用将普通空间的桌面切换到后台,并将隐私空间对应的桌面切换到前台。用户控制器,还可以用于向电子设备上的所有其他系统服务发送切换隐私空间消息。用户控制器,还可以用于向壁纸服务发送切换隐私空间消息。用户控制器,还可以用于向锁屏服务发送隐私空间切换完成消息。The user controller can be used to obtain the system configuration of the privacy space, and the user controller can be the UserController in the electronic device. The user controller can also be used to send the system configuration of the private space to all other system services on the electronic device. The user controller can also be used to switch the desktop of the common space to the background, and switch the desktop corresponding to the private space to the foreground. The user controller can also be used to send switching privacy space messages to all other system services on the electronic device. The user controller can also be used to send a switch private space message to the wallpaper service. The user controller can also be used to send a private space switching completion message to the lock screen service.

活动任务管理服务,可以用于获取当前登录账号对应的活动堆栈,活动任务管理服务可以为电子设备中的ActivityTaskManagerService。活动任务管理服务,还可以用于在当前登录账号对应的活动堆栈不为空的情况下,确定活动堆栈中的活动的配置是否需要更改。活动任务管理服务,还可以用于在确定活动堆栈中的活动的配置需要更改的情况下,确定该活动是否为桌面对应的活动,并确定隐私空间对应的桌面是否在电子设备的后台运行。活动任务管理服务,还可以用于在活动为桌面对应的活动,且切换后的登录账号的桌面在电子设备的后台运行情况下,通知用户控制器,从而用户控制器可以将普通空间的桌面切换到后台,并将隐私空间对应的桌面切换到前台。The activity task management service can be used to obtain the activity stack corresponding to the current login account, and the activity task management service can be the ActivityTaskManagerService in the electronic device. The activity task management service can also be used to determine whether the activity configuration in the activity stack needs to be changed when the activity stack corresponding to the current login account is not empty. The activity task management service can also be used to determine whether the activity is an activity corresponding to the desktop when it is determined that the configuration of the activity in the activity stack needs to be changed, and determine whether the desktop corresponding to the private space is running in the background of the electronic device. The activity task management service can also be used to notify the user controller when the activity is the activity corresponding to the desktop, and the desktop of the switched login account is running in the background of the electronic device, so that the user controller can switch the desktop of the ordinary space Go to the background, and switch the desktop corresponding to the private space to the foreground.

活动线程,可以用于重启隐私空间包括的活动,活动线程可以为电子设备中的ActivityThread。The activity thread can be used to restart activities included in the privacy space, and the activity thread can be an ActivityThread in the electronic device.

硬件主题管理器,可以用于记录切换标记,切换标记用于指示隐私空间对应的桌面是否在电子设备的后台运行,硬件主题管理器可以为电子设备中的HwThemeManager。The hardware theme manager can be used to record a switching flag, and the switching flag is used to indicate whether the desktop corresponding to the private space is running in the background of the electronic device, and the hardware theme manager can be HwThemeManager in the electronic device.

壁纸服务,可以用于可以启动壁纸服务,并加载渲染引擎。壁纸模块,还可以用于启动壁纸绘制,进行壁纸的绘制。The wallpaper service can be used to start the wallpaper service and load the rendering engine. The wallpaper module can also be used to start wallpaper drawing and draw wallpaper.

桌面服务,可以用于启动桌面服务,并加载桌面热区图标。桌面模块,还可以用于加载桌面窗口图标以及加载桌面天气时钟。The desktop service can be used to start the desktop service and load the desktop hotspot icon. The desktop module can also be used to load the desktop window icon and load the desktop weather clock.

应用程序框架层还可以包括内容提供器,视图系统,电话管理器,资源管理器、用户管理服务、系统管理服务以及通知管理器等。The application framework layer can also include content providers, view systems, phone managers, resource managers, user management services, system management services, and notification managers.

内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.

视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.

电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of electronic devices. For example, the management of call status (including connected, hung up, etc.).

资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.

通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.

Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.

表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.

2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.

内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.

以下实施例中的方法均可以在具有上述硬件结构或软件结构的电子设备中实现。The methods in the following embodiments can all be implemented in an electronic device having the above-mentioned hardware structure or software structure.

图9为本申请实施例提供的一种电子设备登录账号的切换方法的流程示意图。如图9所示,该电子设备登录账号的切换方法可以包括:FIG. 9 is a schematic flowchart of a method for switching login accounts of an electronic device provided in an embodiment of the present application. As shown in FIG. 9, the method for switching the login account of the electronic device may include:

S901、电子设备确定是否接收到用户用于触发切换隐私空间的操作。S901. The electronic device determines whether a user's operation for triggering switching of a private space is received.

用户可以在电子设备上建立不同的登录账号,不同的登录账号(也可以称为简称为账号)对应不同的存储空间。用户可以将一般数据存储在一个登录账号对应的存储空间(该存储空间可以成为普通空间,也可以称为主空间),该登录账号可以称为第二账号,第二账号可以为电子设备当前登录的账号。而将隐私数据存储在另一个登录账号对应的存储空间(该存储空间可以成为隐私空间),该登录账号可以称为第一登录账号,从而将用户的隐私数据与一般的数据隔离开。The user may establish different login accounts on the electronic device, and different login accounts (also referred to as accounts for short) correspond to different storage spaces. The user can store general data in a storage space corresponding to a login account (the storage space can be called a common space or the main space). The login account can be called a second account, and the second account can be the current login account number. The private data is stored in a storage space corresponding to another login account (this storage space can be called a private space), and this login account can be called the first login account, thereby isolating the user's private data from general data.

电子设备的隐私空间中存储的数据可以包括包含隐私空间的系统配置(如隐私空间的主题、桌面以及壁纸等)、用户隐私的数据(如保存在相册的照片或视频或者某些应用中的某些数据)以及一些应用(如社交类应用)。隐私空间中存储的数据可以称为第一数据。The data stored in the private space of the electronic device may include the system configuration of the private space (such as the theme of the private space, the desktop, and the wallpaper, etc.), user privacy data (such as photos or videos saved in the album or certain applications in certain applications). some data) and some applications (such as social applications). The data stored in the private space may be referred to as first data.

用户在电子设备上建立不同的登录账号时,可以将不同的登录账号分别对应不同的凭据(如指纹或密码)。例如,用户可以将左手拇指的指纹,作为进入隐私空间对应的登录账号的凭据,用户可以将右手拇指的指纹,作为进入另一登录账号的凭据。When the user establishes different login accounts on the electronic device, the different login accounts may correspond to different credentials (such as fingerprints or passwords). For example, the user may use the fingerprint of the left thumb as a credential for entering a login account corresponding to the private space, and the user may use the fingerprint of the right thumb as a credential for entering another login account.

例如,用户可以在电子设备上建立登录账号1和登录账号2,电子设备可以将一般的数据存在登录账号1对应的存储空间,即普通空间,将隐私数据存储在登录账号2对应的存储空间,即隐私空间。在电子设备通过登录账号2对应的密码或指纹进入该电子设备时,电子设备可以获取隐私空间中存储的隐私数据,以呈现给用户。For example, the user can create a login account 1 and a login account 2 on the electronic device, and the electronic device can store general data in the storage space corresponding to the login account 1, that is, the common space, and store private data in the storage space corresponding to the login account 2. That is privacy space. When the electronic device enters the electronic device through the password or fingerprint corresponding to the login account 2, the electronic device can obtain private data stored in the private space to present to the user.

通常电子设备可以将存储一般的数据的存储空间对应的登录账号设置为默认账号,即电子设备当前可以访问的是一般的数据的存储空间。而在用户需要访问隐私空间的数据时,用户可以在电子设备的锁屏界面输入隐私空间对应的登录账号对应的密码或指纹。Generally, the electronic device can set the login account corresponding to the storage space for storing general data as a default account, that is, the electronic device can currently access the storage space for general data. When the user needs to access the data in the private space, the user may input the password or fingerprint corresponding to the login account corresponding to the private space on the lock screen interface of the electronic device.

在电子设备确定用户输入隐私空间对应的登录账号对应的密码或指纹正确时,电子设备可以将存储空间切换到隐私空间,从而电子设备可以获取隐私空间中存储的隐私数据,进而可以显示隐私空间对应的登录账号对应的界面供用户查看,即电子设备可以切换到隐私空间对应的界面。When the electronic device determines that the password or fingerprint corresponding to the login account corresponding to the private space entered by the user is correct, the electronic device can switch the storage space to the private space, so that the electronic device can obtain the private data stored in the private space, and then can display the privacy data corresponding to the private space. The interface corresponding to the login account is for the user to view, that is, the electronic device can switch to the interface corresponding to the private space.

电子设备可以通过确定用户是否输入隐私空间对应的登录账号对应的凭据,确定是否接收到用户用于触发切换隐私空间的操作,该操作可以称为第一操作。如,用户在电子设备的锁屏界面输入隐私空间对应的登录账号对应的密码或指纹,且用户输入的密码或指纹正确时,电子设备可以确定接收到用户用于出发切换隐私空间的操作。The electronic device may determine whether the user's operation for triggering switching of the private space is received by determining whether the user inputs the credentials corresponding to the login account corresponding to the private space, and this operation may be referred to as a first operation. For example, when the user enters the password or fingerprint corresponding to the login account corresponding to the private space on the lock screen interface of the electronic device, and the password or fingerprint entered by the user is correct, the electronic device can determine that the user's operation for switching the private space is received.

例如,结合图10所示,电子设备确定是否接收到用户用于触发切换隐私空间的操作,可以为电子设备,如电子设备的锁屏服务接收用户输入隐私空间对应的登录账号对应的凭据。在锁屏服务确定用户使用隐私空间对应的凭据进行验证通过时,锁屏服务可以确定用户需要进行隐私空间切换。在锁屏服务确定用户使用默认登录账号对应的凭据进行验证通过时,锁屏验证模块可以确定用户不需要进行隐私空间切换,电子设备可以进入默认登录账号,并默认登录账号对应的存储空间中存储的一般数据,进而可以显示对应的界面供用户查看。For example, as shown in FIG. 10 , the electronic device determines whether the user's operation for triggering switching of the private space is received. For the electronic device, such as the lock screen service of the electronic device, the user may input credentials corresponding to the login account corresponding to the private space. When the lock screen service determines that the user passes the authentication using the credentials corresponding to the private space, the lock screen service may determine that the user needs to switch the private space. When the lock screen service determines that the user uses the credentials corresponding to the default login account to pass the verification, the lock screen verification module can determine that the user does not need to switch the privacy space, and the electronic device can enter the default login account and store it in the storage space corresponding to the default login account. general data, and then the corresponding interface can be displayed for the user to view.

在电子设备确定没有接收到用户用于触发切换隐私空间的操作的情况下,电子设备可以重新执行上述S901。在电子设备接收到用户用于触发切换隐私空间的操作的情况下,电子设备可以执行S902。In a case where the electronic device determines that no user's operation for triggering switching of the private space has been received, the electronic device may re-execute the above S901. When the electronic device receives the user's operation for triggering switching of the private space, the electronic device may execute S902.

S902、电子设备获取隐私空间的数据。S902. The electronic device acquires the data of the private space.

在电子设备确定接收到用户用于触发切换隐私空间的操作的情况下,响应于该操作,电子设备可以获取隐私空间对应的数据,即隐私空间中存储的数据,从而电子设备可以加载隐私空间对应的界面。隐私空间的数据,可以包括隐私空间的系统配置,如隐私空间主题、桌面以及壁纸,还可以包括用户的隐私数据以及应用。When the electronic device determines that it has received the user's operation to trigger switching of the private space, in response to the operation, the electronic device can obtain the data corresponding to the private space, that is, the data stored in the private space, so that the electronic device can load the private space corresponding interface. The data of the PrivateSpace may include the system configuration of the PrivateSpace, such as the theme, desktop and wallpaper of the PrivateSpace, and may also include the user's private data and applications.

例如,结合图10所示,在电子设备,如电子设备的锁屏服务确定用户使用隐私空间对应的凭据进行验证通过时,锁屏服务可以启动隐私空间切换线程,用于启动电子设备的用户控制器。在电子设备的用户控制器起点之后,在用户控制器启动之后,用户控制器可以拉起切换服务,用于获取隐私空间的数据,如隐私空间的主题、桌面以及壁纸等数据。For example, as shown in FIG. 10 , when the electronic device, such as the lock screen service of the electronic device, determines that the user passes the verification using the credentials corresponding to the private space, the lock screen service can start the private space switching thread to start the user control of the electronic device. device. After the start of the user controller of the electronic device, after the user controller is started, the user controller can pull up the switching service to obtain the data of the private space, such as the theme, desktop and wallpaper of the private space.

S903、电子设备获取当前登录账号对应的活动堆栈。S903. The electronic device acquires an activity stack corresponding to the current login account.

当前登录账号即电子设备在切换到隐私空间对应的账号之前电子设备登录的账号,如普通空间对应的登录账号,当前登录账号可以称为第二账号。The current login account is the account that the electronic device logs into before switching to the account corresponding to the private space, such as the login account corresponding to the common space, the current login account may be called a second account.

当前登录账号对应的活动堆栈,用于记录当前账号的所有活动,活动堆栈可以为电子设备中的ActivityStack。活动是一个应用程序组件,提供一个屏幕,用户可以用来交互为了完成某项任务。例如,用户打开电子设备上的某一个应用程序,即电子设备启动了一个活动,该活动与该应用程序对应,活动可以为电子设备中的Activity。在电子设备启动了一个活动之后,电子设备会将该活动记录在活动堆栈中,即将新活动启动入栈。新活动启动入栈后,该新活动显示在电子设备屏幕的最前端。电子设备处理活动堆栈中的活动时,是处理活动堆栈的栈顶的活动,在栈顶的活动处理完成之后,下一个活动即为新的栈顶活动。The activity stack corresponding to the current login account is used to record all activities of the current account, and the activity stack may be the ActivityStack in the electronic device. An activity is an application component that provides a screen that the user can interact with in order to accomplish some task. For example, when a user opens an application program on the electronic device, that is, the electronic device starts an activity corresponding to the application program, and the activity may be an Activity in the electronic device. After the electronic device starts an activity, the electronic device will record the activity in the activity stack, that is, start a new activity and push it into the stack. After the new activity is started and pushed into the stack, the new activity is displayed at the forefront of the screen of the electronic device. When the electronic device processes activities in the activity stack, it processes the activity at the top of the stack. After the activity at the top of the stack is processed, the next activity is the new top activity.

例如,用户打开电子设备上的天气应用,电子设备启动天气应用对应的活动,并将该活动入栈,此时天气应用对应的活动在活动堆栈的栈顶。之后,用户打开电子设备上的聊天应用,电子设备启动聊天应用对应的活动,并将该活动入栈,此时聊天应用对应的活动在活动堆栈的栈顶。通常,电子设备的桌面也对应一个活动,该活动通常处于活动堆栈的栈底。For example, the user opens a weather application on the electronic device, the electronic device starts an activity corresponding to the weather application, and pushes the activity into a stack. At this time, the activity corresponding to the weather application is at the top of the activity stack. Afterwards, the user opens the chat application on the electronic device, and the electronic device starts the activity corresponding to the chat application, and pushes the activity into the stack. At this time, the activity corresponding to the chat application is at the top of the activity stack. Usually, the desktop of the electronic device also corresponds to an activity, and the activity is usually at the bottom of the activity stack.

例如,结合图10所示,在电子设备,如电子设备的用户控制器获取隐私空间的数据之后,用户控制器可以将获取的隐私空间的数据发送给电子设备的活动任务管理服务。活动任务管理服务获取到用户控制器发送的隐私空间的数据之后,活动任务管理服务可以获取当前登录账号对应的活动堆栈。For example, as shown in FIG. 10 , after the electronic device, such as the user controller of the electronic device obtains the data of the private space, the user controller may send the obtained data of the private space to the activity task management service of the electronic device. After the activity task management service obtains the data of the private space sent by the user controller, the activity task management service may obtain the activity stack corresponding to the current login account.

S904、电子设备确定活动堆栈是否为空。S904. The electronic device determines whether the active stack is empty.

在电子设备确定当前登录账号对应的活动堆栈为空的情况下,即电子设备当前登录账号并没有启动任何的活动,电子设备可以根据获取到的隐私空间的数据加载隐私空间对应的界面。在电子设备确定当前登录账号对应的活动堆栈不为空的情况下,即电子设备当前登录账号启动了多个活动,电子设备可以根据获取到的隐私空间的数据,确定当前登录账号启动的多个活动是否需要进行更改。When the electronic device determines that the activity stack corresponding to the current login account is empty, that is, the current login account of the electronic device does not start any activity, the electronic device may load the interface corresponding to the private space according to the obtained data of the private space. When the electronic device determines that the activity stack corresponding to the current login account is not empty, that is, the current login account of the electronic device has started multiple activities, the electronic device can determine the multiple activities started by the current login account according to the obtained data of the privacy space. Whether the activity needs to be changed.

在电子设备确定当前活动堆栈为空情况下,电子设备可以执行S905。在电子设备确定当前活动堆栈不为空的情况下,电子设备可以执行S906。In the case that the electronic device determines that the current active stack is empty, the electronic device may execute S905. If the electronic device determines that the current active stack is not empty, the electronic device may execute S906.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务获取当前登录账号对应的活动堆栈之后,电子设备,如电子设备的活动任务管理服务可以确定当前登录账号对应的活动堆栈是否为空。For example, as shown in FIG. 10 , after the electronic device, such as the activity task management service of the electronic device obtains the activity stack corresponding to the current login account, the electronic device, such as the activity task management service of the electronic device, can determine the activity stack corresponding to the current login account Is it empty.

S905、电子设备根据隐私空间的数据加载隐私空间对应的界面。S905. The electronic device loads an interface corresponding to the private space according to the data of the private space.

在电子设备确定当前登录账号对应的活动堆栈为空的情况下,电子设备可以根据获取的隐私空间对应的数据,即隐私空间中存储的数据,加载隐私空间对应的界面。When the electronic device determines that the activity stack corresponding to the current login account is empty, the electronic device may load an interface corresponding to the private space according to acquired data corresponding to the private space, ie, data stored in the private space.

例如,结合图4所示,电子设备根据隐私空间的数据加载隐私空间对应的界面,可以为电子设备,如电子设备的用户控制器获取到隐私空间的数据之后,用户控制器可以向手机上的其他系统服务发送隐私空间的数据。在其他系统服务接收到用户控制器发送的隐私空间的数据(如系统配置)之后,其他系统服务可以根据隐私空间的数据进行配置。在用户控制器向手机上的其他系统服务发送隐私空间的系统配置之后,用户控制器还可以将普通空间对应的桌面切换到后台,并启动隐私空间对应的桌面。在用户控制器将普通空间对应的桌面切换到后台,并启动隐私空间对应的桌面之后,用户控制器可以向手机上的其他系统服务发送启动隐私空间消息。其他系统服务接收到启动隐私空间消息之后,可以根据隐私空间的数据进行相应的配置。For example, as shown in Figure 4, the electronic device loads the interface corresponding to the private space according to the data of the private space, which can be the electronic device, such as after the user controller of the electronic device obtains the data of the private space, the user controller can send the data to the mobile phone. Other system services send private space data. After other system services receive the private space data (such as system configuration) sent by the user controller, other system services can be configured according to the private space data. After the user controller sends the system configuration of the private space to other system services on the mobile phone, the user controller can also switch the desktop corresponding to the common space to the background, and start the desktop corresponding to the private space. After the user controller switches the desktop corresponding to the common space to the background and starts the desktop corresponding to the private space, the user controller can send a message of starting the private space to other system services on the mobile phone. After other system services receive the message of starting the private space, they can perform corresponding configurations according to the data of the private space.

在其他系统服务根据隐私空间的数据进行配置完成之后,用户控制器还可以向其他系统服务发送切换隐私空间消息。其他系统服务接收到切换隐私空间消息之后,可以将隐私空间的系统配置切换到前台。在其他系统服务将隐私空间的系统配置切换到前台之后,用户控制器可以向其他系统服务发送屏幕解冻消息,用于解冻屏幕。在其他系统服务将屏幕解冻完成之后,用户控制器还可以向锁屏服务发送隐私空间切换完成消息。在锁屏服务接收到用户控制器发送的隐私空间切换完成消息之后,锁屏服务可以退出锁屏,从而手机可以显示隐私空间对应的界面。After other system services are configured according to the data of the privacy space, the user controller may also send a message of switching the privacy space to other system services. After other system services receive the message of switching the private space, they can switch the system configuration of the private space to the foreground. After other system services switch the system configuration of the private space to the foreground, the user controller may send a screen unfreezing message to other system services for unfreezing the screen. After other system services complete unfreezing the screen, the user controller may also send a private space switching completion message to the lock screen service. After the screen lock service receives the private space switching completion message sent by the user controller, the screen lock service may exit the screen lock, so that the mobile phone may display an interface corresponding to the private space.

S906、电子设备根据隐私空间的数据,确定活动堆栈中的第一活动的配置是否需要更改。S906. The electronic device determines whether the configuration of the first activity in the activity stack needs to be changed according to the data of the privacy space.

第一活动即当前登录账号对应的活动堆栈中处于栈顶的活动。例如,当前登录账号对应的活动堆栈包括聊天应用对应的活动、天气应用对应的活动以及桌面对应的活动。活动堆栈的栈顶活动为聊天应用对应的活动,则第一活动为聊天应用对应的活动。电子设备可以根据隐私空间的数据,确定聊天应用对应的活动的配置是否需要更改,如隐私空间中是否包括该聊天应用,或者隐私空间是否需要显示该聊天应用中的部分数据。The first activity is the activity at the top of the activity stack corresponding to the current login account. For example, the activity stack corresponding to the current login account includes an activity corresponding to a chat application, an activity corresponding to a weather application, and an activity corresponding to a desktop. The top activity of the activity stack is an activity corresponding to the chat application, and the first activity is an activity corresponding to the chat application. The electronic device can determine whether the configuration of the activity corresponding to the chat application needs to be changed according to the data in the private space, such as whether the chat application is included in the private space, or whether part of the data in the chat application needs to be displayed in the private space.

在电子设备对活动堆栈中的栈顶的活动处理完成之后,即对活动堆栈中的栈顶的活动执行完S906-S917之后,活动堆栈中的栈顶变为原来的栈顶的活动之后的活动。例如,当前登录账号对应的活动堆栈包括聊天应用对应的活动、天气应用对应的活动以及桌面对应的活动。活动堆栈的栈顶活动为聊天应用对应的活动,则第一活动为聊天应用对应的活动。电子设备可以根据隐私空间的数据,确定聊天应用对应的活动的配置是否需要更改之后,栈顶的活动变成天气应用对应的活动,此时,天气应用对应的活动为第一活动,电子设备可以继续对天气应用对应的活动执行S906-S917。After the electronic device finishes processing the activity at the top of the stack, that is, after executing S906-S917 on the activity at the top of the stack, the top of the stack in the activity stack becomes the activity after the activity at the top of the stack . For example, the activity stack corresponding to the current login account includes an activity corresponding to a chat application, an activity corresponding to a weather application, and an activity corresponding to a desktop. The top activity of the activity stack is an activity corresponding to the chat application, and the first activity is an activity corresponding to the chat application. After the electronic device can determine whether the configuration of the activity corresponding to the chat application needs to be changed according to the data in the privacy space, the activity on the top of the stack becomes the activity corresponding to the weather application. At this time, the activity corresponding to the weather application is the first activity, and the electronic device can Continue to execute S906-S917 on the activity corresponding to the weather application.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务可以确定当前登录账号对应的活动堆栈不为空的情况下,电子设备,如电子设备的活动任务管理服务可以根据隐私空间的数据,确定活动堆栈中的第一活动的配置是否需要更改。For example, as shown in FIG. 10 , when the electronic device, such as the activity task management service of the electronic device, can determine that the activity stack corresponding to the current login account is not empty, the electronic device, such as the activity task management service of the electronic device, can Space data to determine if the configuration of the first activity in the activity stack needs to be changed.

在电子设备根据隐私空间的数据,确定活动堆栈中的第一活动的配置不需要更改的情况下,电子设备可以执行S907。在电子设备根据隐私空间的数据,确定活动堆栈中的第一活动的配置需要更改的情况下,电子设备可以执行S908。When the electronic device determines that the configuration of the first activity in the activity stack does not need to be changed according to the data in the privacy space, the electronic device may execute S907. When the electronic device determines that the configuration of the first activity in the activity stack needs to be changed according to the data in the privacy space, the electronic device may execute S908.

S907、电子设备确定第一活动的是否需要更改显示。S907. The electronic device determines whether the display of the first activity needs to be changed.

在电子设备根据隐私空间的数据,确定活动堆栈中的第一活动的配置不需要更改的情况下,电子设备可以确定第一活动的是否需要更改显示。例如,第一活动为聊天应用对应的活动时,电子设备可以根据隐私空间的数据,确定聊天应用对应的活动的配置不需要更改,即隐私空间中包括该聊天应用,且该聊天应用在隐私空间中的数据与在普通空间中的数据相同。此时,电子设备可以确定是否需要显示该聊天应用。例如,聊天应用在普通空间中已经显示,而在隐私空间中不需要显示,则电子设备可以在隐私空间中不显示该聊天应用。如在聊天应用在普通空间中已经显示,而在隐私空间中也需要显示,则电子设备可以在隐私空间中显示该聊天应用,即不更改该聊天应用的显示。When the electronic device determines that the configuration of the first activity in the activity stack does not need to be changed according to the data in the privacy space, the electronic device may determine whether the display of the first activity needs to be changed. For example, when the first activity is an activity corresponding to a chat application, the electronic device may determine that the configuration of the activity corresponding to the chat application does not need to be changed according to the data of the private space, that is, the chat application is included in the private space, and the chat application is in the private space. The data in is the same as in normal space. At this point, the electronic device can determine whether to display the chat application. For example, if a chat application has been displayed in the normal space but does not need to be displayed in the private space, the electronic device may not display the chat application in the private space. If the chat application has been displayed in the common space, but also needs to be displayed in the private space, the electronic device can display the chat application in the private space, that is, the display of the chat application is not changed.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务根据隐私空间的数据,确定活动堆栈中的第一活动的配置不需要更改的情况下,在电子设备,如电子设备的活动任务管理服务可以确定第一活动是否需要更改显示。For example, as shown in FIG. 10, when the electronic device, such as the activity task management service of the electronic device, determines that the configuration of the first activity in the activity stack does not need to be changed according to the data of the privacy space, the electronic device such as the electronic device The activity task management service can determine whether the first activity needs to change the display.

在电子设备确定活动堆栈中的第一活动的需要更改显示的情况下,电子设备可以执行S909。在电子设备确定活动堆栈中的第一活动的不需要更改显示的情况下,电子设备可以执行S910。In a case where the electronic device determines that the display of the first activity in the activity stack needs to be changed, the electronic device may execute S909. In a case where the electronic device determines that the display of the first activity in the activity stack does not need to be changed, the electronic device may perform S910.

S909、电子设备更改第一活动的显示。S909. The electronic device changes the display of the first activity.

在电子设备确定第一活动的需要更改显示的情况下,电子设备可以根据隐私空间的数据,更改第一活动的显示。When the electronic device determines that the display of the first activity needs to be changed, the electronic device may change the display of the first activity according to the data in the privacy space.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务确定第一活动需要更改显示的情况下,电子设备,如电子设备的活动任务管理服务可以通知第一活动进行更改显示。For example, as shown in FIG. 10, when the electronic device, such as the activity task management service of the electronic device, determines that the first activity needs to be displayed, the electronic device, such as the activity task management service of the electronic device, can notify the first activity to change the display. .

S910、电子设备不更改第一活动的显示。S910. The electronic device does not change the display of the first activity.

在电子设备确定第一活动的不需要更改显示的情况下,电子设备可以根据隐私空间的数据,更改第一活动的显示。In a case where the electronic device determines that the display of the first activity does not need to be changed, the electronic device may change the display of the first activity according to the data in the privacy space.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务确定第一活动不需要更改显示的情况下,电子设备,如电子设备的活动任务管理服务可以通知第一活动不进行更改显示。For example, as shown in FIG. 10 , when the electronic device, such as the activity task management service of the electronic device, determines that the display of the first activity does not need to be changed, the electronic device, such as the activity task management service of the electronic device, may notify the first activity not to be performed. Change the display.

S908、电子设备确定第一活动是否为桌面对应的活动。S908. The electronic device determines whether the first activity is an activity corresponding to the desktop.

在电子设备根据隐私空间的数据,确定活动堆栈中的第一活动的配置需要更改的情况下,电子设备可以确定该第一活动是否为桌面对应的活动,从而在第一活动为桌面对应的活动的情况下,电子设备可以确定隐私空间对应的桌面是否在电子设备的后台运行,从而能够确定是否需要重启隐私空间对应的桌面。When the electronic device determines that the configuration of the first activity in the activity stack needs to be changed according to the data in the private space, the electronic device can determine whether the first activity is an activity corresponding to the desktop, so that the first activity is an activity corresponding to the desktop In the case of , the electronic device can determine whether the desktop corresponding to the private space is running in the background of the electronic device, so as to determine whether to restart the desktop corresponding to the private space.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务根据隐私空间的数据,确定活动堆栈中的第一活动的配置需要更改的情况下,在电子设备,如电子设备的活动任务管理服务可以确定第一活动是否为桌面对应的活动。For example, as shown in FIG. 10, when the electronic device, such as the activity task management service of the electronic device, determines that the configuration of the first activity in the activity stack needs to be changed according to the data of the privacy space, the electronic device, such as the The activity task management service may determine whether the first activity is an activity corresponding to the desktop.

在电子设备确定第一活动为桌面的情况下,电子设备可以执行S911。在电子设备确定第一活动不是桌面的情况下,电子设备可以执行S912。In a case where the electronic device determines that the first activity is a desktop, the electronic device may execute S911. In a case where the electronic device determines that the first activity is not a desktop, the electronic device may perform S912.

S911、电子设备确定隐私空间对应的桌面是否在电子设备的后台运行。S911. The electronic device determines whether the desktop corresponding to the private space is running in the background of the electronic device.

在电子设备从当前登录账号切换到第一登录账号(即隐私空间对应的登录账号)为热切时,第一登录账号对应的桌面在后台运行。即电子设备从当前登录账号切换到第一登录账号之前,电子设备已经切换过第一登录账号。例如,电子设备在登录隐私空间对应的登录账号之后,从隐私空间对应的登录账号切换到普通空间对应的登录账号时,普通空间对应的登录账号的状态为运行状态。电子设备再次从普通空间对应的登录账号切换到隐私空间对应的登录账号时,隐私空间对应的登录账号的状态为运行状态,即隐私空间对应的在后台运行。When the electronic device is eager to switch from the current login account to the first login account (ie, the login account corresponding to the private space), the desktop corresponding to the first login account runs in the background. That is, before the electronic device switches from the current login account to the first login account, the electronic device has already switched the first login account. For example, when the electronic device switches from the login account corresponding to the private space to the login account corresponding to the common space after logging in the login account corresponding to the private space, the status of the login account corresponding to the normal space is a running state. When the electronic device switches from the login account corresponding to the common space to the login account corresponding to the private space again, the status of the login account corresponding to the private space is running, that is, the corresponding login account of the private space is running in the background.

电子设备可以通过切换标记,来确定第一登录账号对应的桌面是否在后台运行。例如,切换标记可以为TRUE或FALSE。切换标记为TRUE,可以表示第一登录账号对应的桌面在后台运行,即在电子设备从当前登录账号切换到第一登录账号之前,电子设备已经切换过第一登录账号,也就是说,电子设备从当前登录账号切换到第一登录账号是热切。在切换标记为FALSE,表示第一登录账号对应的桌面没有在后台运行,即在电子设备从当前登录账号切换到第一登录账号之前,电子设备没有切换过第一登录账号,也就是说,电子设备从当前登录账号切换到第一登录账号是热切。The electronic device can determine whether the desktop corresponding to the first login account is running in the background by switching the flag. For example, a toggle flag can be TRUE or FALSE. The switching flag is TRUE, which can indicate that the desktop corresponding to the first login account is running in the background, that is, before the electronic device switches from the current login account to the first login account, the electronic device has already switched the first login account, that is, the electronic device Switching from the current login account to the first login account is eager. When the switching flag is FALSE, it means that the desktop corresponding to the first login account is not running in the background, that is, before the electronic device switches from the current login account to the first login account, the electronic device has not switched the first login account. It is eager for the device to switch from the current login account to the first login account.

在电子设备开机后,或者电子设备创建第一登录账号之后,电子设备可以将切换标记为FALSE。电子设备在从当前登录账号切换到第一登录账号为冷切时,即电子设备开机后首次切换到第一登录账号或者电子设备创建第一登录账号之后,首次从当前登录账号切换到第一登录账号,电子设备可以将切换标记为TRUE,从而在下一次电子设备在从当前登录账号切换到第一登录账号时,电子设备可以通过切换标记为TRUE,来确定第一登录账号的桌面在电子设备的后台运行。After the electronic device is powered on, or after the electronic device creates the first login account, the electronic device may mark the switching as FALSE. When the electronic device switches from the current login account to the first login account is a cold cut, that is, the electronic device is switched to the first login account for the first time after it is turned on or the electronic device is switched from the current login account to the first login account for the first time after the first login account is created. account, the electronic device can mark the switch as TRUE, so that when the electronic device switches from the current login account to the first login account next time, the electronic device can determine that the desktop of the first login account is on the electronic device by switching the mark as TRUE Background process.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务第一活动是否为桌面对应的活动的情况下,在电子设备,如电子设备的活动任务管理服务可以确定第一登录账号对应的桌面是否在电子设备的后台运行。如,电子设备的活动任务管理服务可以通过查询电子设备的硬件主题管理器中的切换标记,在硬件主题管理器中的切换标记的TRUE的情况下,电子设备的活动任务管理服务可以确定第一登录账号对应的桌面在电子设备的后台运行,即电子设备从当前登录账号切换到第一登录账号为热切。在硬件主题管理器中的切换标记的FALSE的情况下,电子设备的活动任务管理服务可以确定第一登录账号对应的桌面没有在电子设备的后台运行,即电子设备从当前登录账号切换到第一登录账号为冷切。For example, as shown in FIG. 10 , in the case of an electronic device, such as whether the first activity of the activity task management service of the electronic device is an activity corresponding to the desktop, the electronic device, such as the activity task management service of the electronic device, can determine whether the first login Whether the desktop corresponding to the account is running in the background of the electronic device. For example, the active task management service of the electronic device can query the switching flag in the hardware theme manager of the electronic device, and in the case of TRUE in the hardware theme manager, the active task management service of the electronic device can determine the first The desktop corresponding to the login account runs in the background of the electronic device, that is, it is eager to switch the electronic device from the current login account to the first login account. In the case of the switching flag in the hardware theme manager being FALSE, the activity task management service of the electronic device can determine that the desktop corresponding to the first login account is not running in the background of the electronic device, that is, the electronic device switches from the current login account to the first The login account is cold cutting.

需要说明的是,电子设备在从当前登录账号切换到第一登录账号为冷切时,即电子设备,如电子设备的用户控制器可以将切换标记设为TRUE,并将切换标记发送电子设备的硬件主题管理器。电子设备的硬件主题管理器可以存储切换标记,从而在下一次电子设备在从当前登录账号切换到第一登录账号时,电子设备可以通过切换标记,来确定第一登录账号的桌面是否在电子设备的后台运行。即在隐私空间的桌面没有在电子设备的后台运行的情况下,电子设备可以接收用户触发从当前登录的账号切换到第一账号的操作,电子设备可以根据第一账号对应的存储空间存储的第一数据,加载隐私空间的桌面,并根据第一账号对应的存储空间存储的第一数据(即隐私空间对应的隐私数据),加载第一账号的界面。电子设备可以记录切换标记,切换标记用于指示第一账号的桌面在电子设备的后台运行。It should be noted that when the electronic device switches from the current login account to the first login account, it is a cold switch, that is, the electronic device, such as the user controller of the electronic device, can set the switching flag to TRUE, and send the switching flag to the electronic device's Hardware theme manager. The hardware theme manager of the electronic device can store the switching flag, so that when the electronic device switches from the current login account to the first login account next time, the electronic device can determine whether the desktop of the first login account is on the electronic device's desktop by switching the flag. Background process. That is, when the desktop of the private space is not running in the background of the electronic device, the electronic device can receive an operation triggered by the user to switch from the currently logged-in account to the first account, and the electronic device can store the first account according to the storage space corresponding to the first account. One data, load the desktop of the private space, and load the interface of the first account according to the first data stored in the storage space corresponding to the first account (that is, the private data corresponding to the private space). The electronic device may record a switching flag, and the switching flag is used to indicate that the desktop of the first account is running in the background of the electronic device.

也就是说,在电子设备接收用户的第一操作之前,电子设备可以接收用户触发切换到第一账号(即隐私空间对应的账号)的第二操作。响应于第二操作,电子设备可以根据隐私空间的数据,即第一数据,加载隐私空间的桌面,并根据第一数据加载并在隐私空间的桌面上显示隐私空间对应的内容。电子设备在加载隐私空间的桌面之后,电子设备可以存储加载的隐私空间的桌面。之后,电子设备可以接收用户触发从第一账号切换到其他账号的第三操作,响应于第三操作,电子设备将电子设备当前登录的账号从第一账号切换到其他账号。That is to say, before the electronic device receives the user's first operation, the electronic device may receive the user's second operation triggering switching to the first account (ie, the account corresponding to the private space). In response to the second operation, the electronic device may load the desktop of the private space according to the data of the private space, that is, the first data, and load and display the content corresponding to the private space on the desktop of the private space according to the first data. After the electronic device loads the desktop of the private space, the electronic device may store the loaded desktop of the private space. Afterwards, the electronic device may receive a third operation triggered by the user to switch from the first account to another account, and in response to the third operation, the electronic device switches the account currently logged in by the electronic device from the first account to another account.

在电子设备确定隐私空间对应的桌面没有在电子设备的后台运行的情况下,电子设备可以执行S913。在电子设备确定隐私空间对应的桌面在电子设备的后台运行的情况下,电子设备可以执行S914。When the electronic device determines that the desktop corresponding to the private space is not running in the background of the electronic device, the electronic device may execute S913. When the electronic device determines that the desktop corresponding to the private space is running in the background of the electronic device, the electronic device may execute S914.

S913、电子设备加载隐私空间对应的桌面。S913. The electronic device loads a desktop corresponding to the privacy space.

在电子设备确定隐私空间对应的桌面没有在电子设备的后台运行的情况下,电子设备可以根据隐私空间的数据,启动隐私空间对应的桌面,即根据隐私空间的数据,加载隐私空间对应的桌面。即在隐私空间的桌面没有在电子设备的后台运行的情况下,电子设备可以接收用户触发从当前登录的账号切换到第一账号的操作,电子设备可以根据第一账号对应的存储空间存储的第一数据,加载隐私空间的桌面,并根据第一账号对应的存储空间存储的第一数据(即隐私空间对应的隐私数据),加载第一账号的界面。When the electronic device determines that the desktop corresponding to the private space is not running in the background of the electronic device, the electronic device can start the desktop corresponding to the private space according to the data of the private space, that is, load the desktop corresponding to the private space according to the data of the private space. That is, when the desktop of the private space is not running in the background of the electronic device, the electronic device can receive an operation triggered by the user to switch from the currently logged-in account to the first account, and the electronic device can store the first account according to the storage space corresponding to the first account. One data, load the desktop of the private space, and load the interface of the first account according to the first data stored in the storage space corresponding to the first account (that is, the private data corresponding to the private space).

例如,结合图4所示,在电子设备,如电子设备的活动任务管理服务确定第一登录账号(即隐私空间对应的登录账号)对应的桌面没有在电子设备的后台运行,如电子设备从当前登录账号切换到第一登录账号为冷切。电子设备,如电子设备的活动任务管理服务可以通知电子设备的用户控制器,从而电子设备的用户控制器可以将普通空间的桌面切换到后台,并根据隐私空间的数据,启动隐私空间对应的桌面。For example, as shown in FIG. 4 , on an electronic device, such as the activity task management service of the electronic device determines that the desktop corresponding to the first login account (that is, the login account corresponding to the private space) is not running in the background of the electronic device, such as the electronic device from the current Switching the login account to the first login account is a cold cut. Electronic devices, such as the activity task management service of electronic devices can notify the user controller of the electronic device, so that the user controller of the electronic device can switch the desktop of the ordinary space to the background, and start the desktop corresponding to the private space according to the data of the private space .

在电子设备将隐私空间对应的桌面切换到前台之后,电子设备可以根据隐私空间的数据加载隐私空间对应的界面,即电子设备可以继续执行下述S915。After the electronic device switches the desktop corresponding to the private space to the foreground, the electronic device may load the interface corresponding to the private space according to the data of the private space, that is, the electronic device may continue to execute the following S915.

S914、电子设备将隐私空间对应的桌面切换到前台。S914. The electronic device switches the desktop corresponding to the private space to the foreground.

隐私空间对应的桌面,可以为用户设置的桌面,也可以为系统默认的桌面。本申请实施例对此并不进行限定。从而电子设备可以根据隐私空间的数据,即第一数据,加载并在第一账号的桌面上显示第一账号对应的内容。电子设备将隐私空间对应的桌面切换到前台,即电子设备显示第一账号的桌面,第一账号的桌面是电子设备在接收用户的第一操作之前加载的。The desktop corresponding to the private space may be the desktop set by the user, or the default desktop of the system. This embodiment of the present application does not limit it. Therefore, the electronic device can load and display the content corresponding to the first account on the desktop of the first account according to the data of the private space, that is, the first data. The electronic device switches the desktop corresponding to the private space to the foreground, that is, the electronic device displays the desktop of the first account, and the desktop of the first account is loaded by the electronic device before receiving the user's first operation.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务确定第一登录账号(即隐私空间对应的登录账号)对应的桌面在电子设备的后台运行,即电子设备从当前登录账号切换到第一登录账号为热切。电子设备,如电子设备的活动任务管理服务可以通知电子设备的用户控制器,从而电子设备的用户控制器可以将普通空间的桌面切换到后台,并将隐私空间对应的桌面切换到前台。For example, as shown in FIG. 10 , on an electronic device, such as the activity task management service of the electronic device determines that the desktop corresponding to the first login account (that is, the login account corresponding to the private space) is running in the background of the electronic device, that is, the electronic device starts from the current login. It is eager to switch the account to the first login account. The electronic device, for example, the activity task management service of the electronic device can notify the user controller of the electronic device, so that the user controller of the electronic device can switch the desktop of the common space to the background, and switch the desktop corresponding to the private space to the foreground.

在电子设备将隐私空间对应的桌面切换到前台之后,电子设备也可以将隐私空间的壁纸切换到前台。隐私空间的壁纸,可以为用户设置的壁纸。本申请实施例对此并不进行限定。由于隐私空间对应的桌面并没有重新加载,因此,隐私空间的壁纸也不需要重新加载,从而电子设备在从当前登录账号切换到隐私空间对应的登录账号时,电子设备不会出现黑屏。After the electronic device switches the desktop corresponding to the private space to the foreground, the electronic device may also switch the wallpaper of the private space to the foreground. The wallpaper of the privacy space, which can be set for the user. This embodiment of the present application does not limit it. Since the desktop corresponding to the private space is not reloaded, the wallpaper of the private space does not need to be reloaded, so when the electronic device is switched from the current login account to the login account corresponding to the private space, the electronic device will not have a black screen.

在电子设备将隐私空间对应的桌面切换到前台之后,电子设备可以根据隐私空间的数据加载隐私空间对应的界面,即电子设备可以继续执行下述S915。After the electronic device switches the desktop corresponding to the private space to the foreground, the electronic device may load the interface corresponding to the private space according to the data of the private space, that is, the electronic device may continue to execute the following S915.

S915、电子设备根据隐私空间的数据加载隐私空间对应的界面。S915. The electronic device loads an interface corresponding to the private space according to the data of the private space.

在电子设备将隐私空间对应的桌面切换到前台之后,电子设备可以根据隐私空间的数据加载隐私空间对应的界面。如,在电子设备将隐私空间对应的桌面上加载隐私空间的应用程序图标等,即电子设备可以根据隐私空间的数据,即第一数据,加载并在第一账号的桌面上显示第一账号对应的内容。由于隐私空间对应的桌面并没有重新加载,因此,隐私空间的应用程序图标也不需要重新加载,从而电子设备在从当前登录账号切换到隐私空间对应的登录账号时,可以减少切换隐私空间的时间,提高切换隐私空间的效率较低,提高用户体验。After the electronic device switches the desktop corresponding to the private space to the foreground, the electronic device may load the interface corresponding to the private space according to the data of the private space. For example, the electronic device loads the application icon of the private space on the desktop corresponding to the private space, that is, the electronic device can load and display the first account corresponding to the first account on the desktop of the first account according to the data of the private space, that is, the first data. Content. Since the desktop corresponding to the private space is not reloaded, the application icon of the private space does not need to be reloaded, so that when the electronic device is switched from the current login account to the login account corresponding to the private space, the time for switching the private space can be reduced , improve the efficiency of switching the privacy space is low, and improve the user experience.

例如,结合图4所示,电子设备根据隐私空间的数据加载隐私空间对应的界面,可以为电子设备,如电子设备的用户控制器,可以向其他系统服务发送切换隐私空间消息。其他系统服务接收到切换隐私空间消息之后,可以将隐私空间的系统配置切换到前台。在其他系统服务将隐私空间的系统配置切换到前台之后,用户控制器可以向其他系统服务发送屏幕解冻消息,用于解冻屏幕。在其他系统服务将屏幕解冻完成之后,用户控制器还可以向锁屏服务发送隐私空间切换完成消息。在锁屏服务接收到用户控制器发送的隐私空间切换完成消息之后,锁屏服务可以退出锁屏,从而手机可以显示隐私空间对应的界面。For example, as shown in FIG. 4 , the electronic device loads the interface corresponding to the private space according to the data of the private space, and the electronic device, such as the user controller of the electronic device, can send a message to switch the private space to other system services. After other system services receive the message of switching the private space, they can switch the system configuration of the private space to the foreground. After other system services switch the system configuration of the private space to the foreground, the user controller may send a screen unfreezing message to other system services for unfreezing the screen. After other system services complete unfreezing the screen, the user controller may also send a private space switching completion message to the lock screen service. After the screen lock service receives the private space switching completion message sent by the user controller, the screen lock service may exit the screen lock, so that the mobile phone may display an interface corresponding to the private space.

S912、电子设备确定第一活动是否需要重启。S912. The electronic device determines whether the first activity needs to be restarted.

在电子设备确定第一活动不为桌面对应的活动的情况下,电子设备可以根据隐私空间的数据,确定第一活动是否需要重启。例如,在第一活动为聊天应用对应的活动情况下,电子设备可以根据隐私空间的数据,确定隐私空间不包括该聊天应用,则电子设备确定第一活动不需要重启,电子设备可以停止运行第一活动。在第一活动为聊天应用对应的活动情况下,电子设备可以根据隐私空间的数据,确定隐私空间包括该聊天应用,则电子设备可以确定第一活动需要重启,电子设备可以重新启动第一活动。When the electronic device determines that the first activity is not an activity corresponding to the desktop, the electronic device may determine whether the first activity needs to be restarted according to the data in the privacy space. For example, if the first activity is an activity corresponding to a chat application, the electronic device may determine that the private space does not include the chat application according to the data of the private space, then the electronic device determines that the first activity does not need to be restarted, and the electronic device may stop running the second activity. an activity. In the case that the first activity is an activity corresponding to a chat application, the electronic device can determine that the private space includes the chat application according to the data of the private space, then the electronic device can determine that the first activity needs to be restarted, and the electronic device can restart the first activity.

即在电子设备根据隐私空间的数据,确定第一活动不需要重启的情况下,电子设备可以执行S916。在电子设备根据隐私空间的数据,确定第一活动需要重启的情况下,电子设备可以执行S917。That is, if the electronic device determines that the first activity does not need to be restarted according to the data in the private space, the electronic device may execute S916. In a case where the electronic device determines that the first activity needs to be restarted according to the data in the private space, the electronic device may execute S917.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务确定第一活动不为桌面对应的活动的情况下,电子设备,如电子设备的活动任务管理服务可以根据隐私空间的数据,确定第一活动是否需要重启。For example, as shown in FIG. 10, when an electronic device, such as the activity task management service of the electronic device determines that the first activity is not an activity corresponding to the desktop, the electronic device, such as the activity task management service of the electronic device, may data to determine whether the first activity needs to be restarted.

S916、电子设备停止第一活动。S916. The electronic device stops the first activity.

在电子设备根据隐私空间的数据,确定第一活动不需要重启的情况下,电子设备可以停止第一活动,即销毁第一活动。In a case where the electronic device determines that the first activity does not need to be restarted according to the data in the privacy space, the electronic device may stop the first activity, that is, destroy the first activity.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务根据隐私空间的数据,确定第一活动不需要运行的情况下,电子设备,如电子设备的活动任务管理服务可以销毁第一活动。For example, as shown in FIG. 10 , when the electronic device, such as the activity task management service of the electronic device, determines that the first activity does not need to run according to the data of the privacy space, the electronic device, such as the activity task management service of the electronic device, can destroy the first activity.

S917、电子设备重启第一活动。S917. The electronic device restarts the first activity.

在电子设备根据隐私空间的数据,确定第一活动需要重启的情况下,电子设备可以根据隐私空间的数据,重启第一活动。When the electronic device determines that the first activity needs to be restarted according to the data in the private space, the electronic device may restart the first activity according to the data in the private space.

例如,结合图10所示,在电子设备,如电子设备的活动任务管理服务根据隐私空间的数据,确定第一活动需要重启的情况下,电子设备,如电子设备的活动任务管理服务通知活动线程,重新启动第一活动。For example, as shown in FIG. 10 , when the electronic device, such as the activity task management service of the electronic device, determines that the first activity needs to be restarted according to the data of the privacy space, the electronic device, such as the activity task management service of the electronic device, notifies the activity thread , restart the first activity.

例如,结合图11中的(a)所示,用户可以在手机上建立不同的登录账号,如登录账号1和登录账号2。手机的锁屏界面上可以显示建立的登录账号。登录账号1可以对应一普通空间,用于存储用户的一般数据和应用,即手机可以将一般数据和应用存储在登录账号1对应的普通空间中。登录账号2可以对应一隐私空间,用于存储用户的隐私数据和应用,即手机可以将隐私数据和应用存储在登录账号2对应的隐私空间中。For example, as shown in (a) in FIG. 11 , the user can create different login accounts, such as login account 1 and login account 2, on the mobile phone. The created login account can be displayed on the lock screen interface of the mobile phone. The login account 1 may correspond to a common space for storing the user's general data and applications, that is, the mobile phone may store general data and applications in the common space corresponding to the login account 1. The login account 2 may correspond to a private space for storing the user's private data and applications, that is, the mobile phone may store private data and applications in the private space corresponding to the login account 2.

用户可以在锁屏界面的指纹输入区域上输入不同的指纹,从而进入登录账号1或登录账号2。在用户输入的登录账号2对应的密码或指纹正确时,手机可以获取隐私空间的数据以及获取当前登录账号(即登录账号1)对应的活动堆栈。手机可以根据隐私空间的数据,确定活动堆栈中的栈顶活动的配置是否需要更改。在手机确定活动堆栈中的栈顶活动的配置需要更改的情况下,手机可以确定栈顶活动是否为桌面对应的活动。在确定栈顶活动是否为桌面对应的活动的情况下,手机可以确定隐私空间对应的桌面是否在电子设备的后台运行。在手机可以确定隐私空间对应的桌面在电子设备的后台运行的情况下,手机可以将隐私空间对应的桌面切换到前台,从而手机可以根据隐私空间的数据加载隐私空间对应的界面。The user can input different fingerprints in the fingerprint input area of the lock screen interface, so as to enter the login account 1 or login account 2. When the password or fingerprint corresponding to the login account 2 input by the user is correct, the mobile phone can obtain the data of the private space and the activity stack corresponding to the current login account (ie, login account 1). The mobile phone can determine whether the configuration of the top activity in the activity stack needs to be changed according to the data in the privacy space. When the mobile phone determines that the configuration of the top activity in the activity stack needs to be changed, the mobile phone can determine whether the top activity of the stack is an activity corresponding to the desktop. In the case of determining whether the activity at the top of the stack is an activity corresponding to the desktop, the mobile phone may determine whether the desktop corresponding to the private space is running in the background of the electronic device. When the mobile phone can determine that the desktop corresponding to the private space is running in the background of the electronic device, the mobile phone can switch the desktop corresponding to the private space to the foreground, so that the mobile phone can load the interface corresponding to the private space according to the data of the private space.

在手机根据隐私空间的数据加载隐私空间对应的界面时,如图11中的(b)所示,手机可以显示切换动效,以提示用户手机正在切换过程中。在手机根据隐私空间的数据加载隐私空间对应的界面完成时,手机可以显示如图11中的(c)所示的登录账号2对应的界面供用户查看,登录账号2对应的界面中可以显示用户的隐私数据和应用,即手机切换到了隐私空间。When the mobile phone loads the interface corresponding to the private space according to the data of the private space, as shown in (b) in FIG. 11 , the mobile phone can display a switching animation to remind the user that the mobile phone is in the process of switching. When the mobile phone finishes loading the interface corresponding to the private space according to the data of the private space, the mobile phone can display the interface corresponding to the login account 2 as shown in (c) in Figure 11 for the user to view, and the interface corresponding to the login account 2 can display the user private data and applications, that is, the phone is switched to private space.

采用本申请的方案,在电子设备热切到隐私空间时,由于隐私空间对应的桌面在电子设备的后台运行,电子设备可以不重新加载隐私空间对应的桌面,而是将隐私空间对应的桌面切换到前台,从而隐私空间对应的桌面上的应用程序图标不需要重新加载以及隐私空间的壁纸也不需要重新绘制,从而可以避免逐个加载隐私空间对应的桌面上的应用程序图标,以及避免手机显示黑屏,进而可以缩短手机切换隐私空间的时间,提高切换隐私空间的效率,提高用户体验。此外,由于电子设备不重新加载隐私空间对应的桌面,而是将隐私空间对应的桌面从后台切换到前台,因此,该隐私空间对应的桌面可以是用户设置的桌面,并不是固定的桌面,从而能够提高用户体验。With the solution of this application, when the electronic device is eager to enter the private space, since the desktop corresponding to the private space runs in the background of the electronic device, the electronic device may not reload the desktop corresponding to the private space, but switch the desktop corresponding to the private space to Foreground, so that the application icons on the desktop corresponding to the private space do not need to be reloaded and the wallpaper of the private space does not need to be redrawn, so that it can avoid loading the application icons on the desktop corresponding to the private space one by one, and avoid the mobile phone from displaying a black screen, Furthermore, the time for the mobile phone to switch the private space can be shortened, the efficiency of switching the private space can be improved, and user experience can be improved. In addition, because the electronic device does not reload the desktop corresponding to the private space, but switches the desktop corresponding to the private space from the background to the foreground, therefore, the desktop corresponding to the private space may be a desktop set by the user, not a fixed desktop, thus Can improve user experience.

例如,图12示出了一种电子设备登录账号的切换装置1200的结构示意图,如图12所示,该电子设备登录账号的切换装置1200可以包括:接收模块1201、获取模块1202、显示模块1203和加载模块1204等。For example, FIG. 12 shows a schematic structural diagram of an apparatus 1200 for switching an electronic device login account. As shown in FIG. and load module 1204 etc.

其中,接收模块1201,可以用于接收用户的第一操作,第一操作用于触发从第二账号切换到第一账号,第二账号为所述电子设备当前登录的账号。Wherein, the receiving module 1201 may be configured to receive a first operation of the user, the first operation is used to trigger switching from the second account to the first account, and the second account is the account currently logged in by the electronic device.

获取模块1202,可以用于响应于第一操作,电子设备获取第二账号对应的活动。The obtaining module 1202 may be configured to, in response to the first operation, the electronic device obtain activities corresponding to the second account.

显示模块1203,可以用于在第二账号对应的活动中包括第二账号的桌面对应的活动,且第一账号的桌面在电子设备的后台运行的情况下,电子设备显示第一账号的桌面,第一账号的桌面是电子设备在接收用户的第一操作之前加载的。The display module 1203 may be used to display the desktop of the first account on the electronic device when the activities corresponding to the second account include activities corresponding to the desktop of the second account, and the desktop of the first account is running in the background of the electronic device, The desktop of the first account is loaded by the electronic device before receiving the user's first operation.

加载模块1204,可以用于根据第一数据,加载第一账号对应的内容。The loading module 1204 may be configured to load content corresponding to the first account according to the first data.

显示模块1203,还可以用于在第一账号的桌面上显示第一账号对应的内容。The display module 1203 may also be configured to display content corresponding to the first account on the desktop of the first account.

在另一种可能的实现方式中,接收模块1201,还可以用于接收用户触发切换到第一账号的第二操作。加载模块1204,还可以用于响应于第二操作,电子设备根据第一数据,加载第一账号的桌面,并根据第一数据加载第一账号对应的内容。显示模块1203,还可以用于在第一账号的桌面上显示第一账号对应的内容。上述电子设备还可以包括存储模块1205。存储模块1205,可以用于存储加载的第一账号的桌面。In another possible implementation manner, the receiving module 1201 may also be configured to receive a second operation triggered by the user to switch to the first account. The loading module 1204 may also be configured to: in response to the second operation, the electronic device load the desktop of the first account according to the first data, and load the content corresponding to the first account according to the first data. The display module 1203 may also be configured to display content corresponding to the first account on the desktop of the first account. The foregoing electronic device may further include a storage module 1205 . The storage module 1205 may be used to store the loaded desktop of the first account.

接收模块1201,还可以用于接收用户触发从第一账号切换到其他账号的第三操作。上述电子设备还可以包括切换模块1206。切换模块1206,可以用于响应于第三操作,将电子设备当前登录的账号从第一账号切换到其他账号。The receiving module 1201 may also be configured to receive a third operation triggered by the user to switch from the first account to another account. The electronic device above may further include a switching module 1206 . The switching module 1206 may be configured to switch the account currently logged in by the electronic device from the first account to another account in response to the third operation.

在另一种可能的实现方式中,上述电子设备还可以包括记录模块1207。记录模块1207,可以用于记录切换标记,切换标记用于指示第一账号的桌面在电子设备的后台运行。上述电子设备还可以包括确定模块。上述电子设备还可以包括确定模块1208。确定模块1208,可以用于根据切换标记,确定第一账号的桌面在电子设备的后台运行。In another possible implementation manner, the foregoing electronic device may further include a recording module 1207 . The recording module 1207 may be configured to record a switching flag, and the switching flag is used to indicate that the desktop of the first account is running in the background of the electronic device. The above-mentioned electronic device may further include a determining module. The electronic device above may further include a determining module 1208 . The determining module 1208 may be configured to determine that the desktop of the first account is running in the background of the electronic device according to the switching flag.

在另一种可能的实现方式中,第一账号为电子设备上的隐私空间对应的账号。In another possible implementation manner, the first account is an account corresponding to a private space on the electronic device.

应理解以上装置中单元或模块(以下均称为单元)的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。It should be understood that the division of units or modules (hereinafter referred to as units) in the above device is only a division of logical functions, and may be fully or partially integrated into a physical entity or physically separated during actual implementation. And the units in the device can all be implemented in the form of software called by the processing element; they can also be implemented in the form of hardware; some units can also be implemented in the form of software called by the processing element, and some units can be implemented in the form of hardware.

例如,各个单元可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件又可以称为处理器,可以是一种具有信号的处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。For example, each unit can be a separate processing element, or it can be integrated in a certain chip of the device. In addition, it can also be stored in the memory in the form of a program, which is called and executed by a certain processing element of the device. Function. In addition, all or part of these units can be integrated together, or implemented independently. The processing element described here may also be referred to as a processor, and may be an integrated circuit with a signal processing capability. In the process of implementation, each step of the above method or each unit above may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software called by the processing element.

在一个例子中,以上装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或这些集成电路形式中至少两种的组合。In one example, the units in the above device may be one or more integrated circuits configured to implement the above method, for example: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, Or a combination of at least two of these integrated circuit forms.

再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如CPU或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。For another example, when the units in the device can be implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a CPU or other processors that can call programs. For another example, these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).

在一种实现中,以上装置实现以上方法中各个对应步骤的单元可以通过处理元件调度程序的形式实现。例如,该装置可以包括处理元件和存储元件,处理元件调用存储元件存储的程序,以执行以上方法实施例所述的方法。存储元件可以为与处理元件处于同一芯片上的存储元件,即片内存储元件。In one implementation, the units of the above apparatus for implementing each corresponding step in the above method may be implemented in the form of a processing element scheduler. For example, the apparatus may include a processing element and a storage element, and the processing element invokes a program stored in the storage element to execute the methods described in the above method embodiments. The storage element may be a storage element on the same chip as the processing element, that is, an on-chip storage element.

在另一种实现中,用于执行以上方法的程序可以在与处理元件处于不同芯片上的存储元件,即片外存储元件。此时,处理元件从片外存储元件调用或加载程序于片内存储元件上,以调用并执行以上方法实施例所述的方法。In another implementation, the program for executing the above method may be stored in a storage element on a different chip from the processing element, that is, an off-chip storage element. At this point, the processing element invokes or loads a program from the off-chip storage element to the on-chip storage element, so as to invoke and execute the methods described in the above method embodiments.

例如,本申请实施例还可以提供一种装置,如:电子设备,可以包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如前述实施例所述的虚拟卡切换方法。该存储器可以位于该电子设备之内,也可以位于该电子设备之外。且该处理器包括一个或多个。For example, an embodiment of the present application may also provide an apparatus, such as an electronic device, which may include a processor, and a memory configured to store instructions executable by the processor. When the processor is configured to execute the above instructions, the electronic device implements the virtual card switching method as described in the foregoing embodiments. The memory can be located inside the electronic device or outside the electronic device. And the processor includes one or more.

在又一种实现中,该装置实现以上方法中各个步骤的单元可以是被配置成一个或多个处理元件,这些处理元件可以设置于对应上述的电子设备上,这里的处理元件可以为集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或者这些类集成电路的组合。这些集成电路可以集成在一起,构成芯片。In yet another implementation, the unit of the apparatus that implements each step in the above method may be configured as one or more processing elements, and these processing elements may be set on the corresponding electronic equipment described above, where the processing elements may be integrated circuits , for example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits can be integrated together to form a chip.

例如,本申请实施例还提供一种芯片,该芯片可以应用于上述电子设备。芯片包括一个或多个接口电路和一个或多个处理器;接口电路和处理器通过线路互联;处理器通过接口电路从电子设备的存储器接收并执行计算机指令,以实现以上方法实施例中所述的方法。For example, an embodiment of the present application further provides a chip, and the chip can be applied to the above-mentioned electronic device. The chip includes one or more interface circuits and one or more processors; the interface circuits and processors are interconnected through lines; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuits, so as to implement the method described in the above embodiment Methods.

本申请实施例还提供一种计算机程序产品,包括如上述电子设备运行的计算机指令。An embodiment of the present application further provides a computer program product, including computer instructions for running the above-mentioned electronic device.

通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,如:程序。该软件产品存储在一个程序产品,如计算机可读存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such an understanding, the essence of the technical solutions of the embodiments of the present application or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of software products, such as programs. The software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all of the methods described in various embodiments of the present application. or partial steps. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

例如,本申请实施例还可以提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如前述方法实施例中所述的虚拟卡切换方法。For example, the embodiments of the present application may also provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by the electronic device, the electronic device is made to implement the virtual card switching method described in the foregoing method embodiments.

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

Claims (7)

1.一种电子设备登录账号的切换方法,其特征在于,应用于电子设备,所述电子设备包括多个账号,所述多个账号包括第一账号和第二账号;所述第一账号对应的存储空间为隐私空间,所述第二账号对应的存储空间为普通空间;所述第一账号对应的存储空间存储有第一数据,所述方法包括:1. A method for switching login accounts of an electronic device, which is characterized in that it is applied to an electronic device, and the electronic device includes a plurality of accounts, and the plurality of accounts includes a first account and a second account; the first account corresponds to The storage space corresponding to the second account is a private space, and the storage space corresponding to the second account is a common space; the storage space corresponding to the first account stores first data, and the method includes: 所述电子设备接收用户的第一操作,所述第一操作用于触发从所述第二账号切换到所述第一账号,所述第二账号为所述电子设备当前登录的账号;The electronic device receives a first operation of the user, the first operation is used to trigger switching from the second account to the first account, the second account is the account currently logged in by the electronic device; 响应于所述第一操作,所述电子设备获取所述第二账号对应的活动;In response to the first operation, the electronic device acquires activities corresponding to the second account; 在所述第二账号对应的活动中包括所述第二账号的桌面对应的活动,且所述第一账号的桌面在所述电子设备的后台运行的情况下,所述电子设备显示所述第一账号的桌面,所述第一账号的桌面是所述电子设备在接收用户的所述第一操作之前加载的;When the activities corresponding to the second account include activities corresponding to the desktop of the second account, and the desktop of the first account is running in the background of the electronic device, the electronic device displays the second account. A desktop of an account, the desktop of the first account is loaded by the electronic device before receiving the first operation of the user; 所述电子设备根据所述第一数据,加载并在所述第一账号的桌面上显示所述第一账号对应的内容。The electronic device loads and displays content corresponding to the first account on the desktop of the first account according to the first data. 2.根据权利要求1所述的方法,其特征在于,在所述电子设备接收用户的第一操作之前,所述方法还包括:2. The method according to claim 1, characterized in that, before the electronic device receives the user's first operation, the method further comprises: 所述电子设备接收用户触发切换到所述第一账号的第二操作;The electronic device receives a second operation triggered by the user to switch to the first account; 响应于所述第二操作,所述电子设备根据所述第一数据,加载所述第一账号的桌面,并根据所述第一数据加载并在所述第一账号的桌面上显示所述第一账号对应的内容;In response to the second operation, the electronic device loads the desktop of the first account according to the first data, and loads and displays the first account on the desktop of the first account according to the first data. Content corresponding to an account; 所述电子设备存储加载的所述第一账号的桌面;The electronic device stores the loaded desktop of the first account; 所述电子设备接收用户触发从所述第一账号切换到其他账号的第三操作;The electronic device receives a third operation triggered by the user to switch from the first account to another account; 响应于所述第三操作,所述电子设备将所述电子设备当前登录的账号从所述第一账号切换到所述其他账号。In response to the third operation, the electronic device switches an account currently logged in by the electronic device from the first account to the other account. 3.根据权利要求2所述的方法,其特征在于,在所述电子设备根据所述第一数据,加载所述第一账号的桌面之后,所述方法还包括:3. The method according to claim 2, wherein after the electronic device loads the desktop of the first account according to the first data, the method further comprises: 所述电子设备记录切换标记,所述切换标记用于指示所述第一账号的桌面在所述电子设备的后台运行;The electronic device records a switching flag, and the switching flag is used to indicate that the desktop of the first account is running in the background of the electronic device; 在所述电子设备显示所述第一账号的桌面之前,所述方法还包括:Before the electronic device displays the desktop of the first account, the method further includes: 所述电子设备根据所述切换标记,确定所述第一账号的桌面在所述电子设备的后台运行。The electronic device determines, according to the switching flag, that the desktop of the first account is running in the background of the electronic device. 4.一种电子设备,其特征在于,所述电子设备包括处理器,用于存储所述处理器可执行指令的存储器;所述处理器被配置为执行所述指令时,使得所述电子设备实现如下操作:4. An electronic device, characterized in that the electronic device comprises a processor, a memory for storing instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device Implement the following operations: 接收用户的第一操作,所述第一操作用于触发从第二账号切换到第一账号,所述第二账号为所述电子设备当前登录的账号;其中,所述第一账号对应的存储空间为隐私空间,所述第二账号对应的存储空间为普通空间;所述第一账号对应的存储空间存储有第一数据;receiving a first operation of the user, the first operation is used to trigger switching from a second account to a first account, and the second account is the account currently logged in by the electronic device; wherein, the storage corresponding to the first account The space is a private space, the storage space corresponding to the second account is a common space; the storage space corresponding to the first account stores the first data; 响应于所述第一操作,所述电子设备获取所述第二账号对应的活动;In response to the first operation, the electronic device acquires activities corresponding to the second account; 在所述第二账号对应的活动中包括所述第二账号的桌面对应的活动,且所述第一账号的桌面在所述电子设备的后台运行的情况下,显示所述第一账号的桌面,所述第一账号的桌面是所述电子设备在接收用户的所述第一操作之前加载的;When the activities corresponding to the second account include activities corresponding to the desktop of the second account, and the desktop of the first account is running in the background of the electronic device, displaying the desktop of the first account , the desktop of the first account is loaded by the electronic device before receiving the user's first operation; 根据所述第一数据,加载并在所述第一账号的桌面上显示所述第一账号对应的内容。According to the first data, load and display the content corresponding to the first account on the desktop of the first account. 5.根据权利要求4所述的电子设备,其特征在于,所述处理器被配置为执行所述指令时,还使得所述电子设备实现如下操作:5. The electronic device according to claim 4, wherein when the processor is configured to execute the instruction, it also enables the electronic device to implement the following operations: 接收用户触发切换到所述第一账号的第二操作;receiving a second operation triggered by the user to switch to the first account; 响应于所述第二操作,根据所述第一数据,加载所述第一账号的桌面,并根据所述第一数据加载并在所述第一账号的桌面上显示所述第一账号对应的内容;In response to the second operation, load the desktop of the first account according to the first data, and load and display the desktop corresponding to the first account according to the first data and display on the desktop of the first account. content; 存储加载的所述第一账号的桌面;storing the loaded desktop of the first account; 接收用户触发从所述第一账号切换到其他账号的第三操作;receiving a third operation triggered by the user to switch from the first account to another account; 响应于所述第三操作,将所述电子设备当前登录的账号从所述第一账号切换到所述其他账号。In response to the third operation, the account currently logged in by the electronic device is switched from the first account to the other account. 6.根据权利要求5所述的电子设备,其特征在于,所述处理器被配置为执行所述指令时,还使得所述电子设备实现如下操作:6. The electronic device according to claim 5, wherein when the processor is configured to execute the instruction, it also enables the electronic device to implement the following operations: 记录切换标记,所述切换标记用于指示所述第一账号的桌面在所述电子设备的后台运行;Recording a switching flag, where the switching flag is used to indicate that the desktop of the first account is running in the background of the electronic device; 根据所述切换标记,确定所述第一账号的桌面在所述电子设备的后台运行。According to the switching flag, it is determined that the desktop of the first account is running in the background of the electronic device. 7.一种计算机可读存储介质,其上存储有计算机程序指令;其特征在于,7. A computer-readable storage medium on which computer program instructions are stored; it is characterized in that, 当所述计算机程序指令被电子设备执行时,使得电子设备实现如权利要求1至3中任一项所述的方法。When the computer program instructions are executed by the electronic device, the electronic device is made to implement the method according to any one of claims 1-3.
CN202111390076.6A 2021-11-22 2021-11-22 Switching method for login account of electronic equipment and electronic equipment Active CN115017487B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111390076.6A CN115017487B (en) 2021-11-22 2021-11-22 Switching method for login account of electronic equipment and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111390076.6A CN115017487B (en) 2021-11-22 2021-11-22 Switching method for login account of electronic equipment and electronic equipment

Publications (2)

Publication Number Publication Date
CN115017487A CN115017487A (en) 2022-09-06
CN115017487B true CN115017487B (en) 2023-03-28

Family

ID=83064588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111390076.6A Active CN115017487B (en) 2021-11-22 2021-11-22 Switching method for login account of electronic equipment and electronic equipment

Country Status (1)

Country Link
CN (1) CN115017487B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118838515A (en) * 2023-04-23 2024-10-25 华为技术有限公司 Multi-desktop switching method, electronic device and readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110231975A (en) * 2019-06-20 2019-09-13 京东方科技集团股份有限公司 A kind of applied program processing method, device and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104350723B (en) * 2014-05-22 2017-09-08 华为技术有限公司 The method and device that account is logged in
CN105915491A (en) * 2015-11-18 2016-08-31 乐视网信息技术(北京)股份有限公司 Account number login method and device
CN106056001A (en) * 2016-07-21 2016-10-26 北京奇虎科技有限公司 Private data protection method and apparatus based on mobile terminal and mobile terminal
CN111466099B (en) * 2018-09-03 2022-12-27 华为技术有限公司 Login method, token sending method, device and storage medium
CN112860322B (en) * 2019-11-26 2022-04-26 成都鼎桥通信技术有限公司 Operating system switching method, device, equipment and storage medium
CN111131619B (en) * 2019-12-30 2021-04-27 广州酷狗计算机科技有限公司 Account switching processing method, device and system
CN112596883B (en) * 2020-12-25 2023-10-24 深圳市欢太科技有限公司 Application switching method and device, storage medium and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110231975A (en) * 2019-06-20 2019-09-13 京东方科技集团股份有限公司 A kind of applied program processing method, device and electronic equipment

Also Published As

Publication number Publication date
CN115017487A (en) 2022-09-06

Similar Documents

Publication Publication Date Title
US20240118781A1 (en) Method of processing content and electronic device thereof
US10235945B2 (en) Apparatus and method for controlling display in electronic device having processors
CN108476257A (en) Electronic equipment and the method for managing its application program
CN112860145B (en) Application control method and electronic equipment
CN114816167B (en) Application icon display method, electronic device and readable storage medium
CN115017534B (en) File processing authority control method, device and storage medium
WO2023005751A1 (en) Rendering method and electronic device
CN113835569A (en) Terminal device, quick start method for internal function of application and storage medium
CN112114883A (en) Terminal awakening method, terminal and computer storage medium
CN115017487B (en) Switching method for login account of electronic equipment and electronic equipment
CN118244950B (en) Widget display method and electronic equipment
CN113536387A (en) Terminal and method for detecting integrity of kernel data
CN111159734A (en) Communication terminal and multi-application data inter-access processing method
CN116339562B (en) A quick input method and electronic device
CN116743908B (en) Wallpaper display method and related device
CN118433300B (en) A method for displaying notification message and electronic device
CN113806727B (en) Switching method for login account of electronic equipment and electronic equipment
CN116737037B (en) Stack management method in interface display and related device
US20250103177A1 (en) Application clone-based interface display method and related apparatus
CN111142648B (en) Data processing method and intelligent terminal
CN119690551A (en) A method for displaying multiple application windows and electronic device
CN119248390A (en) Card display method, electronic device and computer readable storage medium
WO2025091976A1 (en) Electronic device and information processing method thereof, and medium
WO2025139399A1 (en) Method for processing push message and electronic device
CN120238568A (en) Method for processing push message and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change 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

CP03 Change of name, title or address