CN115562743B - Application program loading method and electronic device - Google Patents
Application program loading method and electronic device Download PDFInfo
- Publication number
- CN115562743B CN115562743B CN202210334531.9A CN202210334531A CN115562743B CN 115562743 B CN115562743 B CN 115562743B CN 202210334531 A CN202210334531 A CN 202210334531A CN 115562743 B CN115562743 B CN 115562743B
- Authority
- CN
- China
- Prior art keywords
- application
- broadcast
- message
- virtual screen
- 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
Links
- 238000011068 loading method Methods 0.000 claims abstract description 104
- 238000000034 method Methods 0.000 claims description 166
- 230000008569 process Effects 0.000 claims description 99
- 238000004590 computer program Methods 0.000 claims description 8
- 230000004044 response Effects 0.000 claims description 6
- 230000000670 limiting effect Effects 0.000 claims description 2
- 238000007726 management method Methods 0.000 description 123
- 230000036316 preload Effects 0.000 description 60
- 238000012795 verification Methods 0.000 description 26
- 238000002360 preparation method Methods 0.000 description 25
- 238000012545 processing Methods 0.000 description 23
- 230000006870 function Effects 0.000 description 21
- 230000006399 behavior Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 12
- 238000012544 monitoring process Methods 0.000 description 10
- 230000026676 system process Effects 0.000 description 9
- 239000003795 chemical substances by application Substances 0.000 description 7
- 238000009877 rendering Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 238000013473 artificial intelligence Methods 0.000 description 3
- 239000011230 binding agent Substances 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000012216 screening Methods 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 2
- 230000001934 delay Effects 0.000 description 2
- 235000019800 disodium phosphate Nutrition 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000002829 reductive effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000003786 synthesis reaction Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005266 casting Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000036961 partial effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域Technical field
本申请涉及电子设备领域,尤其涉及一种应用程序加载方法及电子设备。The present application relates to the field of electronic equipment, and in particular, to an application loading method and electronic equipment.
背景技术Background technique
随着智能手机的不断发展,性能不断升级,功能也不断丰富,人们使用智能手机的频率越来越高。一般智能手机通过内部安装的各种应用程序(application,APP)来实现丰富的功能。例如,用户可以通过智能手机上安装的有声书类APP收听有声小说或播客等。又例如,用户可以通过智能手机上安装的导航类APP进行出行导航、查看实时路况等。With the continuous development of smart phones, their performance has been continuously upgraded and their functions have been continuously enriched. People use smart phones more and more frequently. Generally, smart phones realize rich functions through various applications (applications, APPs) installed inside. For example, users can listen to audio novels or podcasts through audiobook apps installed on smartphones. For another example, users can conduct travel navigation, check real-time traffic conditions, etc. through the navigation APP installed on their smartphones.
目前市场上的智能手机在冷启动应用程序的时候都会等待一段时间,等智能手机将该应用程序加载完成之后才能显示到用户期望的可操作的界面。其中游戏类应用程序的启动等待时间更是长达15-30秒,影响用户的体验。Smartphones currently on the market will wait for a period of time when cold-starting an application. Only after the smartphone has completed loading the application can the user's expected operable interface be displayed. Among them, the waiting time for game applications to start is as long as 15-30 seconds, which affects the user experience.
发明内容Contents of the invention
本申请提供一种应用程序加载方法及电子设备,解决了用户打开常用应用程序时需要等待应用程序加载的问题。This application provides an application loading method and electronic device, which solves the problem that users need to wait for application loading when opening commonly used applications.
为了达到上述目的,本申请采用如下技术方案:In order to achieve the above objectives, this application adopts the following technical solutions:
第一方面,本申请提供一种应用程序加载方法,应用于电子设备,电子设备包括显示屏和虚拟屏,电子设备安装有多个应用程序,方法包括:将至少一个应用程序加载到虚拟屏上,至少一个应用程序在加载到虚拟屏后,显示屏不显示至少一个应用程序的界面,至少一个应用程序包括第一应用程序;在第一时刻拦截第一应用程序向接收方发送的第一消息和/或广播;在第一消息和/或广播为非及时性消息时,保存第一消息和/或广播;在第二时刻接收到用户启动第一应用程序的操作;响应于用户启动第一应用程序的操作,将第一应用程序从虚拟屏切换至显示屏,在显示屏上显示第一应用程序的界面,并向接收方发送保存的第一消息和/或广播,第二时刻晚于第一时刻。In a first aspect, this application provides an application loading method, which is applied to an electronic device. The electronic device includes a display screen and a virtual screen. The electronic device is installed with multiple applications. The method includes: loading at least one application program onto the virtual screen. , after at least one application program is loaded into the virtual screen, the display screen does not display the interface of the at least one application program, and the at least one application program includes the first application program; intercepting the first message sent by the first application program to the recipient at the first moment and/or broadcast; when the first message and/or broadcast is a non-timely message, save the first message and/or broadcast; receive the user's operation of starting the first application at the second moment; respond to the user starting the first application The operation of the application program switches the first application program from the virtual screen to the display screen, displays the interface of the first application program on the display screen, and sends the saved first message and/or broadcast to the recipient, and the second moment is later than The first moment.
采用上述技术方案,电子设备可以对用户的操作行为进行预测,以在用户启动某个应用程序之前,先对该应用程序进行预加载。从而当用户想要启动相应的应用程序时,电子设备能够直接将相应的应用程序的可操作界面显示在主屏上,从而减小用户启动相应用程序的感知时间(启动应用程序的感知时间,即从用户对应用程序进行启动操作到电子设备主屏显示该应用程序的可操作界面所经历的时间)。如此,能够提高用户启动应用程序时的流畅体验,提高电子设备在用户启动应用程序时的响应速度。并且,能够在应用程序加载到虚拟屏上时,对应用程序的相关资源进行管控,从而避免加载到虚拟屏上的应用程序对用户正常使用的应用程序造成干扰。例如,对加载到虚拟屏上的应用程序发送的消息或广播进行管控,从而避免相应的应用程序与其他应用程序或系统进程交互,从而实现加载到虚拟屏上的应用程序不被用户感知。Using the above technical solution, the electronic device can predict the user's operation behavior and preload the application before the user starts the application. Therefore, when the user wants to start the corresponding application program, the electronic device can directly display the operable interface of the corresponding application program on the home screen, thereby reducing the user's perceived time for starting the corresponding application program (the perceived time for starting the application program, that is, The time elapsed from the time the user launches the application to the time the electronic device displays the operable interface of the application on the home screen). In this way, the smooth experience when the user starts the application can be improved, and the response speed of the electronic device when the user starts the application can be improved. Moreover, when the application is loaded on the virtual screen, the relevant resources of the application can be managed and controlled, thereby preventing the application loaded on the virtual screen from interfering with the application normally used by the user. For example, the messages or broadcasts sent by applications loaded on the virtual screen are controlled to prevent the corresponding applications from interacting with other applications or system processes, so that the applications loaded on the virtual screen are not perceived by the user.
在一种可能的实现方式中,显示屏为电子设备的实际屏幕,显示屏显示的画面用户可见,虚拟屏为电子设备的模拟屏幕,虚拟屏显示的画面用户不可见。In one possible implementation, the display screen is an actual screen of the electronic device, and the images displayed on the display screen are visible to the user. The virtual screen is a simulated screen of the electronic device, and the images displayed on the virtual screen are invisible to the user.
其中,对于应用程序的加载而言,虚拟屏和显示屏没有区别,应用程序均能够通过系统的启动进程正常的加载到虚拟屏和显示屏上。只是虚拟屏为模拟屏幕其上的画面用户不可见。Among them, there is no difference between the virtual screen and the display screen when it comes to loading applications. Applications can be loaded onto the virtual screen and display screen normally through the system startup process. It’s just that the virtual screen is a simulated screen and the images on it are not visible to the user.
在另一种可能的实现方式中,虚拟屏与显示屏对应。In another possible implementation, the virtual screen corresponds to the display screen.
示例地,虚拟屏和显示屏对应可以是:分辨率、尺寸等一致。For example, the virtual screen and the display screen may have the same resolution and size.
在另一种可能的实现方式中,方法还包括:在第三时刻拦截到第一应用程序接收的第二消息和/或广播,第二时刻晚于第三时刻;在第二消息和/或广播为非及时性消息时,保存第二消息和/或广播;在第二时刻接收到用户启动第一应用程序的操作之后,方法还包括:向第一应用程序发送保存的第二消息和/或广播。In another possible implementation, the method further includes: intercepting a second message and/or broadcast received by the first application at a third moment, where the second moment is later than the third moment; When the broadcast is a non-timely message, save the second message and/or broadcast; after receiving the user's operation to start the first application at the second moment, the method also includes: sending the saved second message and/or to the first application. or broadcast.
如此,能够对加载到虚拟屏上的应用程序接收的消息或广播进行管控,从而避免相应的应用程序与其他应用程序或系统进程交互,从而实现加载到虚拟屏上的应用程序不被用户感知。In this way, the messages or broadcasts received by the applications loaded on the virtual screen can be controlled, thereby preventing the corresponding applications from interacting with other applications or system processes, so that the applications loaded on the virtual screen are not perceived by the user.
在另一种可能的实现方式中,在保存第一消息和/或广播时,与之前保存的同类型的消息和/或广播合并;在保存第二消息和/或广播时,与之前保存的同类型的消息和/或广播合并。In another possible implementation, when saving the first message and/or broadcast, merge it with the previously saved message and/or broadcast; when saving the second message and/or broadcast, merge it with the previously saved message and/or broadcast. Messages and/or broadcasts of the same type are merged.
如此,能够通过同类型消息或广播等进行合并,节省存储空间占用。In this way, messages or broadcasts of the same type can be merged to save storage space.
在另一种可能的实现方式中,在保存第一消息和/或广播时,替换之前保存的同类型的消息和/或广播;在保存第二消息和/或广播时,替换之前的同类型的消息和/或广播。In another possible implementation, when saving the first message and/or broadcast, replace the previously saved message and/or broadcast of the same type; when saving the second message and/or broadcast, replace the previous saved message and/or broadcast of the same type. messages and/or broadcasts.
如此,能够通过同类型消息或广播等进行替换,节省存储空间占用,并保持该类型消息或广播为最新消息,保证其时效性。In this way, messages or broadcasts of the same type can be replaced, saving storage space, and messages or broadcasts of this type can be kept as the latest news to ensure their timeliness.
在另一种可能的实现方式中,方法还包括:在第一消息和/或广播为及时性消息时,丢弃第一消息和/或广播;在第二消息和/或广播为及时性消息时,丢弃第二消息和/或广播。In another possible implementation, the method further includes: when the first message and/or broadcast is a timely message, discarding the first message and/or broadcast; when the second message and/or broadcast is a timely message , discard the second message and/or broadcast.
如此,由于及时性的消息在后续将应用程序切换到显示屏时可能已经失效,因此将及时性的消息或广播丢弃能够避免节省存储空间占用。In this way, since the timely message may have expired when the application is subsequently switched to the display screen, discarding the timely message or broadcast can avoid saving storage space.
在另一种可能的实现方式中,在第二时刻接收到用户启动第一应用程序的操作之前,方法还包括:将第一应用程序的进程分组设为后台分组;将第一应用程序的进程的优先级值设置为第一数值,第一数值小于预设值,优先级值越小时进程的优先级越高。In another possible implementation, before receiving the user's operation to start the first application at the second moment, the method further includes: setting the process group of the first application as a background group; The priority value is set to the first value, and the first value is smaller than the preset value. The smaller the priority value, the higher the priority of the process.
其中,进程的优先级值可以是进程的adj值。预设值可以是可感知进程对应adj值。当优先级越高时,进程越不容易被后台清理掉。因此,通过将第一应用程序的进程的优先级值设置为小于预设值的第一数值,能够避免第一应用程序的进程被轻易清理掉。如此,能够在应用程序加载到虚拟屏之后,通过设置其为后台分组和可感知进程来避免该应用程序占用过多的系统资源,同时可以避免该应用程序的相关进程因不可感知而轻易被系统后台管理机制清理掉。即实现加载到虚拟屏上的应用程序能够保活且占用较少系统资源。Among them, the priority value of the process can be the adj value of the process. The default value can be the adj value corresponding to the perceptible process. When the priority is higher, the process is less likely to be cleaned up in the background. Therefore, by setting the priority value of the process of the first application program to a first value smaller than the preset value, it is possible to prevent the process of the first application program from being easily cleaned up. In this way, after the application is loaded on the virtual screen, it can be set as a background group and a perceptible process to prevent the application from occupying too many system resources. The background management mechanism is cleared. That is, applications loaded on the virtual screen can be kept alive and occupy less system resources.
在另一种可能的实现方式中,在第二时刻接收到用户启动第一应用程序的操作之前,方法还包括:对第一应用程序接收的通知进行缓存,以使通知不显示;方法还包括:响应于用户启动第一应用程序的操作,在显示屏上显示上述通知。In another possible implementation, before receiving the user's operation to start the first application at the second moment, the method further includes: caching the notification received by the first application so that the notification is not displayed; the method further includes: : In response to the user's operation of starting the first application, display the above notification on the display screen.
如此,能够对加载到虚拟屏上的应用程序接收到的通知进行管控,从而避免应用程序接收到通知后,通知被显示到显示屏显示的通知栏而被用户看到。从而实现应用程序加载到虚拟屏上不被用户感知。In this way, the notifications received by the application loaded on the virtual screen can be controlled, thereby preventing the notification from being displayed on the notification bar displayed on the display screen and being seen by the user after the application receives the notification. This allows applications to be loaded onto the virtual screen without being perceived by the user.
在另一种可能的实现方式中,对第一应用程序接收的通知进行缓存包括:拦截第一应用程序接收的通知;对通知进行缓存。In another possible implementation manner, caching the notification received by the first application program includes: intercepting the notification received by the first application program; and caching the notification.
在另一种可能的实现方式中,对通知进行缓存时抹去通知的时间。In another possible implementation, the notification's time is erased when the notification is cached.
如此,能够在后续将第一应用程序切换到显示屏进行显示解除对其进行的资源管控时,重新对相应的通知添加时间,从而避免用户看到通知的时间与显示到显示屏时的时间不一致。In this way, when the first application is subsequently switched to the display screen for display and the resource management and control on it is released, the time can be re-added to the corresponding notification, thereby preventing the time when the user sees the notification from being inconsistent with the time when it is displayed on the display screen. .
在另一种可能的实现方式中,在第二时刻接收到用户启动第一应用程序的操作之前,方法还包括:检测到第一应用程序的弹窗;当弹窗为对话框时,指定对话框到虚拟屏;当弹窗为提示弹窗时,丢弃提示弹窗,提示弹窗为显示后会自动消失的弹窗。In another possible implementation, before receiving the user's operation to start the first application at the second moment, the method further includes: detecting a pop-up window of the first application; when the pop-up window is a dialog box, specifying the dialog frame to the virtual screen; when the pop-up window is a prompt pop-up window, the prompt pop-up window is discarded. The prompt pop-up window is a pop-up window that will automatically disappear after being displayed.
如此,能够对加载到虚拟屏的应用程序的弹窗进行管控。从而避免应用程序的弹窗显示到显示屏上而被用户看到。实现应用程序加载到虚拟屏时用户不可感知。In this way, pop-up windows of applications loaded onto the virtual screen can be controlled. This prevents the pop-up window of the application from being displayed on the display and seen by the user. This makes it invisible to the user when the application is loaded onto the virtual screen.
在另一种可能的实现方式中,指定对话框到虚拟屏,包括:将对话框关联的屏幕参数修改为虚拟屏对应的虚拟屏参数。In another possible implementation, assigning the dialog box to the virtual screen includes: modifying the screen parameters associated with the dialog box to the virtual screen parameters corresponding to the virtual screen.
如此,能够重新指定显示的屏幕为虚拟屏来便捷的将对话框指定到虚拟屏。In this way, the displayed screen can be reassigned as a virtual screen to conveniently assign the dialog box to the virtual screen.
在另一种可能的实现方式中,在第二时刻接收到用户启动第一应用程序的操作之前,方法还包括:隐藏第一应用程序的快照。In another possible implementation, before receiving an operation of the user to start the first application at the second moment, the method further includes: hiding the snapshot of the first application.
通常,应用程序加载后,电子设备会保存该应用程序界面的快照,以便于用户在进入多任务管理界面时看到对应的应用程序。因此,通过隐藏第一应用程序的快照,能够避免用户在进入多任务管理界面时看到加载到虚拟屏上的第一应用程序,从而实现加载到虚拟屏上的应用程序不被用户感知。Usually, after an application is loaded, the electronic device saves a snapshot of the application interface so that the user can see the corresponding application when entering the multi-task management interface. Therefore, by hiding the snapshot of the first application, it is possible to prevent the user from seeing the first application loaded on the virtual screen when entering the multi-task management interface, so that the application loaded on the virtual screen is not perceived by the user.
在另一种可能的实现方式中,在第二时刻接收到用户启动第一应用程序的操作之前第一应用程序的界面仅绘制不渲染。In another possible implementation, before receiving the user's operation to start the first application at the second moment, the interface of the first application is only drawn but not rendered.
如此,能够减小电子设备的渲染压力,从而降低电子设备功耗,避免电子设备卡顿。In this way, the rendering pressure of the electronic device can be reduced, thereby reducing the power consumption of the electronic device and preventing the electronic device from lagging.
在另一种可能的实现方式中,将至少一个应用程序加载到虚拟屏上时,限制电子设备的处理器提频。In another possible implementation manner, when at least one application is loaded onto the virtual screen, the frequency increase of the processor of the electronic device is limited.
如此,当应用程序向虚拟屏上加载时,避免电子设备处理器提频,从而降低应用程序向虚拟屏上加载时的资源占用,避免电子设备卡顿。In this way, when the application program is loaded onto the virtual screen, the frequency increase of the processor of the electronic device is avoided, thereby reducing the resource usage when the application program is loaded onto the virtual screen and preventing the electronic device from lagging.
第二方面,本申请实施例提供一种电子设备,包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的应用程序加载方法。In a second aspect, embodiments of the present application provide 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 application loading method as described in the first aspect or any one of the possible implementations of the first aspect.
第三方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的应用程序加载方法。In a third aspect, embodiments of the present application 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 caused to implement the application loading method as described in the first aspect or any one of the possible implementations of the first aspect.
第四方面,本申请实施例提供一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的应用程序加载方法。In a fourth aspect, embodiments of the present application provide a computer program product, including a computer readable code. When the computer readable code is run in an electronic device, the electronic device enables the electronic device to implement the first aspect or the possible implementation of the first aspect. Implement the application loading method described in any of the methods.
应当理解的是,上述第二方面至第四方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It should be understood that the beneficial effects of the above-mentioned second to fourth aspects can be referred to the relevant descriptions in the above-mentioned first aspect, and will not be described again here.
附图说明Description of the drawings
图1为现有技术提供的一种应用程序启动的界面示意图;Figure 1 is a schematic diagram of an application startup interface provided by the prior art;
图2为现有技术提供的另一种应用程序启动的界面示意图;Figure 2 is a schematic diagram of another application startup interface provided by the prior art;
图3为现有技术提供的另一种应用程序启动的界面示意图;Figure 3 is a schematic diagram of another application startup interface provided by the prior art;
图4为本申请实施例提供的一种应用程序加载方法应用时的场景示意图;Figure 4 is a schematic diagram of a scenario when an application loading method provided by the embodiment of the present application is applied;
图5为本申请实施例提供的一种电子设备的结构示意图;Figure 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图6为本申请实施例提供的一种系统架构的组成示意图;Figure 6 is a schematic diagram of a system architecture provided by an embodiment of the present application;
图7为本申请实施例提供的一种建立三方特征库的流程图;Figure 7 is a flow chart for establishing a three-party feature database provided by an embodiment of the present application;
图8为本申请实施例提供的另一种建立三方特征库的流程图;Figure 8 is another flow chart for establishing a three-party feature database provided by an embodiment of the present application;
图9为本申请实施例提供的一种应用程序加载画面中预期界面的关键特征的示意图;Figure 9 is a schematic diagram of key features of an expected interface in an application loading screen provided by an embodiment of the present application;
图10为本申请实施例提供的另一种建立三方特征库的流程图;Figure 10 is another flow chart for establishing a three-party feature database provided by an embodiment of the present application;
图11为本申请实施例提供的一种应用程序加载方法中启动预加载进程的流程示意图;Figure 11 is a schematic flowchart of starting a preloading process in an application loading method provided by an embodiment of the present application;
图12为本申请实施例提供的一种预加载准备队列的示意图;Figure 12 is a schematic diagram of a preload preparation queue provided by an embodiment of the present application;
图13为本申请实施例提供的一种插入应用程序3到预加载准备队列的示意图;Figure 13 is a schematic diagram of inserting application 3 into the preload preparation queue provided by the embodiment of the present application;
图14为本申请实施例提供的另一种插入应用程序3到预加载准备队列的示意图;Figure 14 is another schematic diagram of inserting application 3 into the preload preparation queue provided by the embodiment of the present application;
图15为本申请实施例提供的一种消息队列的示意图;Figure 15 is a schematic diagram of a message queue provided by an embodiment of the present application;
图16为本申请实施例提供的一种应用程序加载方法中管控启动预加载进程后的应用程序的流程示意图;Figure 16 is a schematic flowchart of controlling an application after starting the preloading process in an application loading method provided by an embodiment of the present application;
图17为本申请实施例提供的一种应用程序加载方法中管控预加载的应用程序的进程的流程示意图;Figure 17 is a schematic flowchart of the process of controlling a preloaded application in an application loading method provided by an embodiment of the present application;
图18为本申请实施例提供的另一种应用程序加载方法中管控预加载的应用程序的进程的流程示意图;Figure 18 is a schematic flowchart of the process of controlling a preloaded application in another application loading method provided by an embodiment of the present application;
图19为本申请实施例提供的一种应用程序加载方法中管控预加载的应用程序的通知的流程示意图;Figure 19 is a schematic flowchart of controlling notifications of preloaded applications in an application loading method provided by an embodiment of the present application;
图20为本申请实施例提供的一种应用程序加载方法中管控预加载的应用程序的弹窗的流程示意图;Figure 20 is a schematic flowchart of controlling pop-up windows of preloaded applications in an application loading method provided by an embodiment of the present application;
图21为本申请实施例提供的一种应用程序加载方法中管控预加载的应用程序的广播的流程示意图;Figure 21 is a schematic flowchart of controlling the broadcast of a preloaded application in an application loading method provided by an embodiment of the present application;
图22为本申请实施例提供的另一种应用程序加载方法中管控预加载的应用程序的广播的流程示意图。FIG. 22 is a schematic flowchart of controlling the broadcast of a preloaded application in another application loading method provided by an embodiment of the present application.
具体实施方式Detailed ways
通常用户在使用智能手机上安装的应用程序时,需要先通过触摸点击的方式打开手机上的应用程序。在手机接收到用户打开应用程序的操作时,手机需要对应用程序进行加载,当手机将应用程序加载完成之后,用户才能够使用该应用程序。Usually when a user uses an application installed on a smartphone, he or she needs to first open the application on the phone by touching and clicking. When the mobile phone receives the user's operation to open the application, the mobile phone needs to load the application. Only after the mobile phone completes loading the application, the user can use the application.
例如,当用户需要打开智能手机上安装的视频类应用程序,如,“XX视频”应用程序时。用户可以通过点击智能手机桌面中的“XX视频”应用程序的图标,以打开该“XX”视频。当智能手机接收到用户对“XX视频”应用程序的图标的点击操作时,智能手机便可以加载启动该“XX视频”应用程序。智能手机加载该“XX视频”应用程序的过程中,智能手机的显示界面中会显示“XX视频”的启动页(如,开屏广告页,或者包含应用程序的图标的页面等)。当智能手机将“XX视频”应用程序加载完成之后,智能手机显示的界面可以从“XX视频”应用程序的启动页跳转到“XX视频”应用程序的应用页面(如,该应用的首页)。从而用户可以通过点击“XX视频”的应用页面内的相关内容以观看相关视频内容。例如,智能手机显示的“XX视频”应用程序的应用页面中包括《电影1》、《电视剧2》、《音乐剧3》、《动漫4》等视频内容对应的封面。用户可以通过点击这些封面以使智能手机播放相应的视频内容。例如,当用户点击《电影1》的封面时,智能手机接收到用户的上述操作,便能够播放《电影1》的视频内容以供用户观看。For example, when a user needs to open a video application installed on a smartphone, such as the "XX Video" application. Users can open the "XX" video by clicking on the "XX Video" application icon on the smartphone desktop. When the smart phone receives the user's click operation on the icon of the "XX Video" application, the smart phone can load and start the "XX Video" application. While the smartphone is loading the "XX Video" application, the startup page of "XX Video" will be displayed on the display interface of the smartphone (for example, an opening screen advertisement page, or a page containing the icon of the application, etc.). After the smartphone completes loading the "XX Video" application, the interface displayed on the smartphone can jump from the startup page of the "XX Video" application to the application page of the "XX Video" application (for example, the home page of the application) . Therefore, users can watch relevant video content by clicking on the relevant content in the "XX Video" application page. For example, the application page of the "XX Video" application displayed on the smartphone includes covers corresponding to video contents such as "Movie 1", "TV Series 2", "Musical 3", and "Animation 4". Users can click on these covers to make the smartphone play the corresponding video content. For example, when the user clicks on the cover of "Movie 1", the smartphone receives the user's above operation and can play the video content of "Movie 1" for the user to watch.
又例如,当用户需要打开智能手机上安装的游戏类应用程序,如,“XX游戏”应用程序时。如图1所示,用户可以通过点击智能手机桌面中的“XX游戏”应用程序的图标101,以打开“XX游戏”应用程序。当智能手机接收到用户对“XX游戏”应用程序的图标101的点击操作时,手机便可以加载启动该“XX游戏”应用程序。智能手机加载该“XX游戏”应用程序的过程中,如图2所示,智能手机的显示界面中会显示“XX游戏”的启动页202(如,开屏广告页,或者图中所示的包含应用程序的图标的页面等)。当智能手机将“XX游戏”应用程序加载完成之后,如图3所示,智能手机显示的界面可以从“XX游戏”应用程序的启动页202跳转到“XX游戏”应用程序的应用页面303(如,该游戏的登陆界面)。从而用户可以通过该登陆界面登陆游戏账号并进入游戏界面。Another example is when the user needs to open a game application installed on the smartphone, such as the "XX Game" application. As shown in Figure 1, the user can open the "XX Game" application by clicking the icon 101 of the "XX Game" application on the desktop of the smartphone. When the smartphone receives the user's click operation on the icon 101 of the "XX Game" application, the mobile phone can load and start the "XX Game" application. During the process of loading the "XX Game" application on the smartphone, as shown in Figure 2, the startup page 202 of "XX Game" (such as an opening screen advertisement page, or as shown in the figure) will be displayed on the display interface of the smartphone. A page containing an application's icon, etc.). After the smart phone completes loading the "XX Game" application, as shown in Figure 3, the interface displayed on the smart phone can jump from the startup page 202 of the "XX Game" application to the application page 303 of the "XX Game" application. (For example, the login interface of the game). Therefore, the user can log in to the game account through the login interface and enter the game interface.
由以上可以看到,当用户打开智能手机上安装的应用程序时,手机需要加载一定的时长。如,加载该应用程序经过至少一个启动画面之后才能够进入到用户能够进行操作的应用界面(即用户期望的可操作界面)。尤其,当用户打开的应用程序占用资源较多时加载时长会更长。如此,会影响用户在启动应用程序时的使用体验。As can be seen from the above, when a user opens an application installed on a smartphone, the phone needs a certain amount of time to load. For example, after loading the application program and passing through at least one startup screen, the application interface that the user can operate (that is, the operable interface expected by the user) can be entered. In particular, the loading time will be longer when the application opened by the user takes up more resources. This will affect the user experience when launching the application.
为解决上述问题,本申请实施例提供了一种应用程序加载方法,该方法可以应用于电子设备启动应用程序的场景中。In order to solve the above problem, embodiments of the present application provide an application loading method, which can be applied in a scenario where an electronic device starts an application.
在本申请实施例中,该应用程序加载方法可以包括,在用户使用电子设备的过程中,电子设备可以按照预设的规则来预测用户可能会打开的应用程序,然后将该应用程序预加载到虚拟屏,以使该应用程序能够在虚拟屏中预加载到用户期望的可操作界面(即应用程序启动后进入的能够被用户操作的界面),之后,在用户启动应用程序时,若该应用程序已经预加载在虚拟屏中,则电子设备可以将该应用程序从虚拟屏中移到主屏(或称为显示屏,即电子设备正常显示画面的实际屏幕,其显示的画面用户可见)中进行显示,以供用户使用该应用程序。In this embodiment of the present application, the application loading method may include: when the user uses the electronic device, the electronic device may predict the application that the user may open according to preset rules, and then preload the application into Virtual screen, so that the application can be preloaded in the virtual screen to the operable interface expected by the user (that is, the interface that can be operated by the user after the application is started). Later, when the user starts the application, if the application If the program has been preloaded in the virtual screen, the electronic device can move the application from the virtual screen to the home screen (or display screen, that is, the actual screen on which the electronic device normally displays the screen, and the displayed screen is visible to the user). Displayed for users to use the application.
可选地,应用程序在虚拟屏中预加载(或称为运行)到的用户期望的可操作界面(可称为第一界面),可以是应用程序冷启动后无用户操作时最后停留的界面,如登陆界面、主界面等,此处不做限制。Optionally, the application is preloaded (or called run) on the virtual screen to the operable interface expected by the user (which can be called the first interface), which can be the last interface where the application stays when there is no user operation after cold start. , such as login interface, main interface, etc., there are no restrictions here.
其中,虚拟屏为电子设备的模拟屏幕,是非实体的,具有与电子设备的实际屏幕相同的功能,但是其显示的画面用户不可见。可选地,虚拟屏可以与显示屏相对应,如虚拟屏与显示屏设置相同的分辨率、尺寸等。Among them, the virtual screen is a simulated screen of the electronic device, which is non-physical and has the same functions as the actual screen of the electronic device, but the screen displayed is invisible to the user. Optionally, the virtual screen can correspond to the display screen, for example, the virtual screen and the display screen are set to the same resolution, size, etc.
例如,电子设备可以按照预设的规则预测用户可能会打开的应用程序,如电子设备预测用户未来一段时间内可能会打开“XX游戏”应用程序,此时电子设备便会采用该应用程序加载方法对“XX游戏”应用程序进行预加载。例如,如图4中的a所示,可以将“XX游戏”应用程序加载到虚拟屏上,以使该应用程序能够在虚拟屏上加载到用户期望的可操作界面401(如图中所示的账号登陆界面)。之后,如图4中的b所示,当用户通过点击“XX游戏”应用程序的图标402以准备启动该“XX游戏”应用程序时,如图4中的c所示,电子设备便可以直接将预加载到虚拟屏上的“XX游戏”应用程序的可操作界面401切换显示在主屏上(如账号登录界面)。For example, the electronic device can predict the applications that the user may open according to preset rules. For example, if the electronic device predicts that the user may open the "XX Game" application in the future, the electronic device will use the application loading method. Preload the "XX Game" application. For example, as shown in a in Figure 4, the "XX Game" application can be loaded onto the virtual screen, so that the application can be loaded onto the user's desired operable interface 401 on the virtual screen (as shown in the figure account login interface). After that, as shown in b in Figure 4, when the user prepares to start the "XX Game" application by clicking the icon 402 of the "XX Game" application, as shown in c in Figure 4, the electronic device can directly The operable interface 401 of the "XX Game" application preloaded on the virtual screen is switched and displayed on the home screen (such as the account login interface).
通过该方法,电子设备可以对用户的操作行为进行预测,以在用户启动某个应用程序之前,先对该应用程序进行预加载。从而当用户想要启动相应的应用程序时,电子设备能够直接将相应的应用程序的可操作界面显示在主屏上,从而减小用户启动相应用程序的感知时间(启动应用程序的感知时间,即从用户对应用程序进行启动操作到电子设备主屏显示该应用程序的可操作界面所经历的时间)。如此,能够提高用户启动应用程序时的流畅体验,提高电子设备在用户启动应用程序时的响应速度。Through this method, the electronic device can predict the user's operation behavior to preload an application before the user launches the application. Therefore, when the user wants to start the corresponding application program, the electronic device can directly display the operable interface of the corresponding application program on the home screen, thereby reducing the user's perceived time for starting the corresponding application program (the perceived time for starting the application program, that is, The time elapsed from the time the user launches the application to the time the electronic device displays the operable interface of the application on the home screen). In this way, the smooth experience when the user starts the application can be improved, and the response speed of the electronic device when the user starts the application can be improved.
以下,将结合附图对本申请实施例提供的应用程序加载方法进行说明。Below, the application loading method provided by the embodiment of the present application will be described with reference to the accompanying drawings.
在本申请实施例中,上述电子设备可以是手机、平板电脑、手持计算机,PC,蜂窝电话,个人数字助理(personal digital assistant,PDA),可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机,智能投影仪,智能电视盒,以及增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备等。本申请实施例对于电子设备的具体设备形态不作特殊限制。In the embodiment of the present application, the above-mentioned electronic device may be a mobile phone, a tablet computer, a handheld computer, a PC, a cellular phone, a personal digital assistant (PDA), or a wearable device (such as a smart watch, a smart bracelet) , smart home devices (such as televisions), car machines (such as car computers), smart screens, game consoles, smart projectors, smart TV boxes, and augmented reality (AR)/virtual reality (virtual reality, VR) equipment, etc. The embodiments of the present application do not place any special restrictions on the specific device form of the electronic device.
在本申请实施例中,上述电子设备是可以运行操作系统,安装应用程序的电子设备。可选地,电子设备运行的操作系统可以是系统,/>系统,/>系统等。In this embodiment of the present application, the above-mentioned electronic device is an electronic device that can run an operating system and install applications. Optionally, the operating system running on the electronic device may be System,/> System,/> system etc.
示例地,以电子设备为手机为例,图5示出了本申请实施例提供的一种电子设备的结构示意图。也即,示例性的,图5所示的电子设备可以是手机。For example, taking the electronic device as a mobile phone, FIG. 5 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. That is, as an example, the electronic device shown in FIG. 5 may be a mobile phone.
如图5所示,电子设备可以包括:射频(radio frequency,RF)电路510、存储器520、输入单元530、显示单元540、传感器550、音频电路560、无线保真(wireless fidelity,WiFi)模块570、处理器580、电源590以及蓝牙模块5100等部件。本领域技术人员可以理解,图5中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。As shown in Figure 5, the electronic device may include: a radio frequency (RF) circuit 510, a memory 520, an input unit 530, a display unit 540, a sensor 550, an audio circuit 560, and a wireless fidelity (WiFi) module 570 , processor 580, power supply 590, Bluetooth module 5100 and other components. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 5 does not constitute a limitation of the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange different components.
下面结合图5对电子设备的部分构成部件进行具体的介绍:The following is a detailed introduction to some components of electronic equipment in conjunction with Figure 5:
存储器520可用于存储软件程序以及模块,处理器580通过运行存储在存储器520的软件程序以及模块,从而执行电子设备的各种功能应用以及数据处理。存储器520可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)、引导装载程序(boot loader)等;存储数据区可存储根据电子设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器520可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 520 can be used to store software programs and modules. The processor 580 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 520 . The memory 520 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and a boot loader. etc.; the storage data area can store data created based on the use of electronic equipment (such as audio data, phone books, etc.), etc. In addition, memory 520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
输入单元530可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,输入单元530可包括触控面板531以及其他输入设备532。触控面板531,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板531上或在触控面板531附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板531可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器580,并能接收处理器580发来的命令并加以执行。具体地,其他输入设备532可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。在本申请实施例中,用户可以通过触控面板531、鼠标或键盘来输入通过电脑的系统打开模拟器中的文件的操作。The input unit 530 may be used to receive input numeric or character information and generate key signal input related to user settings and function control of the electronic device. Specifically, the input unit 530 may include a touch panel 531 and other input devices 532 . The touch panel 531 , also known as a touch screen, can collect the user's touch operations on or near the touch panel 531 (for example, the user uses a finger, stylus, or any suitable object or accessory on or near the touch panel 531 operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 531 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the touch controller. to the processor 580, and can receive commands sent by the processor 580 and execute them. Specifically, other input devices 532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, joystick, etc. In this embodiment of the present application, the user can input the operation of opening a file in the simulator through the computer system through the touch panel 531, mouse or keyboard.
显示单元540可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种菜单。显示单元540可包括显示面板(如显示屏)541,可选的,可以采用液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板541。进一步的,触控面板531可覆盖显示面板541,当触控面板531检测到在其上或附近的触摸操作后,传送给处理器580以确定触摸事件的类型,随后处理器580根据触摸事件的类型在显示面板541上提供相应的视觉输出。虽然在图5中,触控面板531与显示面板541是作为两个独立的部件来实现电子设备的输入和输入功能,但是在某些实施例中,可以将触控面板531与显示面板541集成而实现电子设备的输入和输出功能。The display unit 540 may be used to display information input by the user or information provided to the user and various menus of the electronic device. The display unit 540 may include a display panel (such as a display screen) 541. Optionally, the display panel 541 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 531 can cover the display panel 541. When the touch panel 531 detects a touch operation on or near it, it is sent to the processor 580 to determine the type of the touch event. The processor 580 then determines the type of the touch event. Type provides corresponding visual output on display panel 541. Although in FIG. 5 , the touch panel 531 and the display panel 541 are used as two independent components to implement the input and input functions of the electronic device, in some embodiments, the touch panel 531 and the display panel 541 can be integrated. And realize the input and output functions of electronic equipment.
处理器580是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器520内的软件程序或模块,以及调用存储在存储器520内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。可选的,处理器580可包括一个或多个处理单元;优选的,处理器580可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器580中。The processor 580 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs or modules stored in the memory 520 and calls data stored in the memory 520 to execute Various functions of electronic equipment and processing data, thereby overall monitoring of electronic equipment. Optionally, the processor 580 may include one or more processing units; preferably, the processor 580 may integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 580 .
音频电路560可以包括扬声器561和传声器562。通过扬声器561能够播放音频数据,而传声器562则可以用于将声音信号转换为音频数据。Audio circuit 560 may include speaker 561 and microphone 562. Audio data can be played through the speaker 561, and the microphone 562 can be used to convert the sound signal into audio data.
当然,可以理解的,上述图5所示仅仅为终端的设备形态为手机时的示例性说明。若终端是平板电脑,手持计算机,PC,PDA,可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机,以及AR/VR设备等其他设备形态时,终端的结构中可以包括比图5中所示更少的结构,也可以包括比图5中所示更多的结构,在此不作限制。Of course, it can be understood that the above-mentioned figure 5 is only an exemplary illustration when the device form of the terminal is a mobile phone. If the terminal is a tablet computer, handheld computer, PC, PDA, wearable device (such as smart watch, smart bracelet), smart home device (such as TV), car machine (such as car computer), smart screen, In the case of game consoles, AR/VR devices and other device forms, the structure of the terminal may include fewer structures than that shown in Figure 5 or may include more structures than that shown in Figure 5 , which is not limited here.
以下实施例中的方法均可以在具有上述硬件结构的电子设备中实现。下面将结合附图对本申请实施例进行举例说明。The methods in the following embodiments can be implemented in electronic devices with the above hardware structure. The embodiments of the present application will be described below with reference to the accompanying drawings.
在本申请实施例中,电子设备可以根据用户的应用程序使用习惯和/或预设的预测规则对应用程序预测和预加载。In this embodiment of the present application, the electronic device can predict and preload applications based on the user's application usage habits and/or preset prediction rules.
示例地,在本申请实施例中,电子设备为了实现上述提供应用程序预加载的方法,可以采用如图6所示的系统架构。如图6所示,该电子设备的系统架构可以包括应用层、系统框架层(framework层)、本地框架(native)以及硬件层。其中,应用层可用于部署能够在电子设备上运行的一个或多个应用程序,例如本申请实施例中,应用层中可以部署有“XX游戏”应用程序,“XX视频”应用程序等。系统框架层中可以部署有实时系统(如称为第一系统)、非实时系统(如称为第二系统)以及三方特征库等。本地框架可以部署采集系统和性能雷达。硬件层可以包括CPU以及存储器等硬件,其中存储器可以包括随机存取存储器(random access memory,RAM)和外部存储器等。For example, in this embodiment of the present application, in order to implement the above method of providing application preloading, the electronic device may adopt a system architecture as shown in Figure 6 . As shown in Figure 6, the system architecture of the electronic device may include an application layer, a system framework layer (framework layer), a native framework (native), and a hardware layer. The application layer can be used to deploy one or more applications that can run on the electronic device. For example, in the embodiment of the present application, the application layer can be deployed with "XX Game" application, "XX Video" application, etc. The system framework layer can be deployed with real-time systems (such as the first system), non-real-time systems (such as the second system), and third-party feature libraries. The local framework can deploy acquisition systems and performance radars. The hardware layer may include hardware such as CPU and memory, where the memory may include random access memory (RAM) and external memory.
通过非实时系统能够处理对实时性要求不高的操作,即能够在独立进程中进行处理的操作。从而避免所有功能均在系统进程上运行,而造成负荷过高产生卡顿的问题。可选地,非实时系统中可以包括用于校验和构造对相应应用程序进行预加载时所需的参数的预加载模块,用于创建和管理预加载应用程序所需的虚拟屏相关参数的虚拟屏管理模块,用于维护预设的配置参数(如默认预加载时长等参数)的配置管理模块,用于决策是否对某个应用进行预加载的决策模块,用于对当前电子设备所处场景进行识别的场景识别模块,用于对电子设备的负载进行监控的负载监控模块,用于对电子设备中安装的应用程序的相关属性(如应用程序的启动方式、要启动的进程、要启动的界面等启动参数,应用程序的加载特征等)进行管理的应用管理模块等。Operations that do not require high real-time performance can be processed through non-real-time systems, that is, operations that can be processed in independent processes. This avoids the problem that all functions run on the system process, causing excessive load and causing lags. Optionally, the non-real-time system may include a preloading module for verifying and constructing parameters required to preload the corresponding application, and a module for creating and managing virtual screen related parameters required for preloading the application. Virtual screen management module, a configuration management module used to maintain preset configuration parameters (such as default preloading time and other parameters), a decision-making module used to decide whether to preload an application, and a decision-making module used to determine the current location of the electronic device. The scene recognition module for scene recognition, the load monitoring module for monitoring the load of electronic equipment, and the related attributes of applications installed in electronic equipment (such as the startup method of the application, the process to be started, the process to be started, etc. The application management module that manages the startup parameters such as the interface, the loading characteristics of the application, etc.).
通过实时系统能够处理和应用程序运行状态、进程强相关的操作、对实时性要求比较高的操作(例如,预测需要预加载的应用程序、执行应用程序的预加载等操作),以及与进程管理服务(ActivityManagerService,AMS)、窗口管理服务(WindowManagerService,WMS)、包管理服务(PackageMangerService,PMS)等系统服务强相关的操作。该实时系统可以运行在系统进程(system server)中。可选地,基于上述实时系统可实现的功能,实时系统中可以包括用于对显示窗口进行管理的窗口管理模块,对预加载之后的应用程序的相关消息进行代理的代理模块,用于预测需要进行预加载的应用程序的预测模块,用于对预加载后的应用程序所使用资源进行管控的资源管控模块,用于执行应用程序预加载的预加载管理模块等,用于维护和测试应用程序预加载功能的维测模块等。The real-time system can handle operations that are strongly related to application running status and processes, operations with high real-time requirements (for example, predicting applications that need to be preloaded, performing operations such as preloading of applications), and process management. Operations strongly related to system services such as service (ActivityManagerService, AMS), window management service (WindowManagerService, WMS), package management service (PackageMangerService, PMS), etc. The real-time system can run in a system process (system server). Optionally, based on the above-mentioned functions that can be realized by the real-time system, the real-time system can include a window management module for managing the display window, a proxy module for proxying relevant messages of the application after preloading, and a proxy module for predicting needs. Prediction module for preloading applications, resource management and control module for controlling the resources used by preloaded applications, preloading management module for performing application preloading, etc., used for maintaining and testing applications Dimension testing modules with preloaded functions, etc.
作为一种示例,基于如图6所示的系统架构。可以预先建立包括多个应用程序的相关属性特征的三方特征库。该三方特征库中可以包括各应用程序对应的应用类型(如游戏、即时通讯、视频、支付、新闻等应用类型)、应用程序加载所耗系统资源(如CPU负载、内存占用以及耗电量等)、应用程序加载到预期界面(即可操作界面)所耗时间(即应用程序加载时长)等。可选地,可以在云服务器中建立相应的特征库,然后通过云推的方式同步到电子设备的三方特征库中。As an example, based on the system architecture shown in Figure 6. A three-party feature library including relevant attribute features of multiple applications can be built in advance. The three-party feature library can include the application types corresponding to each application (such as games, instant messaging, video, payment, news and other application types), the system resources consumed by application loading (such as CPU load, memory usage and power consumption, etc. ), the time it takes for the application to load to the expected interface (i.e., the operational interface) (i.e., the application loading time), etc. Optionally, a corresponding feature library can be established in the cloud server, and then synchronized to the third-party feature library of the electronic device through cloud push.
示例地,三方特征库中的应用类型可以通过对主流应用程序筛查扫描来采集。For example, the application types in the third-party signature database can be collected by screening and scanning mainstream applications.
例如,如图7所示,可以先选取主流应用市场中排名前N(即Top N)的应用程序,根据每个应用程序的功能定义(即该应用程序在应用市场中的分类标签)来对相应应用程序的应用类型进行第一次筛选确认。然后,还可以扫描每个应用程序的属性文件(如Manifest文件),根据属性文件中的参数对相应应用程序的应用类型进行第二次筛选确认。从而确定出选取的N个应用程序分别对应的应用类型。可选地,还可以在第二次筛选确认每个应用程序的应用类型之后,再对每个应用程序进行人工复查(或称为人工校验)以确定出选取的N个应用程序分别对应的应用类型。从而,便可以得到主流的N个应用程序各自的应用类型。之后,可以将得到的N个应用程序各自的应用类型上传到云服务器(即云端),然后再由云服务器将N个应用程序各自的应用类型同步到电子设备的三方特征库中。可选地,非实时系统中的应用管理模块可以根据电子设备已安装的应用程序,从三方特征库中匹配出各已安装的应用程序对应的应用类型。For example, as shown in Figure 7, you can first select the top N (i.e., Top N) applications in the mainstream application market, and classify them according to the functional definition of each application (i.e., the classification label of the application in the application market). The application type of the corresponding application is screened and confirmed for the first time. Then, you can also scan the property file of each application (such as the Manifest file), and conduct a second screening and confirmation of the application type of the corresponding application based on the parameters in the property file. Thus, the application types corresponding to the selected N applications are determined. Optionally, after the application type of each application is confirmed in the second screening, each application can be manually reviewed (or called manual verification) to determine the corresponding data of the selected N applications. App types. Thus, the respective application types of the N mainstream applications can be obtained. Afterwards, the obtained application types of each of the N applications can be uploaded to the cloud server (i.e., the cloud), and then the cloud server synchronizes the respective application types of the N applications to the three-party feature library of the electronic device. Optionally, the application management module in the non-real-time system can match the application types corresponding to each installed application from the third-party feature library according to the applications installed on the electronic device.
示例地,三方特征库中的应用程序加载时长可以通过对主流应用程序的加载画面进行识别来采集。For example, the loading time of applications in the third-party feature library can be collected by identifying the loading screen of mainstream applications.
例如,如图8所示,可以先选取主流应用市场中排名前N(即Top N)的应用程序,然后分别对各个应用程序的加载画面中的预期界面(即加载结束画面)中的关键特征进行定义(通常可以将预期界面中不易随应用程序更新而改变的特征作为关键特征,如账号登录控件、页面选择控件等)。之后,可分别对每个应用程序依次进行冷启动,并对相应应用程序冷启动时的加载画面进行视频录制(录制帧率可以为24帧、60帧等低帧率,也可以是120帧、240帧等高帧率)。然后可对录制的加载画面视频中的每一帧进行识别(可按照从视频的中间帧依次向时间轴两端识别的方式识别每一帧,也可以从第一帧依次识别每一帧,此处不做限制),当识别到对应应用程序定义的加载结束画面中的关键特征时,便可以以该帧对应的视频时长作为对应应用程序的加载时长。如,以应用程序为“XX游戏”应用程序为例,如图9所示,可以定义该应用程序的加载画面中的预期界面中的关键特征为账号登录控件901和适龄提示标识902。则可以对该应用程序进行冷启动,并对该应用程序冷启动时的加载画面进行录制。然后对录制的加载画面中的每一帧进行识别。当识别到如图9所示的账号登录控件901和适龄提示标识902时,则可确定出包含该账号登录控件901和适龄提示标识902的一帧为预期界面,从而可以以该帧对应的视频时长作为该“XX游戏”应用程序的加载时长。当然,在本申请的其他可能的实施方式中,还可以通过其他方式来采集确定应用程序的加载时长,此处不做限制。For example, as shown in Figure 8, you can first select the top N (i.e., Top N) applications in the mainstream application market, and then separately analyze the key features of the expected interface (i.e., the loading end screen) in the loading screen of each application. Define (usually the features in the expected interface that are not easy to change with application updates can be used as key features, such as account login controls, page selection controls, etc.). After that, each application can be cold-started in turn, and the loading screen of the corresponding application during cold-start can be video recorded (the recording frame rate can be low frame rates such as 24 frames, 60 frames, etc., or 120 frames, 240 frames and other high frame rates). Then each frame in the recorded loading screen video can be identified (each frame can be identified sequentially from the middle frame of the video to both ends of the timeline, or each frame can be identified sequentially from the first frame. This (without limitation), when the key features in the loading end screen defined by the corresponding application are identified, the video duration corresponding to the frame can be used as the loading duration of the corresponding application. For example, taking the application as the "XX Game" application, as shown in Figure 9, the key features of the expected interface in the loading screen of the application can be defined as the account login control 901 and the age-appropriate prompt mark 902. Then you can cold-start the application and record the loading screen when the application is cold-started. Each frame in the recorded loading screen is then identified. When the account login control 901 and the age-appropriate prompt identification 902 shown in Figure 9 are recognized, a frame containing the account login control 901 and the age-appropriate prompt identification 902 can be determined as the expected interface, so that the video corresponding to the frame can be The duration is used as the loading duration of the "XX Game" application. Of course, in other possible implementations of the present application, the loading time of the application can also be collected and determined in other ways, which is not limited here.
可选地,在对定义的关键特征进行识别确定出加载时长之后,还可以对该应用程序的加载时长进行人工校验。并且针对每个应用程序可以重复多次上述方式以得到相对准确的加载时长。Optionally, after identifying the defined key features to determine the loading time, the loading time of the application can also be manually verified. And the above method can be repeated multiple times for each application to obtain a relatively accurate loading time.
当得到选取的N个应用程序中分别对应的加载时长之后,可以将得到的N个应用程序各自的加载时长上传到云服务器(即云端),然后再由云服务器将N个应用程序各自的加载时长同步到电子设备的三方特征库中。可选地,非实时系统中的应用管理模块可以根据电子设备已安装的应用程序,从三方特征库中匹配出各已安装的应用程序对应的加载时长。After obtaining the corresponding loading times of the selected N applications, the obtained loading times of each of the N applications can be uploaded to the cloud server (i.e., the cloud), and then the cloud server will load the respective loading times of the N applications. The duration is synchronized to the third-party feature library of the electronic device. Optionally, the application management module in the non-real-time system can match the loading time corresponding to each installed application from the third-party feature library according to the installed application on the electronic device.
示例地,三方特征库中的应用程序加载所耗系统资源可以通过对主流应用程序的加载负载进行获取得到。For example, the system resources consumed by loading applications in the third-party signature library can be obtained by loading the mainstream applications.
例如,如图10所示,可以先选取主流应用市场中排名前N(即Top N)的应用程序,然后分别对每个应用程序依次进行冷启动。在应用程序启动过程中,可以周期性的获取电子设备的CPU负载。然后获取对应应用程序启动后相应进程的进程控制符(processidentifier,PID),从而获取该应用程序对应的进程的内存占用等负载信息。从而便可得到主流N个应用程序各自的CPU负载、内存占用等加载所耗系统资源。可选地,可以针对每个应用程序重复多次上述方式以得到更加准确的稳定的加载所耗系统资源数据,此处不做限制。之后,可以将得到的N个应用程序各自的加载所耗系统资源上传到云服务器(即云端),然后再由云服务器将N个应用程序各自的加载所耗系统资源同步到电子设备的三方特征库中。可选地,非实时系统中的应用管理模块可以根据电子设备已安装的应用程序,从三方特征库中匹配出各已安装的应用程序对应的加载所耗系统资源。For example, as shown in Figure 10, you can first select the top N (i.e. Top N) applications in the mainstream application market, and then cold-start each application in sequence. During the application startup process, the CPU load of the electronic device can be obtained periodically. Then, the process identifier (PID) of the corresponding process after the corresponding application is started is obtained, thereby obtaining load information such as memory usage of the process corresponding to the application. Thus, the CPU load, memory usage and other loading system resources consumed by each of the mainstream N applications can be obtained. Optionally, the above method can be repeated multiple times for each application to obtain more accurate and stable data on the system resources consumed by loading, which is not limited here. After that, the obtained system resources consumed by loading each of the N applications can be uploaded to the cloud server (i.e., the cloud), and then the cloud server synchronizes the system resources consumed by each loading of the N applications to the three-party characteristics of the electronic device. in the library. Optionally, the application management module in the non-real-time system can match the system resources consumed by loading corresponding to each installed application from the third-party feature library according to the applications installed on the electronic device.
在本申请实施例中,基于上述如图6所示的系统架构。电子设备可以通过实时系统中的预测模块对用户在未来一段时间可能会打开的应用程序进行预测。例如,预测模块可以通过高频规律学习模型、上下文规律学习模型等,将输入的应用程序日志转化为规律集作为可能会被用户启动的应用程序的筛选条件,再结合当前场景等特征,通过FP-TREE和序列模式挖掘(PrefixSpan、CM-SPADE等)算法推算出下一个或者下一段时间内用户可能使用的应用程序。In this embodiment of the present application, the system architecture shown in Figure 6 is based on the above. Electronic devices can predict the applications that users are likely to open in the future through prediction modules in real-time systems. For example, the prediction module can use high-frequency rule learning models, contextual rule learning models, etc. to convert input application logs into rule sets as filtering conditions for applications that may be launched by users, and then combine them with the current scene and other characteristics to use FP -TREE and sequential pattern mining (PrefixSpan, CM-SPADE, etc.) algorithms calculate the applications that users may use next or within the next period of time.
示例地,预测模块可以进行高频行为规律学习,形成用户行为画像。例如,通过高频行为规律学习,得到用户离家时间、到公司时间等,以及得到用户离家后会经常打开哪些应用程序(如导航类应用程序、打车类应用程序等),到公司后会经常打开哪些应用程序(如打卡应用程序、邮箱类应用程序等)。从而预测模块可以在识别到用户处于离家的场景或到公司的场景时,将学习得到的对应应用程序预测为用户可能会打开的应用程序。可选地,可以周期性的对用户未来可能会打开的应用程序进行预测(可以预测未来一段时间内(如一小时)可能会打开的应用程序)。最终得到的预测结果可以为预测到的要启动的应用程序(即预加载的应用程序)的包名和该应用程序可能会启动的时间段(即可能被用户使用的时间段)。然后可以将预测结果,如预加载的应用程序的包名和其对应的可能被用户使用的时间段发送给预加载模块,以便于预加载模块根据预测结果对相应的应用程序进行预加载启动。For example, the prediction module can learn high-frequency behavior patterns to form user behavior portraits. For example, through high-frequency behavior pattern learning, we can obtain the time when the user leaves home, the time when he or she arrives at work, etc., as well as which applications the user often opens after leaving home (such as navigation applications, taxi-hailing applications, etc.), and the time when the user arrives at the company. Which applications are frequently opened (such as clock-in applications, email applications, etc.). Therefore, the prediction module can predict the learned corresponding application as an application that the user may open when it recognizes that the user is leaving home or going to the company. Optionally, the applications that the user may open in the future may be periodically predicted (the applications that may be opened within a certain period of time in the future (such as one hour) may be predicted). The final prediction result may be the package name of the predicted application to be started (ie, the preloaded application) and the time period during which the application may be started (ie, the time period during which the application may be used by the user). The prediction results, such as the package name of the preloaded application and its corresponding time period that may be used by the user, can then be sent to the preloading module, so that the preloading module can preload and start the corresponding application based on the prediction results.
例如,预测模块可以预测未来一小时内可能被用户使用的应用程序为应用程序1和应用程序2,并且,应用程序1可能被用户使用的时间段为早上九点到九点十分,应用程序2可能被用户使用的时间段为早上九点半到十点。此时,预测模块可以将预测出的应用程序1的包名以及对应的可能被用户使用的早上九点到九点十分的时间段,以及将预测出的应用程序2的包名以及对应的可能被用户使用的早上九点半到十点的时间段,发送给预加载模块。For example, the prediction module can predict that the applications that may be used by the user in the next hour are Application 1 and Application 2, and the time period in which Application 1 may be used by the user is from 9:00 to 9:10 in the morning. 2The time period that may be used by users is from 9:30 to 10:00 in the morning. At this time, the prediction module can combine the predicted package name of Application 1 and the corresponding time period from 9:00 to 9:10 that may be used by the user, and the predicted package name of Application 2 and the corresponding The time period from 9:30 to 10:00 in the morning that may be used by the user is sent to the preloading module.
示例地,预测模块还可以进行上下文行为规律学习,以形成用户行为画像。例如,通过上下文行为规律学习,可以得到用户在打开某个应用程序之后经常性会再打开另一应用程序(如用户在打开会议应用程序时,还会再打开录音应用程序等)的上下文习惯。从而预测模块在识别到用户打开了应用程序1时,便能够将学习得到的上下文习惯中与应用程序1关联的应用程序2预测为用户可能会打开的应用程序。For example, the prediction module can also learn contextual behavior rules to form a user behavior profile. For example, through contextual behavior rule learning, we can learn the contextual habits of users who often open another application after opening one application (for example, when users open a conferencing application, they will also open a recording application, etc.). Therefore, when the prediction module recognizes that the user has opened application 1, it can predict application 2 associated with application 1 in the learned contextual habits as an application that the user may open.
可选地,当预测模块预测到用户可能会打开的应用程序,且预测准确率达到阈值时,预测模块可以主动通知预加载模块对相应的应用程序进行预加载。Optionally, when the prediction module predicts an application that the user may open and the prediction accuracy reaches a threshold, the prediction module can proactively notify the preloading module to preload the corresponding application.
或者,预测模块可以为预加载模块提供查询接口,以供预加载模块查询预测到的用户可能会打开的应用程序。从而便于预加载模块对相应的应用程序进行预加载准备。Alternatively, the prediction module may provide a query interface to the preloading module for the preloading module to query applications predicted to be likely to be opened by the user. This facilitates the preloading module to prepare for preloading the corresponding application.
在一些可能的实施方式中,如图6所示的软件系统还可以包括人工智能(Artificial Intelligence,AI)模块,以通过人工智能模块对用户在未来一段时间可能打开的应用程序进行预测,从而提高预测应用程序的准确率。可选地,在本申请的其他一些实施例中,还可以只包括AI模块,不包括预测模块,此处不做限制。AI模块预测出的预测结果内容与预测模块可以相同,也包括预测出的未来一段时间内可能被用户使用的应用程序以及对应的可能被用户使用的时间段。In some possible implementations, the software system as shown in Figure 6 can also include an artificial intelligence (Artificial Intelligence, AI) module to predict the applications that the user may open in the future through the artificial intelligence module, thereby improving Prediction application accuracy. Optionally, in some other embodiments of the present application, only the AI module may be included and the prediction module may not be included. There is no limitation here. The content of the prediction results predicted by the AI module can be the same as that of the prediction module, and also include predicted applications that may be used by users in a period of time in the future and the corresponding time periods that may be used by users.
当预加载模块获取到需要预加载的应用程序之后,决策模块可以先根据电子设备当前所处场景,电子设备当前的负载以及要预加载的相应应用程序对应的应用类型、加载时长、加载所耗系统资源等进行综合决策以决定是否需要对相应的应用程序进行预加载。示例地,上述系统架构中的负载监控模块可以实时监控或周期性监控电子设备当前的CPU负载、内存占用以及电量信息等。场景识别模块可以通过注册、回调、广播等现有java或android机制来实时识别或周期性识别电子设备当前的使用场景。如,识别当前电子设备是否充电、是否灭屏、是否被远程控制、是否为首次启动、是否为连续启动、是否为分屏状态、是否设置有多屏、是否为投屏状态、是否进行了用户切换等。而根据前述,应用管理模块中管理有已安装的各应用程序对应的应用类型、加载时长、加载所耗系统资源等。从而决策模块可以分别从负载监控模块、场景识别模块以及应用管理模块获取上述信息,然后根据电子设备当前的负载情况,以及加载相应应用所需时长和所耗系统资源的情况来判断当前电子设备是否满足预加载相应应用程序的条件,然后决策模块还可以根据电子设备当前的场景对是否要预加载相应应用程序进行综合判断。例如,当场景为灭屏时可以不对应用程序进行预加载。又例如,当场景为分屏、多屏或投屏时,则很难确定用户是否需要向往常一样打开某些应用程序,因此此时也可以不对应用程序进行预加载。After the preloading module obtains the application that needs to be preloaded, the decision-making module can first base on the current scene of the electronic device, the current load of the electronic device, and the application type, loading time, and loading time corresponding to the corresponding application to be preloaded. System resources, etc. are used to make comprehensive decisions to determine whether the corresponding application needs to be preloaded. For example, the load monitoring module in the above system architecture can monitor the current CPU load, memory usage, power information, etc. of the electronic device in real time or periodically. The scene recognition module can identify the current usage scenario of electronic devices in real time or periodically through existing Java or Android mechanisms such as registration, callback, and broadcast. For example, identify whether the current electronic device is charging, whether the screen is turned off, whether it is remotely controlled, whether it is started for the first time, whether it is continuously started, whether it is in a split-screen state, whether it is set to multiple screens, whether it is in a screen casting state, and whether a user Switch etc. According to the foregoing, the application management module manages the application type, loading time, system resources consumed by loading, etc. corresponding to each installed application. Therefore, the decision-making module can obtain the above information from the load monitoring module, scene recognition module and application management module respectively, and then determine whether the current electronic device is based on the current load condition of the electronic device, as well as the time required to load the corresponding application and the system resources consumed. When the conditions for preloading the corresponding application are met, the decision-making module can also make a comprehensive judgment on whether to preload the corresponding application based on the current scenario of the electronic device. For example, the application does not need to be preloaded when the screen is off. For another example, when the scene is split screen, multi-screen or screencasting, it is difficult to determine whether the user needs to open certain applications as usual, so the application does not need to be preloaded at this time.
当决策模块确定需要对某个应用程序进行预加载时,基于上述如图6所示的系统架构。决策模块可以通知非实时系统的预加载模块对该应用程序进行预加载。从而,预加载模块可以从虚拟屏管理模块获取相应的虚拟屏参数,然后将虚拟屏参数以及要预加载的应用程序的信息传递给实时系统的预加载管理模块。然后,预加载管理模块便可以根据虚拟屏参数以及要预加载的应用程序的信息将相应的应用程序预加载到虚拟屏上。其中,当预加载模块获取虚拟屏参数时,若虚拟屏管理模块中未创建虚拟屏,则虚拟屏管理模块可以先创建虚拟屏,然后再向预加载模块返回相应的虚拟屏参数。需要说明的是,虚拟屏一般与主屏的参数一致,从而使预加载到虚拟屏的应用程序切换显示到主屏时能够适配主屏。When the decision-making module determines that an application needs to be preloaded, it is based on the system architecture shown in Figure 6 above. The decision-making module can notify the preloading module of the non-real-time system to preload the application. Therefore, the preloading module can obtain the corresponding virtual screen parameters from the virtual screen management module, and then transfer the virtual screen parameters and information about the application program to be preloaded to the preloading management module of the real-time system. Then, the preloading management module can preload the corresponding application program onto the virtual screen according to the virtual screen parameters and the information of the application program to be preloaded. Among them, when the preloading module obtains the virtual screen parameters, if the virtual screen is not created in the virtual screen management module, the virtual screen management module can first create the virtual screen, and then return the corresponding virtual screen parameters to the preloading module. It should be noted that the virtual screen generally has the same parameters as the main screen, so that the application preloaded on the virtual screen can adapt to the main screen when the application is switched to the main screen.
可选地,当相应的应用程序预加载到虚拟屏之后,实时系统中的窗口管理模块可以对虚拟屏中预加载的应用程序的所有窗口显示进行维护,将其代理。例如,使预加载的应用程序的Toast弹窗、Notify通知、游戏助手弹窗等推迟生效。从而避免预加载到虚拟屏的应用程序的弹窗、通知等显示到主屏影响用户正常使用正在使用的应用程序。Optionally, after the corresponding application is preloaded into the virtual screen, the window management module in the real-time system can maintain and proxy all window displays of the preloaded application in the virtual screen. For example, delay the effectiveness of Toast pop-ups, Notify notifications, game assistant pop-ups, etc. of preloaded applications. This prevents pop-up windows, notifications, etc. of applications preloaded to the virtual screen from being displayed on the home screen and affecting the user's normal use of the application being used.
可选地,当相应的应用程序预加载到虚拟屏之后,实时系统中的代理模块还可以对虚拟屏中预加载的应用程序启动后接收和发送的广播、其与外界应用的binder通信、其监听的闹钟函数(alarm)消息等消息进行代理,将对应消息缓存起来,当用户对相应应用程序进行了启动操作,应用程序切到主屏显示时,再将还具备时效的消息重新发送或接收。Optionally, after the corresponding application is preloaded into the virtual screen, the agent module in the real-time system can also receive and send broadcasts after the application preloaded in the virtual screen is started, its binder communication with external applications, and its The monitored alarm clock function (alarm) messages and other messages are proxied and the corresponding messages are cached. When the user starts the corresponding application and the application switches to the home screen display, the time-sensitive messages are re-sent or received.
在本申请实施例中,可以通过资源管控模块对预加载到虚拟屏的应用程序的资源进行管控。例如,可以管控预加载到虚拟屏的应用程序的音频资源,使其输出的音频信息不被电子设备输出,从而避免影响用户正常使用正在使用的应用程序。又例如,可以控制电子设备只绘制预加载到虚拟屏的应用程序的显示画面但不进行渲染,从而减少电子设备的渲染合成压力,避免卡顿。又例如,当预加载到虚拟屏的应用程序为多个时,资源管控模块还可以将预加载的应用程序中会被用户打开的概率降低了的应用程序进行冷冻转储,从而进一步控制电子设备的CPU负载和内存占用。In this embodiment of the present application, the resources of the application program preloaded to the virtual screen can be managed and controlled through the resource management and control module. For example, the audio resources of an application preloaded to the virtual screen can be controlled so that the audio information output by it is not output by the electronic device, thereby avoiding affecting the normal use of the application being used by the user. For another example, the electronic device can be controlled to only draw the display screen of the application preloaded to the virtual screen without rendering, thereby reducing the rendering synthesis pressure of the electronic device and avoiding lagging. For another example, when there are multiple applications preloaded to the virtual screen, the resource management and control module can also freeze and dump the applications that have a reduced probability of being opened by the user among the preloaded applications, thereby further controlling the electronic device. CPU load and memory usage.
可选地,当用户对预加载的应用程序中的某个进行了启动操作(如,点击了相应应用程序的图标),或者其他应用程序调用了预加载的应用程序中的某个时,电子设备便可以将相应的应用程序的显示界面从虚拟屏切换显示到主屏。Optionally, when the user performs a startup operation on one of the preloaded applications (for example, clicks the icon of the corresponding application), or another application calls one of the preloaded applications, the electronic The device can then switch the display interface of the corresponding application from the virtual screen to the home screen.
例如,当用户点击了相应应用程序的图标时,系统进程可以通知预加载管理模块启动相应的应用程序。从而预加载管理模块可以对相应应用程序是否已经预加载到虚拟屏进行判断,若已经预加载到虚拟屏了,则预加载管理模块可以通知资源管控模块解除对相应应用程序的资源管控,通知窗口管理模块解除对相应应用程序的窗口管理,以及通知代理模块解除对相应应用程序的消息的代理管理。并且,预加载管理模块可以将对应的应用程序从虚拟屏转移到主屏(即当前用于显示画面的屏幕)。For example, when the user clicks the icon of the corresponding application, the system process can notify the preload management module to start the corresponding application. Therefore, the preloading management module can determine whether the corresponding application has been preloaded on the virtual screen. If it has been preloaded on the virtual screen, the preloading management module can notify the resource management and control module to release the resource management and control of the corresponding application and notify the window. The management module releases the window management of the corresponding application program, and notifies the agent module to release the agent management of the message of the corresponding application program. Moreover, the preloading management module can transfer the corresponding application program from the virtual screen to the home screen (ie, the screen currently used to display the screen).
基于前述实施例,结合如图6所示的系统架构,电子设备可以对需要预加载的应用程序启动预加载进程,以使需要预加载的应用程序能够在虚拟屏中启动。例如,图11示出了本申请实施例提供的一种应用程序加载方法中启动预加载进程的流程示意图。如图11所示,该启动预加载进程的方式可以包括以下S1101-S1127。Based on the foregoing embodiments, combined with the system architecture shown in Figure 6, the electronic device can start a preloading process for the application program that needs to be preloaded, so that the application program that needs to be preloaded can be started in the virtual screen. For example, FIG. 11 shows a schematic flowchart of starting a preloading process in an application loading method provided by an embodiment of the present application. As shown in Figure 11, the method of starting the preloading process may include the following S1101-S1127.
当预测模块和/或AI模块预测出需要预加载的应用程序时,可以通知预加载模块对相应应用程序进行预加载。例如,以预测模块为例(以下均以此为例),可以执行以下S1101。When the prediction module and/or the AI module predicts an application that needs to be preloaded, the preloading module can be notified to preload the corresponding application. For example, taking the prediction module as an example (the following is used as an example), the following S1101 can be executed.
S1101、预测模块预测出需要预加载的应用程序,将预测结果,如,需要预加载的应用程序的包名以及该应用程序对应的可能被用户使用的时间段(或称为预加载应用程序的使用时间段)发送给预加载模块。S1101. The prediction module predicts the application that needs to be preloaded, and predicts the results, such as the package name of the application that needs to be preloaded and the time period in which the application may be used by the user (or called the preloaded application). usage period) is sent to the preload module.
其中,预测模块可以周期性的对记录的用户行为进行学习,以得到用户行为画像,并将用户行为画像存储起来。从而可根据用户行为画像预测出未来一段时间(如一小时等)内用户可能会使用的应用程序,进而将这些预测出的用户未来一段时间可能使用的应用程序及其对应的可能被使用的时间段作为预测结果。即,将预测出的用户未来一段时间可能使用的应用程序作为需要预加载的应用程序。Among them, the prediction module can periodically learn the recorded user behaviors to obtain user behavior portraits and store the user behavior portraits. Thus, the applications that users may use in the future (such as one hour, etc.) can be predicted based on user behavior portraits, and then the predicted applications that users may use in the future and the corresponding time periods in which they may be used can be predicted. as a prediction result. That is, the predicted applications that users may use in the future are used as applications that need to be preloaded.
通常,预测模块预测出的需要预加载的应用程序包括多个,当然在一些其他可能的实施方式中,某一时刻预测模块也可以仅预测出一个需要预加载的应用程序,此处不做限制。Usually, the prediction module predicts multiple applications that need to be preloaded. Of course, in some other possible implementations, the prediction module can also predict only one application that needs to be preloaded at a certain moment. There is no limitation here. .
需要说明的是预测模块将预测结果发送给预加载模块可以是预加载模块获取时预测模块向预加载模块发送,也可以是预测模块主动发送此处不做限制。例如,预测模块预测出未来一段时间(如一小时)内用户可能使用的应用程序之后,可以主动将这些应用程序的包名以及对应的可能被用户使用的时间段发送给预加载模块。又例如,在电子设备检测到前台应用发生变化且前台应用为Launcher从而确定当前电子设备已退回桌面时,或者检测到电子设备触发了屏幕解锁事件(如监听到系统的ACTION_USER_PRESENT事件的广播)时,又或者检测到电子设备进入多任务窗口时,预加载模块可以主动从预测模块获取未来一段时间(如一小时)内预测出的用户可能使用的应用程序的包名和对应的可能被使用的时间段。示例地,预加载模块从预测模块获取预测结果可以是:预加载模块向预测模块发送获取请求,预测模块接收到请求后向预加载模块发送相应的应用程序包名和对应的可能被使用的时间段。或者,预测模块为预加载模块提供查询接口,从而预加载模块通过查询接口查询相应的应用程序包名和对应的可能被使用的时间段。It should be noted that the prediction module may send the prediction result to the preloading module when the preloading module obtains it, or the prediction module may send the prediction result proactively. There is no limit here. For example, after the prediction module predicts the applications that users may use in the future (such as one hour), it can proactively send the package names of these applications and the corresponding time periods that may be used by users to the preloading module. For another example, when the electronic device detects that the foreground application has changed and the foreground application is Launcher, thereby determining that the current electronic device has returned to the desktop, or detects that the electronic device triggers a screen unlock event (such as listening to the broadcast of the system's ACTION_USER_PRESENT event), Or when it is detected that the electronic device enters the multi-tasking window, the preloading module can actively obtain from the prediction module the package names of the applications that the user may use in a future period of time (such as one hour) and the corresponding time period in which they may be used. For example, the preloading module obtains the prediction results from the prediction module by: the preloading module sends an acquisition request to the prediction module, and after receiving the request, the prediction module sends the corresponding application package name and the corresponding time period that may be used to the preloading module. . Alternatively, the prediction module provides a query interface for the preloading module, so that the preloading module queries the corresponding application package name and the corresponding time period in which it may be used through the query interface.
示例地,预测模块在8点50分可以预测出未来一小时内用户可能使用的应用程序包括9点至9点15分可能被使用的应用程序1,9点10分至9点20分可能被使用的应用程序2以及9点15分至9点20分可能被使用的应用程序3。因此,预测模块在8点50分时可以将上述应用程序1的包名以及其对应的被使用时间段(9点至9点15分),应用程序2的包名以及其对应的被使用时间段(9点10分至9点20分),应用程序3的包名以及其对应的被使用的时间段(9点15分至9点20分)作为预测结果发送给预加载模块。从而便于预加载模块后续根据该预测结果对相应应用程序进行预加载处理。For example, the prediction module can predict at 8:50 that the applications that the user may use in the next hour include application 1 that may be used from 9:00 to 9:15, and application 1 that may be used from 9:10 to 9:20. Application 2 is used and Application 3 may be used between 9:15 and 9:20. Therefore, at 8:50, the prediction module can predict the package name of application 1 and its corresponding usage time period (9:00 to 9:15), the package name of application 2 and its corresponding usage time. segment (9:10 to 9:20), the package name of application 3 and its corresponding used time period (9:15 to 9:20) are sent to the preloading module as prediction results. This facilitates the preloading module to subsequently preload the corresponding application based on the prediction result.
相应地,预加载模块可执行如下S1102。Correspondingly, the preloading module may execute S1102 as follows.
S1102、预加载模块对需要预加载的多个应用程序分别进行入参合法性校验。S1102. The preloading module performs input parameter validity verification on multiple applications that need to be preloaded.
通常,预测模块和/或AI模块在预测出需要预加载的应用程序时,还会预测该需要预加载的应用程序可能被用户使用的时间段。因此,预加载模块对需要预加载的应用程序进行的入参合法性校验,可以包括对应用程序可能被用户使用的时间段进行校验。如,校验当前时间是否已经超过对应需要预加载的应用程序可能被用户使用的时间段,当未超过时则校验通过。从而,能够避免预加载模块在当前时间已经超过可能被用户使用的时间段时对相应应用程序进行预加载,进而减少对不再需要预加载的应用程序进行预加载的情况。Usually, when the prediction module and/or the AI module predicts an application that needs to be preloaded, it also predicts a time period during which the application that needs to be preloaded may be used by the user. Therefore, the preloading module's verification of the validity of the input parameters of the application that needs to be preloaded may include verification of the time period during which the application may be used by the user. For example, verify whether the current time has exceeded the time period in which the corresponding application that needs to be preloaded may be used by the user. If it has not exceeded, the verification is passed. Therefore, it is possible to avoid the preloading module from preloading the corresponding application when the current time has exceeded the time period that may be used by the user, thereby reducing the situation of preloading applications that no longer need to be preloaded.
例如,基于前述S1101中的示例,当预测模块发送的预测结果包括应用程序1的包名以及其对应的被使用时间段(9点至9点15分),应用程序2的包名以及其对应的被使用时间段(9点10分至9点20分),应用程序3的包名以及其对应的被使用的时间段(9点15分至9点20分)时。预加载模块可以根据当前时间,分别对应用程序1、应用程序2以及应用程序3的被使用时间段进行校验。即当前时间未超过9点至9点15分的时间段时则应用程序1校验通过,当前时间未超过9点10分至9点20分的时间段时则应用程序2校验通过,当前时间未超过9点15分至9点20分的时间段时则应用程序3校验通过。For example, based on the above example in S1101, when the prediction result sent by the prediction module includes the package name of application 1 and its corresponding usage time period (9:00 to 9:15), the package name of application 2 and its corresponding The used time period (9:10 to 9:20), the package name of application 3 and its corresponding used time period (9:15 to 9:20). The preloading module can separately verify the usage time periods of Application 1, Application 2 and Application 3 based on the current time. That is, if the current time does not exceed the time period from 9:00 to 9:15, the verification of application 1 passes. When the current time does not exceed the time period from 9:10 to 9:20, the verification of application 2 passes. If the time does not exceed the time period from 9:15 to 9:20, the application 3 verification passes.
一般预测模块和/或AI模块向预加载模块发送的预测结果可以通过特定格式的消息(如字符串)的方式进行发送。因此,预加载模块进行的入参合法性校验还可以是预测模块发送的消息的大小以及信息格式是否满足预设进行校验。例如,当消息的大小大于预设值时,或者消息的信息格式与预设的信息格式不一致时,校验不通过。从而减小遭受外部应用发送消息进行的恶意攻击的几率,避免外部应用试图通过本申请实施例的方式预加载指定应用程序的情况。Generally, the prediction results sent by the prediction module and/or the AI module to the preloading module can be sent in the form of a message in a specific format (such as a string). Therefore, the validity verification of the input parameters performed by the preloading module can also be a verification of the size of the message sent by the prediction module and whether the information format meets the presets. For example, when the size of the message is larger than the preset value, or when the information format of the message is inconsistent with the preset information format, the verification fails. This reduces the probability of suffering malicious attacks from messages sent by external applications, and avoids the situation where external applications try to preload specified applications through the method of the embodiment of the present application.
当然,在一些可能的实施方式中,预加载模块可以分别对预测模块发送的消息的大小、信息格式一致性以及预测模块预测的需要预加载的应用程序可能被用户使用的时间段进行校验,当这些参数均校验通过时才确定入参合法性校验通过。Of course, in some possible implementations, the preloading module can separately verify the size of the message sent by the prediction module, the consistency of the information format, and the time period during which the application that needs to be preloaded may be used by the user predicted by the prediction module. When these parameters all pass the verification, it is determined that the input parameter validity verification has passed.
当预加载模块对预测模块预测出的需要预加载的各应用程序均进行了入参合法性校验之后,预加载模块可以根据如下S1103-S1108来遍历校验通过的各需要预加载的应用程序。After the preloading module has verified the validity of input parameters for each application predicted by the prediction module that needs to be preloaded, the preloading module can traverse each application that has passed the verification and needs to be preloaded according to the following S1103-S1108. .
S1103、预加载模块获取校验通过的各需要预加载的应用程序中的一个(例如S1101中示例的应用程序1等)。S1103. The preloading module obtains one of the application programs that need to be preloaded that passes the verification (for example, the application program 1 illustrated in S1101, etc.).
需要说明的是,由于是遍历所有校验通过的需要预加载的应用程序,因此每次获取的一个应用程序均为之前未获取的一个。It should be noted that since it is traversing all the applications that have passed the verification and need to be preloaded, the one application obtained each time is the one that has not been obtained before.
通常获取的是相应需要预加载的应用程序的包名和其对应的使用时间段。What is usually obtained is the package name of the corresponding application that needs to be preloaded and its corresponding usage time period.
示例地,可以从校验通过的需要预加载的应用程序中随机获取一个应用程序。也可以从校验通过的需要预加载的应用程序中按照各应用程序对应的使用时间段的先后顺序优先获取使用时间段靠前的一个应用程序,此处不做限制。For example, an application can be randomly obtained from the applications that pass the verification and need to be preloaded. You can also first obtain an application with a earlier usage time period from among the applications that have passed the verification and need to be preloaded in accordance with the order of usage time periods corresponding to each application. There is no limit here.
S1104、预加载模块判断当前正在预加载的应用程序以及准备预加载的应用程序是否超过预设数量。S1104. The preloading module determines whether the applications currently being preloaded and the applications to be preloaded exceed the preset number.
需要说明的是,准备预加载的应用程序可以是预加载模块根据S1103-S1108对应用程序进行校验判断之后确定可以被预加载的应用程序,也即准备预加载的应用程序是被确定可以预加载且准备进行预加载的应用程序。当前正在预加载的应用程序可以是AMS正在向虚拟屏上进行加载的应用程序。It should be noted that the application program to be preloaded may be an application program that is determined to be preloaded after the preloading module verifies and determines the application program according to S1103-S1108. That is, the application program to be preloaded is an application program that is determined to be preloaded. The application is loaded and ready for preloading. The application currently being preloaded may be the application that the AMS is loading onto the virtual screen.
其中,预设数量可以根据电子设备的负载能力等进行设置。当超过预设数量时,预加载模块则可以等待一定时长后再重新执行该步骤,当不超过预设数量时,则可以执行后续步骤。从而避免当前准备预加载的应用程序数量过多导致电子设备卡顿或系统堵塞。Among them, the preset number can be set according to the load capacity of the electronic device, etc. When the preset number is exceeded, the preloading module can wait for a certain period of time before re-executing this step. When the preset number is not exceeded, subsequent steps can be executed. This avoids the excessive number of applications that are currently being preloaded, causing the electronic device to freeze or the system to become clogged.
需要说明的是,在本申请实施例中,可以设置一个预加载准备队列(如preloadready list),可将所有准备预加载的应用程序排列在该队列中。例如,如图12所示,当应用程序1和应用程序2均为准备预加载的应用程序时,则可以将应用程序1和应用程序2排列在预加载准备队列中,以便后续按照该队列的顺序从队首依次对准备预加载的应用程序进行预加载。It should be noted that in this embodiment of the present application, a preloading preparation queue (such as preloadready list) may be set, and all applications to be preloaded may be arranged in the queue. For example, as shown in Figure 12, when Application 1 and Application 2 are both applications ready to be preloaded, Application 1 and Application 2 can be arranged in the preloading preparation queue so that they can be followed in accordance with the queue's instructions. The applications to be preloaded are preloaded in order from the head of the queue.
相应地,预加载模块可以通过查询该预加载准备队列中的应用程序的数量,来确定当前准备预加载的应用程序的数量。Correspondingly, the preloading module can determine the number of applications currently ready to be preloaded by querying the number of applications in the preloading preparation queue.
可选地,在本申请实施例中还可以设置一个正在预加载队列(如preloadingmap),可将所有正在预加载的应用程序添加在该队列中。Optionally, in this embodiment of the present application, a preloading queue (such as preloadingmap) can also be set, and all preloading applications can be added to the queue.
还可以设置一个完成预加载队列(如,preloaded map),可将所有已经预加载完成的应用程序添加到该队列中。其中,已经预加载完成的应用程序可以是已经加载到虚拟屏上的应用程序。You can also set up a completed preloading queue (such as preloaded map), and all preloaded applications can be added to the queue. The preloaded application may be an application that has been loaded on the virtual screen.
S1105、预加载模块向应用管理模块请求校验该应用程序,(即S1103获取的各需要预加载的应用程序中的一个)是否安装。S1105. The preloading module requests the application management module to verify whether the application (that is, one of the applications that need to be preloaded obtained in S1103) is installed.
相应地,应用管理模块可以向预加载模块返回该应用程序是否安装的校验结果。Correspondingly, the application management module can return the verification result of whether the application is installed to the preloading module.
示例地,预加载模块可以向应用管理模块发送请求校验是否安装的消息,该消息可以包括该应用程序的包名。应用管理模块可以匹配接收到的包名是否在应用管理模块存储的已安装应用列表中,若能够匹配到,则应用管理模块可以向预加载模块返回指示该应用程序已安装的校验结果。从而,当该应用程序安装时,预加载模块再执行后续步骤,若该应用程序未安装,则预加载模块可以不再处理该应用程序,而重新执行S1103获取另一个需要预加载的应用程序。For example, the preloading module may send a message to the application management module requesting verification of installation, and the message may include the package name of the application. The application management module can match whether the received package name is in the installed application list stored by the application management module. If it can be matched, the application management module can return to the preloading module a verification result indicating that the application has been installed. Therefore, when the application is installed, the preloading module performs subsequent steps. If the application is not installed, the preloading module can no longer process the application and re-execute S1103 to obtain another application that needs to be preloaded.
S1106、预加载模块判断该应用程序是否为正在预加载、或已经预加载完成、或已经运行在前台中的任一种。S1106. The preloading module determines whether the application is being preloaded, has been preloaded, or is already running in the foreground.
示例地,在本申请实施例中,若设置有前述示例中的正在预加载队列(如preloading map),以及完成预加载队列(如,preloaded map)。此时,预加载模块可以根据该应用程序的包名,在上述两个队列中分别进行查询以判断该应用程序是否正在预加载或已经预加载完成。预加载模块还可以通过前台进程来判断该应用程序是否已经运行在前台。从而当该应用程序正在预加载或已经预加载完成或已经运行在前台时,预加载模块可以不再对其进行处理,而是重新执行S1103获取另一个需要预加载的应用程序。而当该应用程序没有正在预加载且没有预加载完成且没有运行在前台时,预加载模块则可以执行后续步骤。For example, in the embodiment of the present application, if there is a preloading queue (such as preloading map) and a completed preloading queue (such as preloaded map) in the previous example. At this time, the preloading module can separately query the above two queues according to the package name of the application to determine whether the application is being preloaded or has been preloaded. The preloading module can also determine whether the application is already running in the foreground through the foreground process. Therefore, when the application is being preloaded or has been preloaded or is already running in the foreground, the preloading module can no longer process it, but re-execute S1103 to obtain another application that needs to be preloaded. When the application is not preloading, has not completed preloading, and is not running in the foreground, the preloading module can perform subsequent steps.
S1107、预加载模块判断该应用程序是否为准备预加载的应用程序。S1107. The preloading module determines whether the application is an application to be preloaded.
示例地,当设置有预加载准备队列时,预加载模块可以根据该应用程序的包名在预加载准备队列中进行查询,以确定该应用程序是否在预加载准备队列中,从而确定其是否为准备预加载的应用程序。从而当该应用程序为准备预加载的应用程序时,预加载模块可以不再对其进行处理,而是重新执行S1103获取另一个需要预加载的应用程序。而当该应用程序不是准备预加载的应用程序时,预加载模块则可以执行后续步骤。For example, when a preloading preparation queue is set, the preloading module can query the preloading preparation queue according to the package name of the application to determine whether the application is in the preloading preparation queue, thereby determining whether it is Prepare preloaded applications. Therefore, when the application is ready to be preloaded, the preloading module may no longer process it, but re-execute S1103 to obtain another application that needs to be preloaded. When the application is not ready to be preloaded, the preloading module can perform subsequent steps.
需要说明的是,在本申请实施例中对于S1104-S1107的执行顺序不做限制。It should be noted that in the embodiment of the present application, there is no restriction on the execution order of S1104-S1107.
S1108、预加载模块根据该应用程序的及时性,将该应用程序设置在准备预加载的应用程序的队列中。S1108. The preloading module sets the application in the queue of applications to be preloaded based on the timeliness of the application.
示例地,当设置有预加载准备队列时,可以根据该应用程序对应的使用时间段确定其及时性,然后将其插入到预加载准备队列中的队首、队中或队尾。示例地,若当前时间即将到达该应用程序对应的使用时间段(如当前时间到达使用时间段所需时间小于或等于预设时间阈值时),则可确定该应用程序的预加载相对紧急(即及时性为紧急),此时可将该应用程序插入到预加载准备队列中的队首。其他情况则可将该应用程序插入到预加载准备队列中的队尾,以便后续按照队列顺序对所有准备预加载的应用程序进行预加载。例如,可以设置预设时间阈值为10分钟,基于图12所示的预加载准备队列,若该应用程序为应用程序3,且对应的使用时间段为9点15分到9点20分,而当前时间为9点10分,与使用时间段相差5分钟,小于预设时间阈值,因此可确定该应用程序的及时性为紧急。如图13所示,可将该应用程序(即应用程序3)插入到预加载准备队列的队首。或者,若当前时间为8点50分,则与使用时间段相差25分钟,大于预设时间阈值,因此可确定该应用程序的及时性为非紧急。如图14所示,可将该应用程序(即应用程序3)插入到预加载准备队列的队尾。For example, when a preload preparation queue is set, the timeliness of the application can be determined based on its corresponding usage period, and then inserted into the head, middle, or tail of the queue in the preload preparation queue. For example, if the current time is about to reach the usage period corresponding to the application (for example, when the time required for the current time to reach the usage period is less than or equal to the preset time threshold), it can be determined that the preloading of the application is relatively urgent (i.e. timeliness is urgent), the application can be inserted into the head of the preload preparation queue. In other cases, the application can be inserted into the tail of the preloading preparation queue so that all applications ready to be preloaded will be preloaded in the order of the queue. For example, you can set the preset time threshold to 10 minutes. Based on the preload preparation queue shown in Figure 12, if the application is application 3, and the corresponding usage time period is 9:15 to 9:20, and The current time is 9:10, which is 5 minutes different from the usage time period and is less than the preset time threshold. Therefore, the timeliness of the application can be determined to be urgent. As shown in Figure 13, the application (ie Application 3) can be inserted into the head of the preload preparation queue. Or, if the current time is 8:50, the difference from the usage time period is 25 minutes, which is greater than the preset time threshold, so the timeliness of the application can be determined to be non-urgent. As shown in Figure 14, the application (ie application 3) can be inserted into the end of the preload preparation queue.
可选地,在本申请实施例的其他一些实施方式中,预测模块还可以在预测结果中根据应用程序对应的使用时间段确定出其及时性(紧急或非紧急)后,对该应用程序的及时性进行标记,如,在预测结果中加入对应应用程序的及时性标识,后续可将该标识随包名和时间段一同发送给预加载模块。从而,预加载模块可直接根据及时性标识确定对应应用程序的及时性。Optionally, in some other implementations of the embodiments of this application, the prediction module may also determine the timeliness (urgent or non-urgent) of the application based on its corresponding usage time period in the prediction results, and then determine the timeliness (urgent or non-urgent) of the application. Mark the timeliness, for example, add the timeliness identifier of the corresponding application to the prediction result, and then send the identifier to the preloading module along with the package name and time period. Therefore, the preloading module can directly determine the timeliness of the corresponding application based on the timeliness identifier.
当预加载模块将一个应用程序设置到准备预加载的应用程序的队列中之后,预加载模块便可以通过系统进程发送MSG_PRELOAD_APP消息(或称为第一消息)到消息队列,以便决策模块从消息队列中按照消息时序接收到MSG_PRELOAD_APP消息时进行后续步骤。即,如图15所示,随着预加载模块遍历预测出的需要预加载的各应用程序,其发送的MSG_PRELOAD_APP消息通常为多个,消息队列中会包括按照时间顺序排列的多个MSG_PRELOAD_APP消息,如消息1、消息2、消息3等,决策模块可以根据MSG_PRELOAD_APP消息的发送时间从消息队列中由队首依次对该消息进行接收和处理。例如,当决策模块每次从消息队列中接收和处理一条MSG_PRELOAD_APP消息时,便会执行如下S1409-S1417。可选地,消息队列中的消息数量和准备预加载的应用程序的数量(如预加载准备队列中的应用程序数量)对应(即相同)。从而保证决策模块和预加载模块多进程处理时,决策模块能够对所有准备预加载的应用程序进行处理而不遗漏。After the preloading module sets an application to the queue of the application to be preloaded, the preloading module can send the MSG_PRELOAD_APP message (or the first message) to the message queue through the system process so that the decision-making module can send the message from the message queue. Perform subsequent steps when the MSG_PRELOAD_APP message is received according to the message timing. That is, as shown in Figure 15, as the preloading module traverses the predicted applications that need to be preloaded, it usually sends multiple MSG_PRELOAD_APP messages, and the message queue will include multiple MSG_PRELOAD_APP messages arranged in chronological order. For example, message 1, message 2, message 3, etc., the decision-making module can receive and process the messages in sequence from the message queue according to the sending time of the MSG_PRELOAD_APP message. For example, when the decision-making module receives and processes a MSG_PRELOAD_APP message from the message queue each time, it will execute the following S1409-S1417. Optionally, the number of messages in the message queue corresponds to (ie is the same as) the number of applications to be preloaded (eg, the number of applications in the preloading preparation queue). This ensures that when the decision-making module and the preloading module are processed by multiple processes, the decision-making module can process all applications to be preloaded without omitting them.
可选地,消息队列可以设置在系统进程中缓存在内存。或者,在如图6所示的系统架构中还可以设置一个消息模块用来创建和管理该消息队列,此处不做限制。Optionally, the message queue can be set up to be cached in memory within the system process. Alternatively, in the system architecture as shown in Figure 6, a message module can also be set up to create and manage the message queue. There is no restriction here.
S1109、决策模块获取准备预加载的应用程序的队列中位于队首的应用程序(例如图13中所示的应用程序3,或如图14所示的应用程序1)。S1109. The decision-making module obtains the application at the head of the queue of applications to be preloaded (for example, application 3 shown in Figure 13, or application 1 shown in Figure 14).
通常,决策模块获取的是应用程序的包名和其对应的使用时间段。示例地,当设置有预加载准备队列时,决策模块可以从预加载准备队列中获取位于队首的应用程序。Usually, the decision-making module obtains the package name of the application and its corresponding usage time period. For example, when a preload preparation queue is set, the decision module may obtain the application at the head of the queue from the preload preparation queue.
可选地,决策模块还可以根据其他顺序或者随机从准备预加载的应用程序的队列中获取一个应用程序,此处不做限制。Optionally, the decision-making module can also obtain an application from the queue of applications to be preloaded according to other orders or randomly, without limitation here.
S1110、决策模块对该应用程序(即决策模块获取的队首的应用程序)进行合法校验。S1110. The decision-making module performs legal verification on the application program (that is, the application program at the head of the team obtained by the decision-making module).
例如,考虑到准备预加载的应用程序在队列中等待被决策模块处理时存在排队等待时间,决策模块获取了该应用程序之后,可以根据当前时间对该应用程序对应的使用时间段进行校验,若当前时间已经超过使用时间段则校验不通过,若未超过使用时间段,则校验通过。从而,避免准备预加载的应用程序因等待被决策模块处理而导致使用时间段已过,却被预加载的情况。For example, considering that there is a queuing time when an application to be preloaded is waiting in the queue to be processed by the decision-making module, after the decision-making module obtains the application, it can verify the usage time period corresponding to the application based on the current time. If the current time has exceeded the usage time period, the verification will not pass. If it has not exceeded the usage time period, the verification will pass. Therefore, it is avoided that the application to be preloaded is preloaded after the usage time period has elapsed due to waiting to be processed by the decision-making module.
可选地,决策模块还可以从应用管理模块获取该应用程序加载所需时长,然后当当前时间加上加载所需时长未超过该应用程序使用时间段时,校验通过。即当该应用程序从当前时间预加载完成后若未超过使用时间段则可执行后续步骤,以便对其预加载,否则说明预加载完成后时间会超过该应用程序使用时间段,为无效预加载,因此验证不通过不再对其处理。Optionally, the decision-making module can also obtain the time required for loading the application from the application management module, and then when the current time plus the time required for loading does not exceed the application usage time period, the verification passes. That is, when the application is preloaded from the current time, if it does not exceed the usage time period, subsequent steps can be performed to preload it. Otherwise, it means that the time after the preloading is completed will exceed the application usage time period, which is invalid preloading. , so if the verification fails, it will no longer be processed.
S1111、决策模块判断该应用程序的重要性。S1111. The decision-making module determines the importance of the application.
其中,该应用程序为用户未来一段时间大概率要使用,或马上就要使用的应用程序等时,可认为该应用程序为重要应用程序。可选地,预测模块还可以在预测结果中根据应用程序的使用时间段以及使用场景和预测概率等,通过重要性标识的方式对应用程序的重要性进行标识,并随包名和使用时间段等一同发送给预加载模块,从而使预加载模块将应用程序添加到准备预加载的应用程序的队列中时,队列中的应用程序能够携带重要性标识。进而决策模块可以在获取队首的应用程序时获取到该应用程序的重要性标识,以根据重要性标识确定该应用程序的重要性。Among them, if the application is an application that the user has a high probability of using in the future, or will use immediately, the application can be considered an important application. Optionally, the prediction module can also identify the importance of the application through importance identification in the prediction results based on the application's usage time period, usage scenarios, predicted probability, etc., along with the package name and usage time period, etc. It is sent to the preloading module together, so that when the preloading module adds the application to the queue of applications to be preloaded, the applications in the queue can carry the importance identifier. Furthermore, the decision-making module can obtain the importance identifier of the application program when acquiring the application program at the head of the queue, so as to determine the importance of the application program based on the importance identifier.
当决策模块确定该应用程序的重要性为非重要时,可执行以下S1112-S1114。When the decision-making module determines that the importance of the application is non-important, the following S1112-S1114 may be executed.
S1112、决策模块从应用管理模块获取该应用程序加载时所耗系统资源。S1112. The decision-making module obtains the system resources consumed by the application when loading from the application management module.
其中,基于前述关于应用管理模块的说明,应用管理模块会预先存储有各已安装应用程序对应的加载所需时长、加载时所耗系统资源等。Among them, based on the aforementioned description of the application management module, the application management module will pre-store the loading time corresponding to each installed application, the system resources consumed during loading, etc.
相应地,在决策模块获取该应用程序加载时所耗系统资源时,应用管理模块可以向决策模块返回该应用程序加载时所耗系统资源。Correspondingly, when the decision-making module obtains the system resources consumed when the application is loaded, the application management module may return the system resources consumed when the application is loaded to the decision-making module.
例如,决策模块可以向应用管理模块发送获取加载时所耗系统资源的请求,并携带该应用程序的包名。由于应用管理模块从三方特征库中已匹配出了各已安装的应用程序对应的加载所耗系统资源,所以应用管理模块可以根据包名查找相应应用程序对应的加载所耗系统资源并返回给决策模块。For example, the decision-making module can send a request to the application management module to obtain the system resources consumed during loading, and carry the package name of the application. Since the application management module has matched the loading system resources corresponding to each installed application from the third-party feature library, the application management module can find the loading system resources corresponding to the corresponding application according to the package name and return it to the decision-making module.
S1113、决策模块从负载监控模块获取当前电子设备的系统资源。S1113. The decision-making module obtains the system resources of the current electronic device from the load monitoring module.
需要说明的是,基于前述关于负载监控模块的说明,负载监控模块可周期性或实时的检测电子设备的系统资源,从而便于在决策模块获取电子设备当前的系统资源时向决策模块返回当前电子设备的系统资源。It should be noted that, based on the foregoing description of the load monitoring module, the load monitoring module can detect the system resources of the electronic device periodically or in real time, so as to facilitate returning the current electronic device to the decision-making module when the decision-making module obtains the current system resources of the electronic device. system resources.
例如,决策模块可以向负载监控模块发送获取系统资源的请求。For example, the decision-making module can send a request to obtain system resources to the load monitoring module.
相应地,负载监控模块可以向决策模块返回当前电子设备的系统资源。Correspondingly, the load monitoring module may return the system resources of the current electronic device to the decision-making module.
S1114、决策模块根据当前电子设备的系统资源以及该应用程序加载时所耗系统资源,确定当前系统资源是否支持预加载该应用程序(即当前的系统资源是否够应用程序加载时消耗,若够则支持预加载该应用程序),若支持则执行后续步骤,若不支持则延迟预设时长后发送MSG_PRELOAD_APP消息到消息队列,然后决策模块可以重新从消息队列中获取一条消息以便后续决策模块根据消息队列中的消息重新开始执行S1109及后续步骤。从而避免在系统资源不支持预加载该应用程序时对其进行预加载导致系统卡顿。S1114. The decision-making module determines whether the current system resources support preloading of the application based on the system resources of the current electronic device and the system resources consumed when the application is loaded (that is, whether the current system resources are sufficient to be consumed when the application is loaded, and if so, then Support preloading the application), if supported, perform subsequent steps, if not supported, delay the preset time and send the MSG_PRELOAD_APP message to the message queue, and then the decision-making module can re-obtain a message from the message queue so that the subsequent decision-making module can based on the message queue message in to restart S1109 and subsequent steps. This avoids system lags caused by preloading the application when system resources do not support preloading it.
其中,由于决策模块延迟一定时长后发送消息到消息队列并重新对预加载准备队列中的一个应用程序进行预加载,因此预加载准备队列中的应用程序数量并没有因有应用程序被加载到虚拟屏而减少。所以此处决策模块发送消息到消息队列能够保证消息队列中的消息与预加载准备队列中的应用程序数量一致。Among them, because the decision-making module delays for a certain period of time before sending a message to the message queue and re-preloads an application in the preload preparation queue, the number of applications in the preload preparation queue does not change due to the fact that an application is loaded into the virtual screen and decrease. Therefore, the decision-making module here sends messages to the message queue to ensure that the number of messages in the message queue is consistent with the number of applications in the preloading preparation queue.
若当前系统资源支持预加载该应用程序,则可执行后续步骤。If the current system resources support preloading the application, you can perform the next steps.
示例地,根据当前电子设备的系统资源以及该应用程序加载时所耗系统资源,确定当前系统资源是否支持预加载该应用程序可以是:当系统资源为CPU负载时,判断当前负载和加载所耗负载之和是否大于预设阈值1,若大于,则确定当前系统资源不支持加载该应用程序,否则可确定当前系统资源支持加载该应用程序。当系统资源为内存占用时,判断当前内存占用减去加载所耗内存占用的值是否小于预设阈值2,若小于,则确定当前系统资源不支持加载该应用程序,否则可确定当前系统资源支持加载该应用程序。For example, based on the system resources of the current electronic device and the system resources consumed when the application is loaded, determining whether the current system resources support preloading the application may be: when the system resource is a CPU load, determining the current load and the time consumed by loading. Whether the sum of loads is greater than the preset threshold 1, if it is greater, it is determined that the current system resources do not support loading of the application, otherwise it is determined that the current system resources support loading of the application. When the system resources are memory occupied, it is determined whether the current memory occupied minus the memory occupied by loading is less than the preset threshold 2. If it is less than the preset threshold 2, it is determined that the current system resources do not support loading the application, otherwise it can be determined that the current system resources support Load the application.
需要说明的是,当决策模块确定应用程序的重要性为重要时,决策模块可以不考虑当前系统资源是否支持预加载该应用程序。即,不执行上述S1112-S1114。It should be noted that when the decision-making module determines that the importance of an application is important, the decision-making module may not consider whether the current system resources support preloading the application. That is, the above-mentioned S1112-S1114 are not executed.
S1115、决策模块从应用管理模块获取上次预加载的应用程序预加载所需时长(即加载所需时长,或称为加载时长)。S1115. The decision-making module obtains the time required for preloading the last preloaded application (ie, the time required for loading, or the loading time) from the application management module.
其中,基于前述关于应用管理模块的说明,应用管理模块会预先存储有各已安装应用程序对应的加载所需时长、加载时所耗系统资源等。Among them, based on the aforementioned description of the application management module, the application management module will pre-store the loading time corresponding to each installed application, the system resources consumed during loading, etc.
相应地,在决策模块获取该应用程序预加载所需时长(即加载所需时长)时,应用管理模块可以向决策模块返回该应用程序加载所需时长。Correspondingly, when the decision-making module obtains the time required for preloading the application (ie, the time required for loading), the application management module may return the time required for loading the application to the decision-making module.
例如,决策模块可以向应用管理模块发送获取加载所需时长的请求,并携带上次预加载的应用程序的包名(可从预加载模块获取上次预加载的应用程序的包名)。由于应用管理模块从三方特征库中已匹配出了各已安装的应用程序对应的加载所需时长,所以应用管理模块可以根据包名查找相应应用程序对应的加载所需时长并返回给决策模块。For example, the decision-making module can send a request to obtain the loading time to the application management module, and carry the package name of the last preloaded application (the package name of the last preloaded application can be obtained from the preloading module). Since the application management module has matched the loading time corresponding to each installed application from the third-party feature library, the application management module can find the loading time corresponding to the corresponding application based on the package name and return it to the decision-making module.
S1116、决策模块根据当前时间、上次预加载的应用程序加载所需时长以及上次预加载的应用程序开始预加载时的时间(可选地,预加载模块中可记录上次预加载的应用程序的包名及开始预加载的时间,从而决策模块可从预加载模块中获取上次预加载的应用程序开始预加载时的时间),确定上次预加载的应用程序是否正在加载(即确定当前是否存在正在预加载的应用程序),若没有正在预加载则执行后续步骤,若正在加载则延迟预设时长后发送MSG_PRELOAD_APP消息到消息队列,然后决策模块可以重新从消息队列中获取一条消息以便后续决策模块根据消息队列中的消息重新开始执行S1109及后续步骤。从而避免因对该应用程序进行预加载而影响正在预加载的应用程序。S1116. The decision-making module determines based on the current time, the time required to load the last preloaded application, and the time when the last preloaded application started preloading (optionally, the last preloaded application can be recorded in the preloading module). The package name of the program and the time when preloading started, so that the decision-making module can obtain the time when the last preloaded application started preloading from the preloading module), and determine whether the last preloaded application is loading (that is, determine Whether there is currently an application being preloaded), if it is not being preloaded, perform subsequent steps, if it is loading, delay the preset time and send the MSG_PRELOAD_APP message to the message queue, and then the decision-making module can re-obtain a message from the message queue for The subsequent decision-making module restarts S1109 and subsequent steps based on the message in the message queue. This avoids preloading the application from affecting the application being preloaded.
其中,由于决策模块延迟一定时长后发送消息到消息队列并重新对预加载准备队列中的一个应用程序进行预加载,因此预加载准备队列中的应用程序数量并没有因有应用程序被加载到虚拟屏而减少。所以此处决策模块发送消息到消息队列能够保证消息队列中的消息与预加载准备队列中的应用程序数量一致。Among them, because the decision-making module delays for a certain period of time before sending a message to the message queue and re-preloads an application in the preload preparation queue, the number of applications in the preload preparation queue does not change due to the fact that an application is loaded into the virtual screen and decrease. Therefore, the decision-making module here sends messages to the message queue to ensure that the number of messages in the message queue is consistent with the number of applications in the preloading preparation queue.
示例地,根据当前时间、上次预加载的应用程序加载所需时长以及上次预加载的应用程序开始预加载时的时间,确定上次预加载的应用程序是否正在加载可以是:判断上次预加载的应用程序开始预加载时的时间加上其加载所需时长,是否小于或等于当前时间。若小于或等于则确定没有正在加载,若大于则说明正在加载。For example, determining whether the last preloaded application is loading based on the current time, how long it took for the last preloaded application to load, and the time when the last preloaded application started preloading may be: Determine the last Whether the time when the preloaded application starts preloading plus the time it takes to load is less than or equal to the current time. If it is less than or equal to, it means it is not loading. If it is greater, it means it is loading.
通过该步骤可以确定出当前是否存在正在预加载的应用程序,从而避免加载该应用程序时对正在预加载的应用程序造成影响。当然,在本申请的其他一些可能的实施方式中,还可以通过其他方式来确定是否存在正在预加载的应用程序,此处不做限制。Through this step, it can be determined whether there is currently an application being preloaded, thereby avoiding impact on the application being preloaded when loading the application. Of course, in some other possible implementations of the present application, other methods can be used to determine whether there is an application being preloaded, which is not limited here.
S1117、决策模块将该应用程序的包名发送给预加载模块。S1117. The decision-making module sends the package name of the application to the preloading module.
S1118、预加载模块从虚拟屏管理模块获取虚拟屏参数。S1118. The preloading module obtains virtual screen parameters from the virtual screen management module.
例如,预加载模块向虚拟屏管理模块发送获取虚拟屏参数的请求。For example, the preloading module sends a request to obtain virtual screen parameters to the virtual screen management module.
相应地,虚拟屏管理模块会向预加载模块返回虚拟屏参数。其中,虚拟屏参数可以包括虚拟屏唯一编码(identity document,ID)。Correspondingly, the virtual screen management module will return the virtual screen parameters to the preloading module. The virtual screen parameters may include a virtual screen unique code (identity document, ID).
可选地,当预加载模块获取虚拟屏参数时,若虚拟屏管理模块确定虚拟屏不存在,则虚拟屏管理模块会创建一个虚拟屏然后向预加载模块返回该虚拟屏的虚拟屏参数(如虚拟屏ID)。当预加载模块获取虚拟屏参数时,若虚拟屏管理模块确定虚拟屏未打开,则虚拟屏管理模块会打开虚拟屏然后向预加载模块返回该虚拟屏的虚拟屏参数。其中,虚拟屏的创建和打开均可通过屏幕管理服务(DisplayManagerService,DMS)来实现。例如,虚拟屏管理模块可以向DMS发送创建或打开虚拟屏的请求,DMS接收到请求后便可以创建或打开虚拟屏,并将虚拟屏的虚拟屏参数返回给虚拟屏管理模块。Optionally, when the preloading module obtains the virtual screen parameters, if the virtual screen management module determines that the virtual screen does not exist, the virtual screen management module will create a virtual screen and then return the virtual screen parameters of the virtual screen to the preloading module (such as virtual screen ID). When the preloading module obtains the virtual screen parameters, if the virtual screen management module determines that the virtual screen is not open, the virtual screen management module will open the virtual screen and return the virtual screen parameters of the virtual screen to the preloading module. Among them, the creation and opening of the virtual screen can be realized through the screen management service (DisplayManagerService, DMS). For example, the virtual screen management module can send a request to create or open a virtual screen to the DMS. After receiving the request, the DMS can create or open the virtual screen and return the virtual screen parameters of the virtual screen to the virtual screen management module.
S1119、预加载模块从应用管理模块获取启动该应用程序所需的启动参数。S1119. The preloading module obtains the startup parameters required to start the application from the application management module.
相应地,应用管理模块可以向预加载模块返回启动参数。Correspondingly, the application management module can return startup parameters to the preloading module.
其中,启动参数可以包括启动方式(如标准模式(standard)、栈顶复用模式(singleTop)、栈内复用模式(singleTask)、单例模式(singleInstance)等),要启动的进程,要启动的界面等。Among them, the startup parameters can include the startup mode (such as standard mode (standard), stack top reuse mode (singleTop), in-stack reuse mode (singleTask), singleton mode (singleInstance), etc.), the process to be started, the process to be started interface, etc.
可选地,预加载模块在获取到虚拟屏参数和/或启动参数之后,还可以根据当前时间更新最新预加载的应用程序(即决策模块当前处理的该应用程序,也即第二应用程序)的开始加载时间,以及最新预加载的应用程序的包名。从而便于下一次决策模块执行S1116时使用。还可以将该应用程序从准备预加载的应用程序的队列中移除,并放到正在预加载的应用程序的队列中。Optionally, after obtaining the virtual screen parameters and/or startup parameters, the preloading module can also update the latest preloaded application (that is, the application currently processed by the decision-making module, that is, the second application) according to the current time. The start loading time, and the package name of the latest preloaded application. This is convenient for use when the decision-making module executes S1116 next time. You can also remove the application from the queue of applications ready to be preloaded and place it in the queue of applications being preloaded.
S1120、预加载模块向AMS发送启动该应用程序的界面的请求(如startActivity)。其中,该请求中可以携带S1119中获取的启动参数以及S1118中获取的虚拟屏参数。S1120. The preloading module sends a request to start the interface of the application program (such as startActivity) to the AMS. The request may carry the startup parameters obtained in S1119 and the virtual screen parameters obtained in S1118.
S1121、AMS向预加载管理模块发送启动该应用程序的界面的请求。S1121. The AMS sends a request to start the interface of the application program to the preloading management module.
S1122、预加载管理模块确定该请求为预加载模块的请求。S1122. The preloading management module determines that the request is a request for a preloading module.
示例地,在预加载模块向AMS发送启动该应用程序的界面的请求时,该请求中可以携带有相应的来源信息,从而预加载管理模块可以根据AMS转发来的请求中的来源信息来确定该请求是否为预加载模块发送的请求。For example, when the preloading module sends a request to AMS to launch the interface of the application, the request may carry corresponding source information, so that the preloading management module can determine the request based on the source information in the request forwarded by AMS. Whether the request is a request sent by a preloaded module.
S1123、预加载管理模块确定该应用程序为冷启动。S1123. The preload management module determines that the application is a cold start.
示例地,预加载管理模块可以根据当前是否存在该应用程序的进程来判断该应用程序是否为冷启动。即当前不存在该应用程序的进程时,可确定该应用程序为冷启动。从而,可避免根据应用程序内切换界面时发起的启动应用程序界面的请求将对应应用程序界面启动到了虚拟屏。For example, the preload management module may determine whether the application is a cold start based on whether a process of the application currently exists. That is, when there is currently no process for the application, it can be determined that the application is a cold start. Therefore, it is possible to avoid launching the corresponding application interface to the virtual screen based on the request to start the application interface initiated when switching interfaces within the application.
S1124、预加载管理模块确定存在启动该应用程序的界面的请求中指定的虚拟屏。S1124. The preloading management module determines that the virtual screen specified in the request to start the interface of the application program exists.
示例地,预加载管理模块可以通过DMS来确定虚拟屏是否存在。例如,预加载管理模块可以向DMS发送携带虚拟屏参数的确认虚拟屏是否存在的请求,DMS可根据接收到的虚拟屏参数确定对应的虚拟屏是否存在并返回给预加载管理模块。For example, the preload management module can determine whether the virtual screen exists through DMS. For example, the preload management module can send a request carrying virtual screen parameters to the DMS to confirm whether the virtual screen exists. The DMS can determine whether the corresponding virtual screen exists based on the received virtual screen parameters and return it to the preload management module.
S1125、预加载管理模块确定虚拟屏上的应用程序数量未达到阈值。示例地的阈值可以是5个。可选地,可以根据虚拟屏上显示的应用程序界面数量,或者完成预加载队列中的应用程序数量等来确定虚拟屏上的应用程序数量。S1125. The preload management module determines that the number of applications on the virtual screen does not reach the threshold. An example threshold may be 5. Optionally, the number of application programs on the virtual screen can be determined based on the number of application program interfaces displayed on the virtual screen, or the number of applications in the preloading queue.
当确定虚拟屏上的应用程序未达到阈值时再执行后续步骤,可避免因虚拟屏上启动的应用程序过多导致系统资源占用过大影响前台应用的情况。When it is determined that the applications on the virtual screen have not reached the threshold before performing subsequent steps, this can avoid excessive system resource usage affecting foreground applications due to too many applications being launched on the virtual screen.
可选地,预加载管理模块可以保存当前使用的虚拟屏参数。以便记录当前被用于预加载应用程序的虚拟屏。Optionally, the preload management module can save the currently used virtual screen parameters. In order to record the virtual screen currently being used to preload the application.
S1126、预加载管理模块向AMS发送确定启动该应用程序的界面的指示。S1126. The preloading management module sends an instruction to the AMS to determine the interface for starting the application.
S1127、AMS根据预加载模块发送的启动该应用程序的界面的请求中携带的虚拟屏参数和启动参数启动该应用程序的界面到虚拟屏。S1127. The AMS starts the interface of the application program to the virtual screen according to the virtual screen parameters and startup parameters carried in the request to start the interface of the application program sent by the preloading module.
通常,通过AMS将应用程序启动到虚拟屏时,该应用程序能够在虚拟屏上运行显示到第一界面,该第一界面即用户期望的界面,可以是应用程序冷启动后无用户操作情况下最终停留的界面,如主界面或登陆界面等。Usually, when an application is launched to a virtual screen through AMS, the application can be run on the virtual screen and displayed to the first interface. The first interface is the interface expected by the user, which can be the case without user operation after the application is cold-started. The final interface to stay on, such as the main interface or login interface, etc.
相应地,当该应用程序启动到虚拟屏上时,虚拟屏上的应用程序数量会相应加1。Correspondingly, when the application is launched on the virtual screen, the number of applications on the virtual screen will be increased by 1 accordingly.
可选地,AMS在启动该应用程序的界面到虚拟屏时,还可以向ActivityRecord指示显示该应用程序的窗口(如发送showStartingWindow()指示),以指示其不显示该应用程序的启动动效。如此,能够使应用程序在预加载到虚拟屏时不显示启动动效,从而降低对应用程序进行预加载时的系统负载。Optionally, when AMS starts the interface of the application to the virtual screen, it can also instruct ActivityRecord to display the window of the application (such as sending a showStartingWindow() instruction) to instruct it not to display the startup effect of the application. In this way, the startup animation will not be displayed when the application is preloaded on the virtual screen, thereby reducing the system load when the application is preloaded.
可选地,在S1126之后预加载管理模块还可以将该应用程序从正在预加载应用程序的队列移入已完成预加载的应用程序队列中。Optionally, after S1126, the preloading management module may also move the application from the queue of preloading applications into the queue of applications that have completed preloading.
或者,在AMS启动该应用程序的界面到虚拟屏时,可以为AMS启动的该应用程序的Activity对应的ActivityRecord对象设置一个预加载标签(flag)以指示该应用程序为预加载到虚拟屏的应用程序。例如,该预加载标签为默认值(如0)时表示应用程序不是预加载到虚拟屏的应用程序,当预加载标签为指定值(如1)时表示应用程序是预加载到虚拟屏的应用程序。Alternatively, when AMS starts the application's interface to the virtual screen, a preloading label (flag) can be set for the ActivityRecord object corresponding to the Activity of the application started by AMS to indicate that the application is an application preloaded to the virtual screen. program. For example, when the preloading tag is a default value (such as 0), it means that the application is not preloaded to the virtual screen. When the preloading tag is a specified value (such as 1), it means that the application is preloaded to the virtual screen. program.
当应用程序被预加载到虚拟屏之后,用户对相应应用程序进行启动操作(如用户点击相应的应用程序的图标)时,相应的应用程序便能够从虚拟屏显示切换到在主屏上进行显示。从而,预加载到虚拟屏上的应用程序在被用户主动启动时,相应应用程序的界面便能够直接显示到主屏上,而不需要用户等待,从而提高用户启动应用程序时的使用体验。After the application is preloaded on the virtual screen and the user launches the corresponding application (for example, the user clicks on the icon of the corresponding application), the corresponding application can be switched from display on the virtual screen to display on the home screen. Therefore, when an application preloaded on the virtual screen is actively launched by the user, the interface of the corresponding application can be directly displayed on the home screen without the user waiting, thereby improving the user experience when launching the application.
可选地,在本申请实施例中,当电子设备启动了相应应用程序的进程到虚拟屏之后,启动到虚拟屏中的应用程序可能会发送一些消息、广播或通知等,还可能会有弹窗等。这些消息、广播、通知或弹窗都有可能会影响到当前电子设备显示在主屏上的当前应用程序。因此为了使用户对应用程序预加载到虚拟屏上无感知,当电子设备启动了相应应用程序的进程到虚拟屏之后,还可以对预加载启动的应用程序的相关资源进行管控,以避免应用程序的预加载影响用户正常使用当前使用的应用程序。例如,图16示出了本申请实施例提供的一种应用程序加载方法中管控预加载后的应用程序的流程示意图。如图16所示,该管控预加载后的应用程序的流程可以包括以下S1601-S1606。Optionally, in this embodiment of the present application, when the electronic device starts the process of the corresponding application program to the virtual screen, the application program started in the virtual screen may send some messages, broadcasts or notifications, etc., and may also have pop-up messages. Windows etc. These messages, broadcasts, notifications or pop-ups may affect the current applications displayed on the home screen of the current electronic device. Therefore, in order to prevent the user from being aware of the application being preloaded on the virtual screen, when the electronic device starts the process of the corresponding application to the virtual screen, the related resources of the preloaded and started application can also be managed and controlled to prevent the application from being preloaded. The preloading affects the normal use of the currently used application by the user. For example, FIG. 16 shows a schematic flowchart of managing a preloaded application in an application loading method provided by an embodiment of the present application. As shown in Figure 16, the process of managing the preloaded application may include the following S1601-S1606.
基于如图11所示方法,AMS预加载启动相应的应用程序之后,可以执行如下S1601,以确定预加载到虚拟屏上的应用程序。Based on the method shown in Figure 11, after AMS preloads and starts the corresponding application, the following S1601 can be executed to determine the application to be preloaded on the virtual screen.
S1601、AMS通知预加载管理模块相应应用程序(如加载到虚拟屏上的至少一个应用程序中的第一应用程序)预加载启动完成。S1601. The AMS notifies the preload management module that the preloading and startup of the corresponding application program (such as the first application program among at least one application program loaded on the virtual screen) is completed.
相应地,预加载管理模块可确定相应应用程序预加载到了虚拟屏上,即根据AMS的通知确定预加载到虚拟屏上的应用程序。Correspondingly, the preloading management module can determine that the corresponding application is preloaded on the virtual screen, that is, the application that is preloaded on the virtual screen is determined based on the notification from the AMS.
其中,应用程序预加载启动完成可以是指AMS将相应应用程序的进程启动完成。The completion of application preloading and startup may refer to the completion of AMS starting the process of the corresponding application.
示例地,AMS将相应应用程序预加载启动后,通知预加载管理模块时,可以携带与相应应用程序关联的预加载标签,以用于标记相应应用程序为预加载到虚拟屏的应用程序,从而便于后续步骤中可根据该标识确定应用程序为预加载到虚拟屏的应用程序。该预加载标签可以是在AMS启动该应用程序的界面到虚拟屏时,为AMS启动的该应用程序的Activity对应的ActivityRecord对象设置一个预加载标签(flag)。例如,该预加载标签为默认值(如0)时表示应用程序不是预加载到虚拟屏的应用程序,当预加载标签为指定值(如1)时表示应用程序是预加载到虚拟屏的应用程序。For example, after the AMS starts preloading the corresponding application, when notifying the preloading management module, the AMS can carry a preloading tag associated with the corresponding application to mark the corresponding application as an application preloaded to the virtual screen, thereby In subsequent steps, the application can be determined based on this identification as an application preloaded on the virtual screen. The preloading tag may be to set a preloading tag (flag) for the ActivityRecord object corresponding to the activity of the application started by AMS when the AMS starts the interface of the application to the virtual screen. For example, when the preloading tag is a default value (such as 0), it means that the application is not preloaded to the virtual screen. When the preloading tag is a specified value (such as 1), it means that the application is preloaded to the virtual screen. program.
S1602、预加载管理模块通知资源管控模块将相应应用程序的进程设为后台分组以及可感知进程。示例地,预加载管理模块可以将相应应用程序的包名发送给资源管控模块,以便资源管控模块对相应应用程序进行管控。S1602. The preloading management module notifies the resource management and control module to set the process of the corresponding application as a background group and perceptible process. For example, the preload management module can send the package name of the corresponding application to the resource management and control module, so that the resource management and control module can manage and control the corresponding application.
通常,系统会对应用程序的进程提供多种分组。例如,后台分组(THREAD_GROUP_BACKGROUND)、前台分组(THREAD_GROUP_FOREGROUND)等分组,其中前台分组的优先级高于后台分组,也就是在这个分组的进程及其对应的线程极大概率会运行在超大核。而系统在加载应用程序时,相应进程启动后系统通常会判断该应用程序是否有界面显示,若有则会将相应进程设置为优先级较高的分组,并且会伴随着提频操作。而由于预加载到虚拟屏的应用程序其界面会显示在虚拟屏,因此根据当前系统流程,其进程会被设置为高优先级分组。因此,为了尽可能的不去干扰用户当前正在使用的应用程序,故可以在应用程序预加载启动后,将其对应的进程的分组设为优先级较低的后台分组,以便系统根据后台进程的策略对相应进程进行处理。Typically, the system provides various groupings of an application's processes. For example, background grouping (THREAD_GROUP_BACKGROUND), foreground grouping (THREAD_GROUP_FOREGROUND) and other groups, in which the priority of the foreground grouping is higher than that of the background grouping, that is, the process in this grouping and its corresponding thread will most likely run on the ultra-large core. When the system loads an application, after the corresponding process is started, the system usually determines whether the application has an interface to display. If so, the corresponding process will be set to a higher priority group, and will be accompanied by a frequency increase operation. Since the interface of the application preloaded to the virtual screen will be displayed on the virtual screen, its process will be set as a high-priority group according to the current system process. Therefore, in order not to interfere with the application currently being used by the user as much as possible, after the application preloading is started, the grouping of the corresponding process can be set as a background grouping with a lower priority, so that the system can adjust the background process according to the background grouping. The policy handles the corresponding process.
例如,如图17所示,资源管控模块可以在接收到预加载管理模块的通知后,对相应应用程序是否为预加载到虚拟屏的应用程序进行判断(例如,基于S1601中的示例,可根据通知中是否包括用于标记相应应用程序为预加载到虚拟屏的应用程序的标识来判断相应应用程序是否为预加载到虚拟屏的应用程序)。当确定是预加载到虚拟屏的应用程序时,资源管控模块可以将对应的进程的分组设为后台分组。当确定不是预加载到虚拟屏的应用程序时,资源管控模块可以不对相应进程进行管控,以便相应进程按系统正常流程进行处理。For example, as shown in Figure 17, the resource management and control module can determine whether the corresponding application is an application preloaded to the virtual screen after receiving a notification from the preload management module (for example, based on the example in S1601, it can be based on Whether the notification includes an identifier used to mark the corresponding application as an application preloaded to the virtual screen is used to determine whether the corresponding application is an application preloaded to the virtual screen). When it is determined that the application is preloaded to the virtual screen, the resource management and control module can set the group of the corresponding process as a background group. When it is determined that the application is not preloaded to the virtual screen, the resource management and control module may not control the corresponding process, so that the corresponding process can be processed according to the normal process of the system.
系统通常还会对应用程序的进程设置相应的adj值(或称为优先级值),以通过adj值来标识相应进程对应的优先级。一般adj值从高到底大致为native进程(-1000),系统进程(-900),常驻进程(-800),前台应用(0),最近到前台显示的应用(50),可见应用(100),AService(500),可感知进程(700),B Service(800),无用进程(950)等,adj值越高则优先级越低,相应的进程越容易被系统内存清理掉。在加载应用程序后,根据场景的变化,可能会更新加载的应用程序的进程的adj值。通常预加载到虚拟屏的应用程序的进程的adj值会被判定为950(无用进程),因此,需要在预加载的应用程序的进程启动完成后将相应的进程的adj值设为相对较低的值(如低于预设值的值,该预设值可根据实际情况设置)。例如,预设值可以是B Service对应的值,如800。因此可将预加载到虚拟屏的应用程序的进程的adj值设为可感知进程对应的值,如700,或者可见应用对应的值,如100等。从而在避免相应进程对用户正常使用的应用程序造成影响的同时,避免相应进程因优先级较低而轻易被清理掉。The system usually also sets a corresponding adj value (or priority value) for the application process to identify the priority of the corresponding process through the adj value. Generally, the adj values from high to low are native process (-1000), system process (-900), resident process (-800), foreground application (0), recently displayed application in the foreground (50), visible application (100) ), AService (500), perceptible process (700), B Service (800), useless process (950), etc. The higher the adj value, the lower the priority, and the corresponding process is easier to be cleaned up by the system memory. After the application is loaded, the adj value of the process of the loaded application may be updated based on changes in the scene. Usually the adj value of the process of the application preloaded to the virtual screen will be judged to be 950 (useless process). Therefore, it is necessary to set the adj value of the corresponding process to a relatively low value after the process of the preloaded application is started. value (if it is lower than the preset value, the preset value can be set according to the actual situation). For example, the default value can be the value corresponding to B Service, such as 800. Therefore, the adj value of the process of the application preloaded on the virtual screen can be set to the value corresponding to the perceptible process, such as 700, or the value corresponding to the visible application, such as 100, etc. This prevents the corresponding process from affecting the normal applications used by users and prevents the corresponding process from being easily cleaned up due to low priority.
例如,如图18所示,资源管控模块可以在检测到进程的adj值更新时(如Activity切换、绑定服务、解绑服务以及用户界面便可见等场景下对应进程的adj值会更新),判断更新adj值的进程是否为预加载到虚拟屏的应用程序的进程,若是则更新该进程的adj值为可感知进程对应的值。并判断该进程的分组是否为后台分组,若不是则设置其分组为后台分组。若更新adj值的进程不是预加载到虚拟屏的应用程序的进程,则资源管控模块可以不对该进程的adj值更新进行管控,以便相应进程按系统正常流程进行adj值更新。For example, as shown in Figure 18, the resource management and control module can detect that the adj value of the process is updated (for example, the adj value of the corresponding process will be updated in scenarios such as Activity switching, binding services, unbinding services, and the user interface is visible), Determine whether the process that updates the adj value is the process of the application preloaded to the virtual screen. If so, update the adj value of the process to the value corresponding to the perceptible process. And determine whether the grouping of the process is a background grouping, and if not, set its grouping to a background grouping. If the process that updates the adj value is not the process of the application preloaded to the virtual screen, the resource management and control module may not control the update of the adj value of the process, so that the corresponding process updates the adj value according to the normal process of the system.
可选地,为了避免AMS将应用程序预加载启动到虚拟屏时,CPU进行提频而影响用户使用正在使用的应用程序。在AMS加载启动应用程序时,AMS可以对相应应用程序是否为预加载的应用程序进行判断(例如,基于图11所示方法中的S1120,AMS可根据接收到的启动请求中是否指定了启动到虚拟屏来判断当前要启动的应用程序是否为预加载的应用程序)。当确定为预加载应用程序时,AMS可以指示资源管控模块禁止CPU进行提频操作。当确定不是预加载应用程序时,AMS可以按照正常启动应用程序流程处理。Optionally, in order to prevent the CPU from increasing the frequency when AMS preloads and launches applications to the virtual screen, affecting the user's ability to use the application in use. When AMS loads a startup application, AMS can determine whether the corresponding application is a preloaded application (for example, based on S1120 in the method shown in Figure 11, AMS can determine whether the startup request is specified in the received startup request. Virtual screen to determine whether the application currently to be launched is a preloaded application). When an application is determined to be preloaded, AMS can instruct the resource management module to prohibit the CPU from performing frequency increase operations. When it is determined that the application is not preloaded, AMS can process it according to the normal application startup process.
可选地,相应应用程序在预加载时,资源管控模块还可以对其使用的资源进行限制,如禁止将该应用程序的相关进程绑定到处理器大核上,并禁止处理器提频一定时长(如相应应用程序预加载所需的时长),即限制处理器在预加载应用程序时提频。Optionally, when the corresponding application is preloaded, the resource management and control module can also limit the resources used by it, such as prohibiting the application's related processes from being bound to the processor's large core, and prohibiting the processor from increasing the frequency for a certain amount of time. Duration (such as the time required to preload the corresponding application), that is, limiting the processor frequency increase when preloading the application.
S1603、预加载管理模块指示窗口管理模块对相应应用程序的通知进行缓存。S1603. The preload management module instructs the window management module to cache the notification of the corresponding application.
通常电子设备主屏显示的通知栏中会显示有所有应用程序所接收到的通知,因此当预加载的应用程序启动后,若该应用程序接收到了通知,则该通知也会显示在主屏的通知栏中。因此,为了避免预加载到虚拟屏的应用程序接收到的通知显示到主屏的通知栏中,则需要对预加载的应用程序的通知进行缓存使其暂时不显示,直到用户主动启动该应用程序时(如电子设备接收到用户启动相应应用程序的操作时)再将通知显示在通知栏。Usually the notification bar displayed on the home screen of an electronic device will display notifications received by all applications. Therefore, when a preloaded application is launched, if the application receives a notification, the notification will also be displayed in the notification bar of the home screen. middle. Therefore, in order to prevent notifications received by applications preloaded to the virtual screen from being displayed in the notification bar of the home screen, the notifications of the preloaded application need to be cached so that they are not displayed temporarily until the user actively launches the application. (For example, when the electronic device receives the user's operation to start the corresponding application) the notification is then displayed on the notification bar.
示例地,窗口管理模块可以对预加载管理模块指示的相应应用程序接收到的通知进行管控。如图19所示,当窗口管理模块接收到(即拦截到)相应应用程序的通知时,窗口管理模块便可以将该通知缓存起来。以便后续用户主动启动该应用程序,该应用程序由虚拟屏切换到主屏时,窗口管理模块再释放该通知使其显示到主屏的通知栏。For example, the window management module can control notifications received by the corresponding application indicated by the preload management module. As shown in Figure 19, when the window management module receives (ie intercepts) a notification from a corresponding application, the window management module can cache the notification. In order for subsequent users to actively start the application, and when the application is switched from the virtual screen to the home screen, the window management module releases the notification to display it on the notification bar of the home screen.
可选地,在窗口管理模块缓存应用程序的通知时,可以将该通知的时间抹去,从而在后续释放该通知到通知栏时使其显示的时间为当前时间。Optionally, when the window management module caches the notification of the application, the time of the notification can be erased, so that when the notification is subsequently released to the notification bar, the time displayed is the current time.
S1604、预加载管理模块通知窗口管理模块将相应应用程序的弹窗进行管控。S1604. The preload management module notifies the window management module to control the pop-up window of the corresponding application.
一般应用程序的弹窗包括需要用户进行操作的对话框(Dialog)和显示较短时间后自动消失的提示弹窗(Toast)。通常,应用程序启动后,其弹窗会指定到默认屏上进行显示,如本申请实施例中的主屏。因此,为了避免预加载到虚拟屏的应用程序的弹窗显示到主屏上而影响用户使用正在使用的应用程序,需要对其弹窗进行管控。Pop-up windows in general applications include dialog boxes (Dialog) that require user operations and prompt pop-up windows (Toast) that disappear automatically after being displayed for a short period of time. Usually, after an application is started, its pop-up window will be assigned to a default screen for display, such as the home screen in the embodiment of this application. Therefore, in order to prevent the pop-up windows of applications preloaded to the virtual screen from being displayed on the home screen and affecting the user's use of the application being used, it is necessary to control the pop-up windows.
示例地,窗口管理模块可以根据预加载管理模块的通知,对相应应用程序的弹窗进行监控(例如,可以在处理AMS让相应应用程序的Activity切换到Resumed的任务时对弹窗进行监控),如图20所示,当监控到相应应用程序要显示弹窗时,窗口管理模块可以根据弹窗的类型对其进行管控。例如,当弹窗为对话框时,窗口管理模块可以将其指定到虚拟屏上显示(如,将对话框指定的屏幕的屏幕参数修改为虚拟屏对应的虚拟屏参数,从而使其显示到虚拟屏而不是主屏),即将对话框转向虚拟屏显示。当弹窗为提示弹窗时,由于该弹窗显示较短时间会自动消失,因此窗口管理模块可以直接将该弹窗丢弃,使相应应用程序的提示弹窗不用显示。For example, the window management module can monitor the pop-up window of the corresponding application according to the notification of the preload management module (for example, the pop-up window can be monitored when processing the AMS task of switching the Activity of the corresponding application to Resumed), As shown in Figure 20, when the corresponding application is monitored to display a pop-up window, the window management module can control the pop-up window according to the type. For example, when the pop-up window is a dialog box, the window management module can assign it to be displayed on the virtual screen (for example, modify the screen parameters of the screen specified by the dialog box to the virtual screen parameters corresponding to the virtual screen, so that it can be displayed on the virtual screen. screen instead of the main screen), that is, the dialog box is turned to the virtual screen. When the pop-up window is a prompt pop-up window, since the pop-up window will disappear automatically after being displayed for a short period of time, the window management module can directly discard the pop-up window so that the prompt pop-up window of the corresponding application does not need to be displayed.
S1605、预加载管理模块通知代理模块对相应应用程序关联的binder消息、alarm消息、广播等进行托管。S1605. The preload management module notifies the agent module to host binder messages, alarm messages, broadcasts, etc. associated with the corresponding application.
以广播为例(其他binder消息、alarm消息等均与可参考广播的示例),预加载的应用程序在被启动之后,可能会触发一些广播的发送,从而使其他一些进程(或称为接收方)监听到对应的广播时做出相应的操作。并且,预加载的应用程序在被启动之后,还可能会注册监听一些广播,从而当其监听(即接收)到相应的广播后会做出对应的操作。Take broadcasting as an example (other binder messages, alarm messages, etc. can refer to the broadcasting example). After the preloaded application is started, it may trigger the sending of some broadcasts, thereby causing some other processes (or receivers) to ) performs corresponding operations when listening to the corresponding broadcast. In addition, after the preloaded application is started, it may also register to listen to some broadcasts, so that when it listens (that is, receives) the corresponding broadcast, it will perform corresponding operations.
示例地,预加载到虚拟屏上的应用程序可以是购物类应用程序,该应用程序加载到虚拟屏上后,在第一时刻该购物类应用程序可以向支付类应用程序发送用于指示其已启动的广播。从而便于支付类应用程序能够在接收到该广播时启动。使用户在使用购物类应用程序时能够更快更便捷的打开支付类应用程序。For example, the application preloaded on the virtual screen may be a shopping application. After the application is loaded on the virtual screen, at the first moment, the shopping application may send a message to the payment application indicating that it has Started broadcast. This makes it easier for payment applications to start when receiving the broadcast. This enables users to open payment applications faster and more conveniently when using shopping applications.
因此,为了避免预加载的应用程序被启动后被其他应用程序或进程感知到,可以通过代理模块对其进行托管,直到预加载的应用程序从虚拟屏切换到了主屏时再解除相应的托管。例如,在第一时刻拦截第一应用程序向接收方,如其他应用程序或进程发送的第一消息和/或广播,则可通过代理模块对该第一消息和/或广播进行托管(具体托管策略可如以下图21所示)。当第二时刻(第二时刻晚于第一时刻)电子设备接收到用户启动第一应用程序的操作后,电子设备将第一应用程序从虚拟屏切换至主屏(即显示屏),并显示第一应用程序的界面时,电子设备则可以再将托管的第一消息和/或广播发送给接收方。又例如,在第三时刻拦截第一应用程序接收到的第二消息和/或广播,则可通过代理模块对该第二消息和/或广播进行托管(具体托管策略可如以下图22所示)。当第二时刻(第二时刻晚于第三时刻)电子设备接收到用户启动第一应用程序的操作后,电子设备将第一应用程序从虚拟屏切换至主屏(即显示屏),并显示第一应用程序的界面时,电子设备则可以再将托管的第二消息和/或广播发送给第一应用程序。Therefore, in order to prevent the preloaded application from being detected by other applications or processes after it is launched, it can be hosted through the proxy module until the preloaded application is switched from the virtual screen to the home screen, and then the corresponding hosting is released. For example, to intercept the first message and/or broadcast sent by the first application to the recipient, such as other applications or processes, at the first moment, the first message and/or broadcast can be hosted through the proxy module (specific hosting The strategy can be shown in Figure 21 below). When the electronic device receives the user's operation to start the first application program at the second moment (the second moment is later than the first moment), the electronic device switches the first application program from the virtual screen to the main screen (i.e., the display screen), and displays the first application program. When an application interface is provided, the electronic device can then send the hosted first message and/or broadcast to the recipient. For another example, if the second message and/or broadcast received by the first application is intercepted at the third moment, the second message and/or broadcast can be hosted through the proxy module (the specific hosting policy can be as shown in Figure 22 below ). When the electronic device receives the user's operation to start the first application program at the second moment (the second moment is later than the third moment), the electronic device switches the first application program from the virtual screen to the main screen (i.e., the display screen), and displays the first application program. When an application interface is provided, the electronic device may then send the hosted second message and/or broadcast to the first application program.
例如,继续以预加载到虚拟屏上的应用程序是购物类应用程序为例,电子设备在第一时刻可以拦截该购物类应用程序向支付类应用程序发送的广播并存储。从而避免支付类应用程序因接收到该广播而启动。而当第二时刻电子设备接收到用户启动该购物类应用程序的操作时,电子设备再将存储的第一时刻购物类应用程序发送的广播发送给支付类应用程序,从而便于支付类应用程序能够在用户主动启动了该购物类应用程序时接收到该广播而启动。使用户在使用购物类应用程序时能够更快更便捷的打开支付类应用程序。For example, assuming that the application preloaded on the virtual screen is a shopping application, the electronic device can intercept and store the broadcast sent by the shopping application to the payment application at the first moment. This prevents payment applications from being started due to receiving this broadcast. When the electronic device receives the user's operation to start the shopping application at the second moment, the electronic device then sends the stored broadcast sent by the shopping application at the first moment to the payment application, so that the payment application can It is started after receiving the broadcast when the user actively starts the shopping application. This enables users to open payment applications faster and more conveniently when using shopping applications.
示例地,对于应用程序发送的广播,代理模块可以对预加载管理模块通知的相应应用程序发送的广播进行拦截。如图21所示,当应用程序发送一条广播时,代理模块拦截到该广播后便会对该广播按照一定的托管策略进行托管。例如,根据广播的时效性,当广播为及时性(即时效较短)的广播时,说明该广播在后续解除托管时很可能已经失效,因此代理模块可以直接丢弃该广播。而当广播不是及时性(即非及时性)的广播时,说明该广播在后续解除托管时还会有效,因此代理模块可以将该广播缓存起来,等到后续解除托管时再发送该广播。可选地,代理模块将广播缓存后,还可以判断该广播是否可以与之前缓存的广播合并(如可以合并同类型的广播等,或者替换之前缓存的同类型广播,始终保留该类型最新的广播),若可以合并则缓存该广播时便可以直接与对应的之前缓存的广播合并存储。For example, for the broadcast sent by the application, the proxy module can intercept the broadcast sent by the corresponding application notified by the preload management module. As shown in Figure 21, when the application sends a broadcast, the proxy module intercepts the broadcast and hosts the broadcast according to a certain hosting policy. For example, according to the timeliness of the broadcast, when the broadcast is timely (that is, with a short timeliness), it means that the broadcast is likely to have expired when the hosting is subsequently released, so the agent module can directly discard the broadcast. When the broadcast is not timely (that is, non-timely), it means that the broadcast will still be valid when the hosting is subsequently released. Therefore, the proxy module can cache the broadcast and wait until the hosting is released before sending the broadcast. Optionally, after the agent module caches the broadcast, it can also determine whether the broadcast can be merged with the previously cached broadcast (for example, broadcasts of the same type can be merged, etc., or the previously cached broadcast of the same type can be replaced, and the latest broadcast of this type can always be retained. ), if it can be merged, when the broadcast is cached, it can be directly merged and stored with the corresponding previously cached broadcast.
需要说明的是,电子设备可以根据广播的类型来判断该广播是否为及时性的广播。例如,当广播的类型为Wi-Fi信号通知等周期性发送的广播时,可确定该广播为及时性广播。相应地,当广播类型为通知其他应用程序或进程启动的广播时,则可确定该广播为非及时性广播。It should be noted that the electronic device can determine whether the broadcast is a timely broadcast according to the type of the broadcast. For example, when the type of broadcast is a periodically sent broadcast such as Wi-Fi signal notification, the broadcast may be determined to be a timely broadcast. Correspondingly, when the broadcast type is a broadcast that notifies other applications or processes to start, the broadcast can be determined to be a non-timely broadcast.
又示例地,对于应用程序注册监听的广播,代理模块可以获取预加载管理模块通知的相应应用程序注册监听的广播事件。然后对该广播事件对应的广播进行拦截。如图22所示,当拦截到相应广播时,可以对该广播按照一定的托管策略进行托管。例如,根据广播的时效性,当广播为及时性的广播时,说明该广播在后续解除托管时很可能已经失效,因此代理模块可以直接丢弃该广播。而当广播不是及时性的广播时,说明该广播在后续解除托管时还会有效,因此代理模块可以将该广播缓存起来,等到后续解除托管时再发送该广播。可选地,代理模块将广播缓存后,还可以判断该广播是否可以与之前缓存的广播合并或替换(如可以合并同类型的广播等,或者替换之前缓存的同类型广播,始终保留该类型最新的广播),若可以合并则缓存该广播时便可以直接与对应的之前缓存的广播合并存储。As another example, for the broadcast that the application is registered to listen to, the proxy module can obtain the broadcast event that the corresponding application is registered to listen to notified by the preload management module. Then intercept the broadcast corresponding to the broadcast event. As shown in Figure 22, when the corresponding broadcast is intercepted, the broadcast can be hosted according to a certain hosting policy. For example, according to the timeliness of the broadcast, when the broadcast is a timely broadcast, it means that the broadcast is likely to have expired when the hosting is subsequently released, so the agent module can directly discard the broadcast. When the broadcast is not a timely broadcast, it means that the broadcast will still be valid when the hosting is subsequently released, so the proxy module can cache the broadcast and wait until the hosting is released before sending the broadcast. Optionally, after the proxy module caches the broadcast, it can also determine whether the broadcast can be merged or replaced with the previously cached broadcast (for example, broadcasts of the same type can be merged, etc., or the previously cached broadcast of the same type can be replaced, always keeping the latest version of the type) broadcast), if it can be merged, then when the broadcast is cached, it can be directly merged and stored with the corresponding previously cached broadcast.
S1606、预加载管理模块通知最近任务管理模块(Recents)隐藏相应应用程序的快照。S1606. The preload management module notifies the recent task management module (Recents) to hide the snapshot of the corresponding application.
其中,Recents能够管理所有运行的应用程序(处于后台和前台)的快照,以便在用户将电子设备主屏的界面切换到多任务界面时,多任务界面中能够显示所有运行的应用程序的快照(即应用界面缩略图)。因此,为了避免用户在多任务界面中看到预加载到虚拟屏上的应用程序的快照,以实现用户无感知,则需要对预加载到虚拟屏的应用程序的快照进行隐藏。Among them, Recents can manage snapshots of all running applications (in the background and foreground), so that when the user switches the interface of the electronic device's home screen to the multitasking interface, the multitasking interface can display snapshots of all running applications (i.e. Application interface thumbnail). Therefore, in order to prevent the user from seeing the snapshot of the application preloaded on the virtual screen in the multitasking interface so that the user is unaware, the snapshot of the application preloaded on the virtual screen needs to be hidden.
在本申请实施例中,对于预加载到虚拟屏的应用程序,Recents一般会在进行下一个应用程序的预加载时对当前显示在虚拟屏上的应用程序进行快照保存,或者在虚拟屏关闭时,由于虚拟屏上的应用程序会处于停止状态,所以Recents会对相应应用程序进行快照保存,又或者,当用户启动了预加载到虚拟屏上的某个应用程序时,该应用程序由于会从虚拟屏切换到主屏并显示启动动效,所以Recents会对该应用程序进行快照保存,从而以保存的快照作为启动动效中的画面以达到类似热启动动效的效果。In the embodiment of this application, for applications preloaded to the virtual screen, Recents will generally take a snapshot of the application currently displayed on the virtual screen when preloading the next application, or when the virtual screen is closed. , since the application on the virtual screen will be in a stopped state, Recents will save a snapshot of the corresponding application, or when the user starts an application preloaded on the virtual screen, the application will be restarted from The virtual screen switches to the home screen and displays the startup animation, so Recents will save a snapshot of the application and use the saved snapshot as the picture in the startup animation to achieve an effect similar to a hot startup animation.
示例地,预加载管理模块可以向Recents发送隐藏相应应用程序的快照的请求,然后Recents便可根据请求对保存的相应应用程序的快照进行隐藏。For example, the preload management module can send a request to Recents to hide the snapshot of the corresponding application, and then Recents can hide the saved snapshot of the corresponding application according to the request.
可选地,应用程序的界面的一帧画面一般需要先绘制出所有对应的视图,然后再对其进行渲染最终显示。由于预加载到虚拟屏的应用程序不会被用户看到,只要能够绘制出对应界面的视图即可,因此为了减小渲染对系统资源的占用降低渲染合成压力,可以使预加载的应用程序只对界面进行绘制而不进行渲染。可以在后续用户对相应应用程序进行启动操作,应用程序由虚拟屏切换到主屏时再进行界面的渲染,以节省预加载应用程序时消耗的系统资源。Optionally, a frame of the application interface generally requires all corresponding views to be drawn first, and then rendered for final display. Since the application preloaded to the virtual screen will not be seen by the user, as long as the view of the corresponding interface can be drawn, in order to reduce the occupation of system resources by rendering and reduce the pressure of rendering synthesis, the preloaded application can be made only Draw the interface without rendering. The interface can be rendered after subsequent users start the corresponding application and the application switches from the virtual screen to the home screen to save system resources consumed when preloading the application.
示例地,AMS在预加载启动应用程序时,可以为对应的应用程序设置关联的用于标记相应应用程序为预加载到虚拟屏的应用程序的标识。因此,应用程序被加载启动后在进行界面显示时,若应用程序查询到其关联的标识确定其为预加载的应用程序,则该应用程序可以仅按照正常流程进行界面绘制而不对其进行渲染。For example, when the AMS preloads and starts an application, it can set an associated identifier for the corresponding application to mark the corresponding application as an application preloaded to the virtual screen. Therefore, when the interface is displayed after the application is loaded and started, if the application queries its associated identifier and determines that it is a preloaded application, the application can only draw the interface according to the normal process without rendering it.
可选地,预加载管理模块还可以根据相应应用程序预加载所需的时间,或根据预设时长,在相应应用程序预加载所经历的时间满足上述时间之后,将预加载到虚拟屏的应用设置停止状态,并对其进行冷冻,从而节省电子设备的系统资源损耗。Optionally, the preloading management module can also preload the application to the virtual screen according to the time required for preloading the corresponding application, or according to the preset time, after the time required for preloading the corresponding application meets the above time. Set a stop state and freeze it to save system resource consumption of electronic devices.
需要说明的是,当电子设备启动了相应应用程序的进程到虚拟屏之后,还通过上述如图16所示的方法对预加载启动的应用程序的相关资源进行了管控时,若用户对预加载到虚拟屏的应用程序进行了启动操作(如电子设备接收到用户启动相应应用程序,如第一应用程序的操作时),或者其他应用程序调用了预加载的应用程序,则电子设备在将相应的预加载的应用程序从虚拟屏切换显示到主屏上时,还需要解除对该应用程序的相关资源的管控。例如,显示缓存的通知等。It should be noted that when the electronic device starts the process of the corresponding application to the virtual screen, and also manages and controls the related resources of the preloaded application through the method shown in Figure 16, if the user preloads When the application program on the virtual screen performs a startup operation (such as when the electronic device receives the user's startup of the corresponding application program, such as the operation of the first application program), or other applications call a preloaded application program, the electronic device will respond accordingly When a preloaded application is switched from the virtual screen to the home screen, it is also necessary to release the control of the application's related resources. For example, display cached notifications, etc.
基于前述实施方式,电子设备可以对用户的操作行为进行预测,以在用户启动某个应用程序之前,先将该应用程序预加载到虚拟屏。从而当用户想要启动相应的应用程序时,电子设备能够直接将相应的应用程序的可操作界面由虚拟屏切换显示在主屏上,从而减小用户启动相应用程序的感知时间(启动应用程序的感知时间,即从用户对应用程序进行启动操作到电子设备主屏显示该应用程序的可操作界面所经历的时间)。如此,能够提高用户启动应用程序时的流畅体验,提高电子设备在用户启动应用程序时的响应速度。Based on the foregoing implementation, the electronic device can predict the user's operation behavior to preload an application to the virtual screen before the user starts the application. Therefore, when the user wants to start the corresponding application program, the electronic device can directly switch the operable interface of the corresponding application program from the virtual screen to display on the home screen, thereby reducing the user's perceived time to start the corresponding application program (the time it takes to start the application program). Perceived time, that is, the time elapsed from when the user launches the application to when the operable interface of the application is displayed on the home screen of the electronic device). In this way, the smooth experience when the user starts the application can be improved, and the response speed of the electronic device when the user starts the application can be improved.
对应于前述实施例中的方法,本申请实施例还提供一种应用程序加载装置。该装置可以应用于上述的电子设备用于实现前述实施例中的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。例如,该装置可以包括预测模块、预加载模块、预加载管理模块、资源管控模块、窗口管理模块、代理模块以及最近任务管理模块等如图6所示的系统架构中的模块。通过上述模块相互配合可以实现前述实施例中的方法。示例地,可以参考前述实施例中图11和图16所示的方法。Corresponding to the method in the foregoing embodiments, embodiments of the present application also provide an application loading device. This device can be applied to the above-mentioned electronic equipment to implement the method in the foregoing embodiments. The function of the device can be realized by hardware, or it can be realized by hardware executing corresponding software. Hardware or software includes one or more modules corresponding to the above functions. For example, the device may include a prediction module, a preloading module, a preloading management module, a resource management module, a window management module, a proxy module, a recent task management module and other modules in the system architecture shown in Figure 6 . The methods in the foregoing embodiments can be implemented by the cooperation of the above modules. For example, reference may be made to the methods shown in FIG. 11 and FIG. 16 in the aforementioned embodiments.
应理解以上装置中单元或模块(以下均称为单元)的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。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 during actual implementation, or may be physically separated. And the units in the device can all be implemented in the form of software calling through processing components; they can also all be implemented in the form of hardware; some units can also be implemented in the form of software calling through processing components, 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 and implemented in a certain chip of the device. In addition, it can also be stored in the memory in the form of a program, and a certain processing element of the device can call and execute the unit. Function. In addition, all or part of these units can be integrated together or implemented independently. The processing element described here can also be called a processor, and can be an integrated circuit with signal processing capabilities. During the implementation process, each step of the above method or each unit above can be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software calling through 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, such as: 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 unit in the device can be implemented in the form of a processing element scheduler, the processing element can be a general processor, such as a CPU or other processor that can call a program. 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 unit for the above device to implement each corresponding step in the above method can be implemented in the form of a processing element scheduler. For example, the device may include a processing element and a storage element, and the processing element calls a program stored in the storage element to execute the method described in the above method embodiment. 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 performing the above method may be in a storage element on a different chip from the processing element, that is, an off-chip storage element. At this time, the processing element calls or loads the program from the off-chip storage element to the on-chip storage element to call and execute the method described in the above method embodiment.
例如,本申请实施例还可以提供一种装置,如:电子设备,可以包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如前述实施例中电子设备实施的应用程序加载方法。该存储器可以位于该电子设备之内,也可以位于该电子设备之外。且该处理器包括一个或多个。For example, embodiments of the present application may also provide a device, 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 application loading method implemented by the electronic device in the previous embodiment. The memory may be located within the electronic device or external to the electronic device. And the processor includes one or more.
在又一种实现中,该装置实现以上方法中各个步骤的单元可以是被配置成一个或多个处理元件,这些处理元件可以设置于对应上述的电子设备上,这里的处理元件可以为集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或者这些类集成电路的组合。这些集成电路可以集成在一起,构成芯片。In yet another implementation, the unit for implementing each step in the above method may be configured as one or more processing elements. These processing elements may be disposed on corresponding electronic equipment as described above. The processing elements here 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, embodiments of the present application also provide a chip system, which can be applied to the above-mentioned electronic devices. The chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through lines; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit to implement the electronic devices in the above method embodiments. Device-related methods.
本申请实施例还提供一种计算机程序产品,包括电子设备,如上述电子设备,运行的计算机指令。An embodiment of the present application also provides a computer program product, including computer instructions run by an electronic device, such as the above-mentioned electronic device.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the above description of the embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated as needed. 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 can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be The combination can either be integrated into another device, or some features can be omitted, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated. The components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. . Some 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 can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,如:程序。该软件产品存储在一个程序产品,如计算机可读存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or contribute to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, such as a program. The software product is stored in a program product, such as a computer-readable storage medium, and includes a number of instructions to cause a device (which can be a microcontroller, a chip, etc.) or a processor (processor) to execute all of the methods described in various embodiments of this application. or partial steps. The aforementioned storage media include: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
例如,本申请实施例还可以提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如前述方法实施例中所述的应用程序加载方法。For example, 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 caused to implement the application loading method as described in the foregoing method embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be covered by the protection scope of the present application. . Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210334531.9A CN115562743B (en) | 2022-03-31 | 2022-03-31 | Application program loading method and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210334531.9A CN115562743B (en) | 2022-03-31 | 2022-03-31 | Application program loading method and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115562743A CN115562743A (en) | 2023-01-03 |
CN115562743B true CN115562743B (en) | 2023-10-27 |
Family
ID=84737301
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210334531.9A Active CN115562743B (en) | 2022-03-31 | 2022-03-31 | Application program loading method and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115562743B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119496823A (en) * | 2023-08-18 | 2025-02-21 | 华为技术有限公司 | System service proxy method, terminal device and computer readable medium |
CN117827302A (en) * | 2023-11-22 | 2024-04-05 | 荣耀终端有限公司 | Resource preloading method and electronic device |
CN118245161A (en) * | 2024-05-24 | 2024-06-25 | 荣耀终端有限公司 | Application startup method and related device |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107229526A (en) * | 2017-05-17 | 2017-10-03 | 腾讯科技(深圳)有限公司 | Message treatment method, device, storage medium and computer equipment in group session |
CN108717364A (en) * | 2018-04-08 | 2018-10-30 | 努比亚技术有限公司 | Application acceleration open method, terminal and computer readable storage medium |
CN108762843A (en) * | 2018-05-29 | 2018-11-06 | Oppo广东移动通信有限公司 | Preloading method, apparatus, storage medium and the intelligent terminal of application program |
CN109684830A (en) * | 2016-06-20 | 2019-04-26 | 北京奇虎科技有限公司 | A kind of proxy processing method and device of the broadcast of Android application |
CN109992380A (en) * | 2017-12-29 | 2019-07-09 | 广东欧珀移动通信有限公司 | Application processing method and apparatus, electronic device, and computer-readable storage medium |
CN111078168A (en) * | 2019-11-13 | 2020-04-28 | 联想(北京)有限公司 | Information processing method, first electronic equipment and storage medium |
CN111373348A (en) * | 2018-02-08 | 2020-07-03 | 华为技术有限公司 | Application switching method and terminal |
CN111818374A (en) * | 2020-07-23 | 2020-10-23 | 西安闻泰电子科技有限公司 | Message popup control method and device, intelligent terminal and storage medium |
CN112306450A (en) * | 2020-10-27 | 2021-02-02 | 维沃移动通信有限公司 | Information processing method and device |
CN112764624A (en) * | 2021-01-26 | 2021-05-07 | 维沃移动通信有限公司 | Information screen display method and device |
CN113821132A (en) * | 2021-07-27 | 2021-12-21 | 荣耀终端有限公司 | Message processing method and device |
CN114006881A (en) * | 2021-11-04 | 2022-02-01 | 深圳传音控股股份有限公司 | Message processing method, intelligent terminal and storage medium |
CN114090120A (en) * | 2021-11-16 | 2022-02-25 | 上海传英信息技术有限公司 | Application program starting method, mobile terminal and storage medium |
CN114201226A (en) * | 2020-08-26 | 2022-03-18 | 北京小米移动软件有限公司 | Application starting method and device, electronic equipment and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8166114B2 (en) * | 2006-02-21 | 2012-04-24 | Strangeloop Networks, Inc. | Asynchronous context data messaging |
CN115016695A (en) * | 2021-11-18 | 2022-09-06 | 荣耀终端有限公司 | Application program starting method and electronic equipment |
CN115079895A (en) * | 2021-11-18 | 2022-09-20 | 荣耀终端有限公司 | Application program starting method and electronic equipment |
-
2022
- 2022-03-31 CN CN202210334531.9A patent/CN115562743B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109684830A (en) * | 2016-06-20 | 2019-04-26 | 北京奇虎科技有限公司 | A kind of proxy processing method and device of the broadcast of Android application |
CN107229526A (en) * | 2017-05-17 | 2017-10-03 | 腾讯科技(深圳)有限公司 | Message treatment method, device, storage medium and computer equipment in group session |
CN109992380A (en) * | 2017-12-29 | 2019-07-09 | 广东欧珀移动通信有限公司 | Application processing method and apparatus, electronic device, and computer-readable storage medium |
CN111373348A (en) * | 2018-02-08 | 2020-07-03 | 华为技术有限公司 | Application switching method and terminal |
CN108717364A (en) * | 2018-04-08 | 2018-10-30 | 努比亚技术有限公司 | Application acceleration open method, terminal and computer readable storage medium |
CN108762843A (en) * | 2018-05-29 | 2018-11-06 | Oppo广东移动通信有限公司 | Preloading method, apparatus, storage medium and the intelligent terminal of application program |
CN111078168A (en) * | 2019-11-13 | 2020-04-28 | 联想(北京)有限公司 | Information processing method, first electronic equipment and storage medium |
CN111818374A (en) * | 2020-07-23 | 2020-10-23 | 西安闻泰电子科技有限公司 | Message popup control method and device, intelligent terminal and storage medium |
CN114201226A (en) * | 2020-08-26 | 2022-03-18 | 北京小米移动软件有限公司 | Application starting method and device, electronic equipment and storage medium |
CN112306450A (en) * | 2020-10-27 | 2021-02-02 | 维沃移动通信有限公司 | Information processing method and device |
CN112764624A (en) * | 2021-01-26 | 2021-05-07 | 维沃移动通信有限公司 | Information screen display method and device |
CN113821132A (en) * | 2021-07-27 | 2021-12-21 | 荣耀终端有限公司 | Message processing method and device |
CN114006881A (en) * | 2021-11-04 | 2022-02-01 | 深圳传音控股股份有限公司 | Message processing method, intelligent terminal and storage medium |
CN114090120A (en) * | 2021-11-16 | 2022-02-25 | 上海传英信息技术有限公司 | Application program starting method, mobile terminal and storage medium |
Non-Patent Citations (2)
Title |
---|
"移动应用网络服务安全研究";唐祝寿;《中国博士学位论文全文数据库 (信息科技辑)》;第I139-24页 * |
基于Windows消息机制的软件本地化;龚力柱, 蒋泽军, 王丽芳;计算机工程(第21期);第87-89页 * |
Also Published As
Publication number | Publication date |
---|---|
CN115562743A (en) | 2023-01-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115562743B (en) | Application program loading method and electronic device | |
CN108512695B (en) | Method and device for monitoring application blockage | |
CN115562744B (en) | Application loading method and electronic device | |
KR101457632B1 (en) | Mobile electronic device having program notification function and program notification method thereof | |
CN105955766B (en) | Using preloading method and device | |
US20150333971A1 (en) | Method and device for managing processes of application program | |
WO2016029642A1 (en) | Background application program control method, device and terminal device | |
KR20200060421A (en) | Resource management method and terminal device | |
CN108804153B (en) | Application program preloading method and device, storage medium and terminal | |
CN118519553B (en) | Application data processing method and device and terminal equipment | |
US20240086231A1 (en) | Task migration system and method | |
JP2017535003A (en) | Multimedia information display method and apparatus | |
US11245786B2 (en) | Recommendation method and terminal | |
CN113489700B (en) | A method, server and terminal equipment for acquiring media asset data | |
EP3699744B1 (en) | Do-not-disturb method and terminal | |
CN105930213A (en) | Application running method and apparatus | |
CN114138139A (en) | Application card management method, electronic device, product and medium | |
CN115576621B (en) | Application program loading method and electronic device | |
CN113391743B (en) | A display method and electronic device | |
CN117112045A (en) | Application program starting method and device, electronic equipment and storage medium | |
CN113163255A (en) | Video playing method, device, terminal and storage medium | |
CN112000932A (en) | Mobile terminal and application control method thereof | |
CN113938510A (en) | Terminal equipment and terminal control method | |
CN112905255A (en) | Information processing method and device and electronic equipment | |
CN115174504B (en) | Interface display method, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
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 |