技术领域Technical field
本申请涉及终端领域,尤其涉及一种多任务界面显示的方法、电子设备及存储介质。The present application relates to the field of terminals, and in particular, to a method for displaying a multi-task interface, an electronic device and a storage medium.
背景技术Background technique
智能设备的显示屏通常设置有壁纸,用户可以选择不同的壁纸美化显示屏。壁纸包括静态壁纸、动态壁纸和超级壁纸。当手机中开启了多个应用时,手机响应于用户的多任务操作(如在屏幕中进行上滑操作、点击多任务按钮等),显示多任务界面。多任务界面中包含有每个后台运行的应用的界面缩略图,手机会通过动画特效展示每个后台运行的应用的界面缩略图。用户可以通过滑动屏幕可以查看每个后台运行的应用的界面缩略图。当用户点击界面缩略图,手机响应于用户的操作,即可进入对应的应用。The display screen of smart devices is usually set with wallpapers, and users can choose different wallpapers to beautify the display screen. Wallpapers include static wallpapers, dynamic wallpapers and super wallpapers. When multiple applications are opened in the mobile phone, the mobile phone displays the multi-tasking interface in response to the user's multi-tasking operation (such as sliding up on the screen, clicking the multi-tasking button, etc.). The multi-tasking interface contains interface thumbnails of each application running in the background, and the phone will display the interface thumbnails of each application running in the background through animation effects. Users can view the interface thumbnails of each application running in the background by sliding the screen. When the user clicks on the interface thumbnail, the phone responds to the user's operation and enters the corresponding application.
然而,手机在进入多任务界面时,多任务界面中的动画特效会产生卡顿,导致多任务界面显示不流畅的问题。However, when the mobile phone enters the multi-tasking interface, the animation special effects in the multi-tasking interface will be stuck, causing the multi-tasking interface to be displayed unsmoothly.
发明内容Contents of the invention
为了解决上述技术问题,本申请提供一种多任务界面显示的方法、电子设备及存储介质,使得电子设备进入多任务界面时,多任务界面的动态特效流畅。In order to solve the above technical problems, this application provides a multi-task interface display method, electronic device and storage medium, so that when the electronic device enters the multi-task interface, the dynamic special effects of the multi-task interface are smooth.
第一方面,本申请提供一种多任务界面显示的方法,应用于电子设备,包括:壁纸管理模块若检测到指示壁纸初始化的指令,则向目标服务发送第一获取请求,第一获取请求用于指示获取目标图像,目标服务为与电子设备当前所采用的壁纸类型匹配的壁纸服务;目标服务响应于第一获取请求,从电子设备当前所采用的壁纸中获取一张图像作为第一图像;目标服务获取经过模糊处理后的第一图像作为目标图像,并将目标图像返回壁纸管理模块;壁纸管理模块将目标图像传输至桌面,由桌面缓存目标图像;桌面若检测到用户的多任务操作,则获取存储的目标图像作为多任务界面的背景图像。In a first aspect, this application provides a method for displaying a multi-task interface, which is applied to electronic devices, including: if the wallpaper management module detects an instruction indicating wallpaper initialization, it sends a first acquisition request to the target service, and the first acquisition request uses In response to the instruction to obtain the target image, the target service is a wallpaper service that matches the wallpaper type currently used by the electronic device; in response to the first acquisition request, the target service obtains an image as the first image from the wallpaper currently used by the electronic device; The target service obtains the blurred first image as the target image, and returns the target image to the wallpaper management module; the wallpaper management module transmits the target image to the desktop, and the desktop caches the target image; if the desktop detects the user's multi-tasking operation, Then obtain the stored target image as the background image of the multi-tasking interface.
这样,当壁纸管理模块检测到指示壁纸初始化的指令时,该壁纸管理模块请求获取目标图像,并通过桌面存储该目标图像。本示例中,电子设备获取第一图像以及对第一图像进行模糊处理是在壁纸管理模块初始化时执行,而不是在检测到多任务的操作时执行,使得电子设备进入多任务界面时无需获取待处理的图像,也无需对获得的图像进行模糊处理,减少了显示多任务界面的背景图像的步骤,减少了电子设备的运算量,进而使得电子设备在显示多任务界面显示动画特效时有充足的运算量,避免了多任务界面中动画特效出现卡顿,不流畅的问题。同时,该目标图像为经过模糊处理后的第一图像,而第一图像为电子设备所采用的的壁纸中的一张图像,使得电子设备当前所采用的壁纸无论是动态壁纸还是静态壁纸,均无需电子设备进行截屏操作,进一步减少获取第一图像的步骤,减少电子设备的功耗。In this way, when the wallpaper management module detects an instruction indicating wallpaper initialization, the wallpaper management module requests to obtain the target image and stores the target image through the desktop. In this example, the electronic device obtains the first image and blurs the first image when the wallpaper management module is initialized, rather than when a multi-tasking operation is detected, so that the electronic device does not need to obtain the pending image when entering the multi-tasking interface. The processed image does not need to be blurred on the obtained image, which reduces the steps of displaying the background image of the multi-tasking interface and reduces the computational load of the electronic device, thereby allowing the electronic device to have sufficient time to display animation special effects on the multi-tasking interface. The amount of calculations avoids the problem of stuck and unsmooth animation effects in the multi-tasking interface. At the same time, the target image is the first image after blur processing, and the first image is an image among the wallpapers used by the electronic device, so that the wallpaper currently used by the electronic device, whether it is a dynamic wallpaper or a static wallpaper, is No electronic device is required to perform the screenshot operation, further reducing the steps for obtaining the first image and reducing the power consumption of the electronic device.
根据第一方面,在目标服务获取经过模糊处理后的第一图像作为目标图像之前,该方法还包括:目标服务向壁纸处理模块发送第一处理指令,第一处理指令指示对第一图像进行图像压缩处理;壁纸处理模块响应于第一处理指令,对第一图像进行图像压缩指令;壁纸处理模块将压缩后的第一图像返回目标服务;目标服务获取压缩后的第一图像作为新的第一图像。According to the first aspect, before the target service obtains the first image after blur processing as the target image, the method further includes: the target service sends a first processing instruction to the wallpaper processing module, and the first processing instruction instructs to image the first image. Compression processing; the wallpaper processing module responds to the first processing instruction and performs an image compression instruction on the first image; the wallpaper processing module returns the compressed first image to the target service; the target service obtains the compressed first image as a new first image image.
这样,壁纸处理模块先对第一图像进行图像压缩处理,可以减小的图像的分辨率,缩小第一图像的容量。电子设备对图像压缩后的第一图像进行模糊处理,由于第一图像的分辨率减小,可以进一步减小了高斯模糊的处理量,提高对第一图像的处理速度,减小了电子设备处理第一图像的功耗。In this way, the wallpaper processing module first performs image compression processing on the first image, which can reduce the resolution of the image and reduce the capacity of the first image. The electronic device performs blur processing on the first image after image compression. Since the resolution of the first image is reduced, the processing amount of Gaussian blur can be further reduced, the processing speed of the first image is increased, and the processing speed of the electronic device is reduced. Power consumption of the first image.
根据第一方面,向目标服务发送第一获取请求之前,该方法还包括:壁纸管理模块若检测到指示壁纸初始化的指令,则获取电子设备当前所采用的壁纸类型,壁纸类型包括:静态壁纸类型、动态壁纸类型以及超级壁纸类型;壁纸管理模块若检测到壁纸类型为静态壁纸类型,则获取静态壁纸服务作为目标服务;壁纸管理模块若检测到壁纸类型为动态壁纸类型,则获取动态壁纸服务作为目标服务;壁纸管理模块若检测到壁纸类型为超级壁纸类型,则获取超级壁纸服务作为目标服务。According to the first aspect, before sending the first acquisition request to the target service, the method further includes: if the wallpaper management module detects an instruction indicating wallpaper initialization, obtain the wallpaper type currently used by the electronic device. The wallpaper type includes: static wallpaper type , dynamic wallpaper type and super wallpaper type; if the wallpaper management module detects that the wallpaper type is a static wallpaper type, it obtains the static wallpaper service as the target service; if the wallpaper management module detects that the wallpaper type is a dynamic wallpaper type, it obtains the dynamic wallpaper service as Target service; if the wallpaper management module detects that the wallpaper type is a super wallpaper type, it obtains the super wallpaper service as the target service.
这样,壁纸管理模块根据不同的壁纸类型,获取与壁纸类型匹配的壁纸服务,由于不同的壁纸类型对应有不同的壁纸服务,通过与壁纸类型匹配的壁纸服务可以确保无论电子设备当前采用的壁纸是动态壁纸、静态壁纸或超级壁纸,该目标服务均可以获取到准确的第一图像。In this way, the wallpaper management module obtains wallpaper services that match the wallpaper type according to different wallpaper types. Since different wallpaper types correspond to different wallpaper services, the wallpaper service that matches the wallpaper type can ensure that no matter the wallpaper currently used by the electronic device is Live wallpapers, static wallpapers or super wallpapers, this target service can get the exact first image.
根据第一方面,目标服务响应于第一获取请求,从电子设备当前所采用的壁纸中获取一张图像作为第一图像,包括:目标服务向壁纸处理模块发送第二获取请求;壁纸处理模块响应于第二获取请求,从电子设备当前所采用的静态壁纸,静态壁纸包括一张图像;壁纸处理模块将静态壁纸返回所述目标服务;目标服务获取静态壁纸作为第一图像。According to the first aspect, in response to the first acquisition request, the target service acquires an image as the first image from the wallpaper currently used by the electronic device, including: the target service sends a second acquisition request to the wallpaper processing module; the wallpaper processing module responds In the second acquisition request, the static wallpaper currently used by the electronic device includes an image; the wallpaper processing module returns the static wallpaper to the target service; the target service obtains the static wallpaper as the first image.
这样,目标服务通过壁纸处理模块可以获取到电子设备当前所采用的静态壁纸,由于静态壁纸为一张图像,本示例中,目标服务可以将获取到静态壁纸作为第一图像,该获取第一图像的方式简单。In this way, the target service can obtain the static wallpaper currently used by the electronic device through the wallpaper processing module. Since the static wallpaper is an image, in this example, the target service can obtain the static wallpaper as the first image. The obtained first image The way is simple.
根据第一方面,目标服务响应于第一获取请求,从电子设备当前所采用的壁纸中获取一张图像作为第一图像,包括:目标服务向壁纸处理模块发送第三获取请求,第三获取请求用于请求获取第一图像;壁纸处理模块响应于第三获取请求,获取电子设备当前采用的超级壁纸中最后一张显示的图像;壁纸处理模块将获取的最后一张显示的图像返回目标服务;目标服务将获取的最后一张显示的图像作为第一图像。According to the first aspect, in response to the first acquisition request, the target service acquires an image as the first image from the wallpaper currently used by the electronic device, including: the target service sends a third acquisition request to the wallpaper processing module, and the third acquisition request Used to request acquisition of the first image; the wallpaper processing module responds to the third acquisition request and acquires the last displayed image in the super wallpaper currently adopted by the electronic device; the wallpaper processing module returns the acquired last displayed image to the target service; The target service will retrieve the last displayed image as the first image.
这样,由于超级壁纸中包括多张图像,超级壁纸在显示过程中呈现动态效果,本示例中壁纸处理模块可以获取该超级壁纸中最后一张显示的图像,将该图像发送至目标服务,目标服务将该图像作为第一图像,使得电子设备无需对电子设备进行截屏操作,即可获取到第一图像,减少获取第一图像的步骤。In this way, since the super wallpaper includes multiple images, the super wallpaper presents dynamic effects during the display process. In this example, the wallpaper processing module can obtain the last displayed image in the super wallpaper and send the image to the target service. The target service By using this image as the first image, the electronic device can obtain the first image without taking a screenshot of the electronic device, thereby reducing the steps of obtaining the first image.
根据第一方面,目标服务向壁纸处理模块发送第三获取请求之前,该方法还包括:桌面接收超级壁纸主题包发送的第一广播数据,第一广播数据包括电子设备当前采用的超级壁纸中最后一张显示的图像所在的第一存储位置;桌面向壁纸管理模块发送第一更新指令,第一更新指令用于指示壁纸管理模块进行壁纸初始化,且第一更新指令包括第一存储位置;壁纸管理模块将第一存储位置传输至目标服务,以指示目标服务生成第三获取请求,第三获取请求包括第一存储位置;壁纸处理模块响应于第三获取请求,获取电子设备当前采用的超级壁纸中最后一张显示的图像,包括:壁纸处理模块从第一存储位置,获取电子设备当前采用的超级壁纸中最后一张显示的图像。According to the first aspect, before the target service sends the third acquisition request to the wallpaper processing module, the method also includes: the desktop receives the first broadcast data sent by the super wallpaper theme package, and the first broadcast data includes the last super wallpaper currently used by the electronic device. The first storage location where a displayed image is located; the desktop sends a first update instruction to the wallpaper management module, the first update instruction is used to instruct the wallpaper management module to initialize the wallpaper, and the first update instruction includes the first storage location; wallpaper management The module transmits the first storage location to the target service to instruct the target service to generate a third acquisition request, and the third acquisition request includes the first storage location; in response to the third acquisition request, the wallpaper processing module obtains the super wallpaper currently used by the electronic device The last displayed image includes: the wallpaper processing module obtains the last displayed image in the super wallpaper currently used by the electronic device from the first storage location.
这样,当用户将壁纸切换为超级壁纸时,该超级壁纸对应的超级壁纸主题包检测到更换的操作,该超级壁纸主题包可以通过广播的方式通知其他模块,本示例中,该超级壁纸主题广播的第一广播数据中包括第一存储位置,使得该壁纸处理模块可以获取该第一存储位置,进而该壁纸处理模块可以根据第一存储位置从超级壁纸主题包中获取当前采用的超级壁纸中最后一张显示的图像。由于壁纸处理模块无需跨进程从系统中获取第一图像,可以大大节省获取第一图像的时间。同时,由于广播具有时延,若通过系统扩展类,跨进程从系统中获取第一图像,存在获取到上一次手机采用的壁纸,而不是当前手机采用的壁纸的问题。而本示例中,通过第一广播数据中的第一存储位置,可以准确获取当前手机采用的超级壁纸中最后一张显示的图像,提高获取的第一图像的准确性。In this way, when the user switches the wallpaper to a super wallpaper, the super wallpaper theme package corresponding to the super wallpaper detects the change operation. The super wallpaper theme package can notify other modules through broadcast. In this example, the super wallpaper theme broadcast The first broadcast data includes a first storage location, so that the wallpaper processing module can obtain the first storage location, and then the wallpaper processing module can obtain the last currently adopted super wallpaper from the super wallpaper theme package according to the first storage location. A displayed image. Since the wallpaper processing module does not need to obtain the first image from the system across processes, the time for obtaining the first image can be greatly saved. At the same time, due to the delay in broadcasting, if the first image is obtained from the system across processes through the system extension class, there is a problem of obtaining the wallpaper used by the last mobile phone instead of the wallpaper used by the current mobile phone. In this example, through the first storage location in the first broadcast data, the last displayed image in the super wallpaper currently used by the mobile phone can be accurately obtained, thereby improving the accuracy of the obtained first image.
根据第一方面,目标服务响应于所述第一获取请求,从电子设备当前所采用的壁纸中获取一张图像作为第一图像,包括:目标服务向壁纸处理模块发送第四获取请求;壁纸处理模块响应于第四获取请求,获取电子设备当前所采用的动态视频;壁纸处理模块获取动态视频的最后一帧图像作为第一图像,并将第一图像返回目标服务;目标服务获取第一图像。According to the first aspect, in response to the first acquisition request, the target service acquires an image as the first image from the wallpaper currently used by the electronic device, including: the target service sends a fourth acquisition request to the wallpaper processing module; wallpaper processing In response to the fourth acquisition request, the module acquires the dynamic video currently used by the electronic device; the wallpaper processing module acquires the last frame image of the dynamic video as the first image, and returns the first image to the target service; the target service acquires the first image.
这样,由于动态壁纸为视频,可以获取动态视频中的某一帧图像作为第一图像,本示例中,获取最后一帧图像方便快捷,使得获取第一图像的速度快。In this way, since the dynamic wallpaper is a video, a certain frame of image in the dynamic video can be obtained as the first image. In this example, it is convenient and quick to obtain the last frame of image, which makes obtaining the first image faster.
根据第一方面,目标服务向壁纸处理模块发送第四获取请求之前,该方法还包括:桌面接收主题服务发送的第二广播数据,第二广播数据包括动态壁纸的第二存储位置;桌面向壁纸管理模块发送第二更新指令,第二更新指令用于指示壁纸管理模块进行壁纸初始化,且第二更新指令包括第二存储位置;壁纸管理模块将第二存储位置传输至目标服务,以指示目标服务生成第四获取请求,第四获取请求包括第二存储位置;壁纸处理模块响应于第四获取请求,获取电子设备当前所采用的动态视频,包括:壁纸处理模块从第二存储位置获取电子设备当前所采用的动态视频。According to the first aspect, before the target service sends the fourth acquisition request to the wallpaper processing module, the method further includes: the desktop receives second broadcast data sent by the theme service, and the second broadcast data includes the second storage location of the dynamic wallpaper; the desktop sends the wallpaper to The management module sends a second update instruction. The second update instruction is used to instruct the wallpaper management module to initialize the wallpaper, and the second update instruction includes a second storage location; the wallpaper management module transmits the second storage location to the target service to instruct the target service. Generate a fourth acquisition request, the fourth acquisition request includes a second storage location; the wallpaper processing module responds to the fourth acquisition request, acquires the dynamic video currently used by the electronic device, including: the wallpaper processing module acquires the current dynamic video of the electronic device from the second storage location Dynamic video used.
这样,主题服务位于电子设备的应用程序框架层,当动态壁纸加载时,该主题服务可以从系统中获取待显示的动态视频。当主题服务检测到用户输入的更换壁纸或者更换主题的操作时,可以获取该手机待显示的动态视频所处的第二存储位置。主题服务通过第二广播数据将第二存储位置传输至壁纸处理模块,使得壁纸处理模块无需跨进程从系统中获取动态视频,可以大大节省获取动态视频的时间。同时,由于广播具有时延,若通过系统扩展类,跨进程从系统中获取动态视频,存在获取到上一次手机采用的动态视频,而不是当前手机采用的动态视频的问题。而本示例中,通过第二广播数据中的第二存储位置,可以准确获取当前手机采用的动态视频,提高获取的动态视频的准确性。In this way, the theme service is located at the application framework layer of the electronic device. When the dynamic wallpaper is loaded, the theme service can obtain the dynamic video to be displayed from the system. When the theme service detects the operation of changing the wallpaper or changing the theme input by the user, it can obtain the second storage location where the dynamic video to be displayed on the mobile phone is located. The theme service transmits the second storage location to the wallpaper processing module through the second broadcast data, so that the wallpaper processing module does not need to obtain dynamic videos from the system across processes, which can greatly save the time of obtaining dynamic videos. At the same time, due to the delay in broadcasting, if dynamic videos are obtained from the system across processes through system extension classes, there is a problem of obtaining the dynamic video used by the last mobile phone instead of the dynamic video used by the current mobile phone. In this example, through the second storage location in the second broadcast data, the dynamic video currently used by the mobile phone can be accurately obtained, thereby improving the accuracy of the obtained dynamic video.
根据第一方面,壁纸处理模块获取动态视频的最后一帧图像作为第一图像,包括:壁纸处理模块解析动态视频;壁纸处理模块从解析的动态视频中获取最后一帧图像作为第一图像。这样,通过解码动态视频,可以获取到动态视频中的每一帧图像,选取最后一帧图像可以作为第一图像,选取方便、快速。According to the first aspect, the wallpaper processing module obtains the last frame image of the dynamic video as the first image, including: the wallpaper processing module parses the dynamic video; and the wallpaper processing module obtains the last frame image from the parsed dynamic video as the first image. In this way, by decoding the dynamic video, each frame of the image in the dynamic video can be obtained, and the last frame of the image can be selected as the first image, which is convenient and fast to select.
根据第一方面,该方法还包括:超级壁纸主题包接收到用户输入的更新主题的操作/更新壁纸的操作。这样,当用户输入更新主题的操作或更新壁纸的操作时,可以及时更新存储的目标图像,使得桌面在检测到多任务操作时,可以准确显示与当前壁纸匹配的目标图像,避免目标图像与当前采用的壁纸差别过大的问题。According to the first aspect, the method further includes: the super wallpaper theme package receives the operation of updating the theme/the operation of updating the wallpaper input by the user. In this way, when the user inputs the operation of updating the theme or the operation of updating the wallpaper, the stored target image can be updated in time, so that when the desktop detects a multi-tasking operation, the target image that matches the current wallpaper can be accurately displayed to avoid the target image being inconsistent with the current wallpaper. The wallpaper used is too different.
根据第一方面,该方法还包括:主题服务接收到用户输入的更新主题的操作/更新壁纸的操作。这样,当用户输入更新主题的操作或更新壁纸的操作时,主题服务可以及时通知其他模块电子设备更新了壁纸,进而桌面可以及时更新存储的目标图像,使得桌面在检测到多任务操作时,可以准确显示与当前壁纸匹配的目标图像,避免目标图像与当前采用的壁纸差别过大的问题。According to the first aspect, the method further includes: the theme service receives the operation of updating the theme/the operation of updating the wallpaper input by the user. In this way, when the user inputs the operation of updating the theme or the operation of updating the wallpaper, the theme service can promptly notify other modules that the electronic device has updated the wallpaper, and then the desktop can update the stored target image in time, so that when the desktop detects a multi-tasking operation, it can Accurately display the target image that matches the current wallpaper to avoid the problem that the target image is too different from the currently used wallpaper.
根据第一方面,在若壁纸管理模块检测到指示壁纸初始化的指令之前,该方法还包括:桌面检测到重启电子设备的指令或开机指令,向壁纸管理模块发送壁纸获取请求,壁纸获取请求用于指示壁纸管理模块进行壁纸初始化。这样,桌面检测到开机或重启指令时,该壁纸管理模块及时进行初始化,进而使得桌面可以及时更新存储的目标图像,确保目标图像的准确性。According to the first aspect, before the wallpaper management module detects an instruction indicating wallpaper initialization, the method also includes: the desktop detects an instruction to restart the electronic device or a boot instruction, and sends a wallpaper acquisition request to the wallpaper management module, and the wallpaper acquisition request is used Instruct the wallpaper management module to initialize the wallpaper. In this way, when the desktop detects a boot or restart command, the wallpaper management module is initialized in time, so that the desktop can update the stored target image in a timely manner to ensure the accuracy of the target image.
根据第一方面,该壁纸管理模块将目标图像传输至桌面,由桌面缓存目标图像,包括:壁纸管理模块将本次获取的目标图像发送至桌面;桌面缓存本次获取的目标图像,以替换上一次存储的目标图像。这样,桌面每次缓存一次目标图像,避免在更换壁纸重启电子设备后,桌面获取到上一次存储的目标图像的问题。According to the first aspect, the wallpaper management module transmits the target image to the desktop, and the desktop caches the target image, including: the wallpaper management module sends the target image obtained this time to the desktop; the desktop caches the target image obtained this time to replace the above The target image is stored once. In this way, the desktop caches the target image once each time to avoid the problem that the desktop obtains the last stored target image after changing the wallpaper and restarting the electronic device.
根据第一方面,该方法还包括:桌面若检测到重启指令或检测到关机指令,则清除本次存储的目标图像。这样,可以确保每次存储的目标图像都是基于当前采用的壁纸所确定。According to the first aspect, the method further includes: if the desktop detects a restart instruction or a shutdown instruction, clearing the target image stored this time. In this way, you can ensure that the target image stored each time is determined based on the currently adopted wallpaper.
根据第一方面,该图像压缩的比例范围为100倍~300倍。这样,壁纸处理模块可以大大降低该第一图像的像素。According to the first aspect, the image compression ratio ranges from 100 times to 300 times. In this way, the wallpaper processing module can greatly reduce the pixels of the first image.
根据第一方面,目标服务获取经过模糊处理后的第一图像作为目标图像,包括:目标服务向壁纸处理模块发送第二处理指令,第二处理指令指示对第一图像进行模糊处理;壁纸处理模块响应于第二处理指令,对第一图像进行高斯模糊的操作;壁纸处理模块将模糊处理后的图像返回目标服务;目标服务获取经过模糊处理后的第一图像。这样,目标服务可以通过指示壁纸处理模块对第一图像进行模糊处理。According to the first aspect, the target service obtains the first image after blur processing as the target image, including: the target service sends a second processing instruction to the wallpaper processing module, and the second processing instruction instructs to blur the first image; the wallpaper processing module In response to the second processing instruction, a Gaussian blur operation is performed on the first image; the wallpaper processing module returns the blurred image to the target service; and the target service obtains the blurred first image. In this way, the target service can blur the first image by instructing the wallpaper processing module.
第二方面,本申请提供了一种电子设备,包括:一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序存储在存储器上,当计算机程序被一个或多个处理器执行时,使得电子设备执行第一方面及第一方面任意一种实现方式对应的多任务界面显示的方法。In a second aspect, the present application provides an electronic device, including: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer program is processed by one or more When executed by multiple processors, the electronic device is caused to execute the first aspect and the multi-task interface display method corresponding to any implementation of the first aspect.
第二方面以及第二方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第二方面以及第二方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。The second aspect and any implementation manner of the second aspect respectively correspond to the first aspect and any implementation manner of the first aspect. The technical effects corresponding to the second aspect and any implementation manner of the second aspect may be referred to the technical effects corresponding to the above-mentioned first aspect and any implementation manner of the first aspect, which will not be described again here.
第三方面,本申请提供了一种计算机可读介质,用于存储计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行上述第一方面以及第一方面的任意一种实现方式所对应的多任务界面显示的方法。In a third aspect, the present application provides a computer-readable medium for storing a computer program. When the computer program is run on an electronic device, the electronic device causes the electronic device to execute any one of the above first aspect and the first aspect. The multi-tasking interface display method corresponding to the implementation method.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. , for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative labor.
图1是示例性示出的一种进入多任务界面的场景示意图;Figure 1 is a schematic diagram illustrating a scenario of entering a multi-tasking interface;
图2是示例性示出的电子设备的结构示意图;Figure 2 is a schematic structural diagram of an exemplary electronic device;
图3是示例性示出的电子设备的软件结构示意图;Figure 3 is a schematic diagram of the software structure of an electronic device;
图4是示例性示出的多任务界面显示的方法的原理图;Figure 4 is a schematic diagram of an exemplary method for displaying a multi-task interface;
图5是示例性示出的多任务界面显示的方法的流程图;Figure 5 is a flow chart of an exemplary method for displaying a multi-task interface;
图6是示例性示出的电子设备重启且电子设备采用静态壁纸情况下,各模块之间的交互图;Figure 6 is an exemplary interaction diagram between modules when the electronic device is restarted and the electronic device adopts a static wallpaper;
图7是示例性示出的电子设备重启且电子设备采用超级壁纸情况下,各模块之间的交互图;Figure 7 is an exemplary illustration of the interaction between modules when the electronic device is restarted and the electronic device adopts super wallpaper;
图8是示例性示出的电子设备重启且电子设备采用动态壁纸情况下,各模块之间的交互图;Figure 8 is an exemplary interaction diagram between modules when the electronic device is restarted and the electronic device adopts dynamic wallpaper;
图9是示例性示出的电子设备更新壁纸且电子设备采用超级壁纸情况下,各模块之间的交互图;Figure 9 is an exemplary interaction diagram between modules in the case where the electronic device updates the wallpaper and the electronic device adopts the super wallpaper;
图10是示例性示出的电子设备更新壁纸且电子设备采用动态壁纸情况下,各模块之间的交互图;Figure 10 is an exemplary illustration of the interaction between the modules in the case where the electronic device updates the wallpaper and the electronic device adopts dynamic wallpaper;
图11是示例性示出的电子设备更新壁纸且电子设备采用静态壁纸情况下,各模块之间的交互图。FIG. 11 is an exemplary interaction diagram between modules in the case where the electronic device updates the wallpaper and the electronic device adopts a static wallpaper.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is just an association relationship that describes related objects, indicating that three relationships can exist. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and they exist alone. B these three situations.
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一目标对象和第二目标对象等是用于区别不同的目标对象,而不是用于描述目标对象的特定顺序。The terms “first” and “second” in the description and claims of the embodiments of this application are used to distinguish different objects, rather than to describe a specific order of objects. For example, the first target object, the second target object, etc. are used to distinguish different target objects, rather than to describe a specific order of the target objects.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "such as" in the embodiments of the present application is not to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary" or "such as" is intended to present the concept in a concrete manner.
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。In the description of the embodiments of this application, unless otherwise specified, the meaning of “plurality” refers to two or more. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
图1是示例性示出的一种进入多任务界面的场景示意图。本示例中,电子设备以手机为例,如图1所示,手机的显示屏显示主屏界面101,该主屏界面中包括各个应用的应用图标,如时钟应用的图标、日历应用的图标等。如图1的1a所示,用户可以点击时钟应用的图标,手机响应于用户的点击操作,启动时钟应用,如图1的1b所示,该1b中显示屏显示时钟界面102。用户可以点击手机中的返回按键返回主屏界面101。该用户可以点击主屏界面101中的日历应用的图标,手机响应于用户点击日历应用的图标的操作,启动日历应用,如图1中的1c所示,该显示屏显示日历界面103。用户可以输入多任务的操作,如图1的1c所示,用户可以按照黑色箭头的方向上滑,手机响应于用户的上滑操作,进入多任务界面。如图1的1d所示,手机的显示屏中显示多任务界面104,该多任务界面中包括运行在手机后台的应用程序的界面缩略图,如1d中所示,手机在进入多任务界面之前运行过日历应用、时钟应用以及设置应用,该三个应用在手机返回主屏界面时,运行于后台。当手机进入多任务时,该多任务界面104会以动画特效展示该多任务界面中的三个后台运行的应用的界面缩略图,如,进入该多任务界面时,该时钟界面的缩略图、设置界面的缩略图以及日历界面的缩略图依次显示于该显示屏中。Figure 1 is a schematic diagram illustrating a scenario of entering a multi-tasking interface. In this example, the electronic device takes a mobile phone as an example. As shown in Figure 1, the display screen of the mobile phone displays a home screen interface 101. The home screen interface includes application icons for each application, such as clock application icons, calendar application icons, etc. As shown in 1a of Figure 1 , the user can click the icon of the clock application, and the mobile phone starts the clock application in response to the user's click operation, as shown in 1b of Figure 1 , in which the clock interface 102 is displayed on the display screen. The user can click the return button on the mobile phone to return to the home screen interface 101. The user can click the icon of the calendar application in the home screen interface 101, and the mobile phone starts the calendar application in response to the user's operation of clicking the icon of the calendar application. As shown in 1c in Figure 1, the display screen displays the calendar interface 103. The user can enter multi-tasking operations, as shown in 1c of Figure 1. The user can slide up in the direction of the black arrow, and the phone enters the multi-tasking interface in response to the user's sliding up operation. As shown in 1d of Figure 1, the multitasking interface 104 is displayed on the display screen of the mobile phone. The multitasking interface includes interface thumbnails of applications running in the background of the mobile phone. As shown in 1d, the mobile phone enters the multitasking interface before entering the multitasking interface. The calendar application, clock application and settings application have been run. These three applications run in the background when the phone returns to the home screen interface. When the mobile phone enters multitasking, the multitasking interface 104 will display the interface thumbnails of the three background running applications in the multitasking interface with animated special effects. For example, when entering the multitasking interface, the thumbnails of the clock interface, The thumbnails of the settings interface and the thumbnails of the calendar interface are displayed on the display screen in sequence.
多任务界面的背景图像通常是根据当前手机的壁纸确定。示例性地,手机在检测到多任务的操作时,检测当前手机的壁纸是否为静态壁纸,若手机确定为静态壁纸类型,则从手机的壁纸资源中获取静态壁纸,并对静态壁纸进行模糊处理,获得模糊处理后的静态壁纸作为该多任务界面的背景图像。若手机确定壁纸为非静态壁纸类型(如超级壁纸类型或动态壁纸的类型),则手机对当前采用的壁纸进行截屏操作,对截屏图像进行模糊处理,将模糊处理后的截屏图像作为多任务界面的背景图像。由于每次在检测到多任务操作时,该手机都需要进行上述操作,而模糊处理进一步增加了手机的运算量,会导致在该多任务界面的背景图像上以动画形式展示后台应用的界面缩略图时,出现丢帧、卡顿的问题,导致后台应用的界面缩略图的显示不流畅,给用户留下手机卡的使用体验。The background image of the multitasking interface is usually determined based on the current wallpaper of the mobile phone. For example, when the mobile phone detects a multi-tasking operation, it detects whether the current mobile phone's wallpaper is a static wallpaper. If the mobile phone determines that it is a static wallpaper type, it obtains the static wallpaper from the mobile phone's wallpaper resource and blurs the static wallpaper. , obtain the blurred static wallpaper as the background image of the multi-tasking interface. If the mobile phone determines that the wallpaper is a non-static wallpaper type (such as a super wallpaper type or a dynamic wallpaper type), the mobile phone takes a screenshot of the currently adopted wallpaper, blurs the screenshot image, and uses the blurred screenshot image as the multi-tasking interface background image. Since the phone needs to perform the above operations every time a multitasking operation is detected, the blur processing further increases the calculation load of the phone, causing the interface shrinkage of the background application to be displayed in an animated form on the background image of the multitasking interface. When thumbnails are taken, problems such as frame loss and freezing occur, causing the thumbnails of the background application interface to be displayed unsmoothly, leaving users with a stuck experience.
本申请实施例提供一种多任务界面显示的方法,该方法由电子设备执行,使得电子设备在进入多任务界面时,后台应用的界面缩略图在动画展示时不会出现卡顿、丢帧的问题,提高展示后台应用的界面缩略图的流畅性,提高用户使用电子设备的使用体验。Embodiments of the present application provide a method for displaying a multi-task interface. The method is executed by an electronic device, so that when the electronic device enters the multi-task interface, the interface thumbnail of the background application will not be stuck or dropped during animation display. problem, improve the fluency of the interface thumbnails for displaying background applications, and improve the user experience of using electronic devices.
图2为本申请实施例示出的一种电子设备100的结构示意图。应该理解的是,图2示电子设备100仅是电子设备的一个范例,并且电子设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图1中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。FIG. 2 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application. It should be understood that the electronic device 100 shown in FIG. 2 is only an example of an electronic device, and the electronic device 100 may have more or fewer components than shown in the figure, and two or more components may be combined. Or could have different component configurations. The various components shown in Figure 1 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
电子设备100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2. Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, And subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
图3是本申请实施例的电子设备100的软件结构框图。FIG. 3 is a software structure block diagram of the electronic device 100 according to the embodiment of the present application.
电子设备100的分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为三层,从上至下分别为应用程序层,应用程序框架层以及内核层。可以理解的是,图3的软件结构中的层以及各层中包含的部件,并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的层,以及每个层中可以包括更多或更少的部件,本申请不做限定。The layered architecture of the electronic device 100 divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through software interfaces. In some embodiments, the Android system is divided into three layers, from top to bottom: application layer, application framework layer and kernel layer. It can be understood that the layers in the software structure of FIG. 3 and the components included in each layer do not constitute specific limitations on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown in the figures, and each layer may include more or fewer components, which is not limited by this application.
如图3所示,应用程序层可以包括一系列应用程序包。应用程序包可以包括各壁纸对应的主题包,输入法,WLAN,蓝牙,音乐,游戏,短信息,图库,通话,导航等应用程序。每个壁纸有各自对应的主题包,如动态壁纸A对应的主题包A、超级壁纸B的主题包B,超级壁纸C对应的主题包C等。其中,主题包可以理解为壁纸的安装包,该安装包中包括壁纸资源,例如,超级壁纸主题包中包括:该超级壁纸对应的存储位置。As shown in Figure 3, the application layer can include a series of application packages. Application packages can include theme packages corresponding to each wallpaper, input method, WLAN, Bluetooth, music, games, text messages, gallery, calls, navigation and other applications. Each wallpaper has its own corresponding theme package, such as theme package A corresponding to dynamic wallpaper A, theme package B corresponding to super wallpaper B, theme package C corresponding to super wallpaper C, etc. The theme package can be understood as a wallpaper installation package, which includes wallpaper resources. For example, a super wallpaper theme package includes: the storage location corresponding to the super wallpaper.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图3所示,应用程序框架层可以包括窗口管理器,资源管理器,内容提供器,视图系统,主题服务,通知管理器等。As shown in Figure 3, the application framework layer can include window managers, resource managers, content providers, view systems, theme services, notification managers, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make this data accessible to applications. Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, etc. A view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
主题服务可以用于为各壁纸对应的主题包提供匹配的服务接口。The theme service can be used to provide matching service interfaces for the theme packages corresponding to each wallpaper.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
可以理解的是,图3示出的软件结构中的层以及各层中包含的部件,并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的层,以及每个层中可以包括更多或更少的部件,本申请不做限定。It can be understood that the layers in the software structure shown in FIG. 3 and the components included in each layer do not constitute specific limitations on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown in the figures, and each layer may include more or fewer components, which is not limited by this application.
图4为示例性示出的多任务界面显示的方法的原理图。本示例中,电子设备以手机为例。如图4所示,当用户进行上滑的操作,该壁纸管理器可以根据不同的壁纸类型,确定获取壁纸的策略。若壁纸管理器检测到当前采用的是静态壁纸类型,则该壁纸管理器可以从系统获取静态壁纸,由于静态壁纸为一张二维图像,该壁纸管理器可以将该静态壁纸作为待处理的第一图像。若壁纸管理器检测到当前采用的是超级壁纸类型,则可以获取该手机采用的超级壁纸中的最后一张显示的图像作为第一图像。其中,超级壁纸中包括多张不同的图像。若壁纸管理器检测到当前采用的是动态壁纸类型,则可以解析当前手机所采用的动态视频,并获取该动态视频中最后一帧图像作为第一图像。FIG. 4 is a schematic diagram illustrating an exemplary method for displaying a multi-task interface. In this example, the electronic device is a mobile phone. As shown in Figure 4, when the user performs a swipe up operation, the wallpaper manager can determine the strategy for obtaining wallpapers based on different wallpaper types. If the wallpaper manager detects that the static wallpaper type is currently used, the wallpaper manager can obtain the static wallpaper from the system. Since the static wallpaper is a two-dimensional image, the wallpaper manager can use the static wallpaper as the first image to be processed. . If the wallpaper manager detects that the super wallpaper type is currently used, it can obtain the last displayed image in the super wallpaper used by the mobile phone as the first image. Among them, the super wallpaper includes several different images. If the wallpaper manager detects that the dynamic wallpaper type is currently used, it can parse the dynamic video currently used by the mobile phone and obtain the last frame image in the dynamic video as the first image.
如图4所示,壁纸管理器可以对第一图像进行100倍的图像压缩,以减少第一图像中像素。壁纸管理器对压缩后的图像进行模糊处理,模糊处理的方式可以采用高斯模糊。该壁纸管理器缓存模糊处理后的图像,并将缓存的图像作为目标图像。当桌面检测到多任务操作时,桌面可以获取缓存的目标图像作为多任务界面的背景图像,完成背景图像的刷新。As shown in Figure 4, the wallpaper manager can perform 100 times image compression on the first image to reduce pixels in the first image. The wallpaper manager blurs the compressed image, and the blur processing method can use Gaussian blur. The wallpaper manager caches the blurred image and uses the cached image as the target image. When the desktop detects a multitasking operation, the desktop can obtain the cached target image as the background image of the multitasking interface and complete the refresh of the background image.
下面结合图5具体说明该多任务界面的方法的具体流程,图5为示例性示出的一种多任务界面显示的方法的流程图。该多任务界面显示的方法应用于电子设备中,该电子设备可以是手机、平板电脑等设备。该多任务界面显示的方法包括如下步骤:The specific process of the multi-task interface method will be described in detail below with reference to FIG. 5 . FIG. 5 is an exemplary flow chart of a multi-task interface display method. The multi-task interface display method is applied to electronic devices, which can be mobile phones, tablet computers and other devices. The method for displaying the multi-tasking interface includes the following steps:
步骤401:壁纸管理模块若检测到指示壁纸初始化的指令,则向目标服务发送第一获取请求,第一获取请求用于指示获取目标图像,目标服务为与电子设备当前所采用的壁纸类型匹配的壁纸服务。Step 401: If the wallpaper management module detects an instruction instructing wallpaper initialization, it sends a first acquisition request to the target service. The first acquisition request is used to instruct the acquisition of the target image. The target service is a wallpaper type that matches the current wallpaper type used by the electronic device. Wallpaper Services.
本示例中,电子设备以手机为例进行说明,手机的壁纸管理器包括桌面、壁纸管理模块、各壁纸服务和壁纸处理模块(即壁纸工具类)。手机的桌面若检测到开机或重启操作,该桌面进行初始化操作,并向壁纸管理模块请求获取待显示的壁纸。In this example, the electronic device takes a mobile phone as an example. The wallpaper manager of the mobile phone includes a desktop, a wallpaper management module, various wallpaper services, and a wallpaper processing module (i.e., wallpaper tool class). If the mobile phone's desktop detects a boot or restart operation, the desktop performs an initialization operation and requests the wallpaper management module to obtain the wallpaper to be displayed.
该壁纸管理模块获取的请求可以指示壁纸管理模块进行壁纸初始化。壁纸管理模块接收到指示壁纸初始化的指令后,该壁纸管理模块可以获取当前手机采用的壁纸类型,根据壁纸类型进行壁纸初始化,生成与壁纸类型匹配的壁纸服务,并将于壁纸类型匹配的壁纸服务作为目标服务。例如,若手机所采用的壁纸的壁纸类型为静态壁纸类型,则壁纸管理模块初始化静态壁纸管理类,进而可以生成静态壁纸实例(即本申请中的静态壁纸服务)。壁纸服务可以理解为壁纸实例,可以调用其他模块获取壁纸,或对壁纸进行图像处理。The request obtained by the wallpaper management module can instruct the wallpaper management module to initialize the wallpaper. After the wallpaper management module receives an instruction instructing wallpaper initialization, the wallpaper management module can obtain the wallpaper type currently used by the mobile phone, initialize the wallpaper according to the wallpaper type, generate a wallpaper service that matches the wallpaper type, and use the wallpaper service that matches the wallpaper type. Serve as target. For example, if the wallpaper type used by the mobile phone is a static wallpaper type, the wallpaper management module initializes the static wallpaper management class, and then can generate a static wallpaper instance (ie, the static wallpaper service in this application). The wallpaper service can be understood as a wallpaper instance, which can call other modules to obtain wallpapers or perform image processing on wallpapers.
本示例中,壁纸类型包括:静态壁纸类型、动态壁纸类型以及超级壁纸类型。壁纸管理模块若检测到壁纸类型为静态壁纸类型,则确定静态壁纸服务作为目标服务;壁纸管理模块若检测到壁纸类型为动态壁纸类型,则确定动态壁纸服务作为目标服务;壁纸管理模块若检测到壁纸类型为超级壁纸类型,则确定超级壁纸服务作为目标服务。In this example, the wallpaper types include: static wallpaper type, dynamic wallpaper type and super wallpaper type. If the wallpaper management module detects that the wallpaper type is a static wallpaper type, it determines the static wallpaper service as the target service; if the wallpaper management module detects that the wallpaper type is a dynamic wallpaper type, it determines the dynamic wallpaper service as the target service; if the wallpaper management module detects If the wallpaper type is the super wallpaper type, the super wallpaper service is determined as the target service.
该壁纸管理器初始化操作之后,可以生成第一获取请求,该第一获取请求用于请求获取目标图像。可选地,目标图像为经过模糊处理后的第一图像,第一图像为从手机所采用的壁纸中获取的一张图像。After the wallpaper manager initializes the operation, a first acquisition request may be generated, and the first acquisition request is used to request acquisition of the target image. Optionally, the target image is a first image after blur processing, and the first image is an image obtained from a wallpaper used by the mobile phone.
步骤402:目标服务响应于第一获取请求,从电子设备当前所采用的壁纸中获取一张图像作为第一图像。Step 402: In response to the first acquisition request, the target service acquires an image as the first image from the wallpaper currently used by the electronic device.
示例性地,该目标服务可以向壁纸处理模块发送壁纸获取请求。壁纸处理模块接收到壁纸获取请求后,向系统扩展类发送访问请求,请求访问壁纸资源。系统扩展类可以获取手机当前所采用的壁纸,并返回该壁纸处理模块。该壁纸处理模块可以根据获取的壁纸,从手机设备当前所采用的壁纸中获取一张图像并返回目标服务。For example, the target service may send a wallpaper acquisition request to the wallpaper processing module. After receiving the wallpaper acquisition request, the wallpaper processing module sends an access request to the system extension class to request access to wallpaper resources. The system extension class can obtain the wallpaper currently used by the mobile phone and return the wallpaper processing module. The wallpaper processing module can obtain an image from the wallpaper currently used by the mobile phone device based on the obtained wallpaper and return it to the target service.
具体地,若目标服务为静态壁纸服务,该静态壁纸服务可以向壁纸处理模块发送第二获取请求,第二获取请求用于请求从手机当前所采用的壁纸。该壁纸处理模块响应于第二获取请求,向系统扩展类发送访问请求。系统扩展类可以获取手机当前所采用的静态壁纸,并将该静态壁纸返回该壁纸处理模块。该壁纸处理模块可以将该静态壁纸返回目标服务,该目标服务将该静态壁纸作为第一图像。Specifically, if the target service is a static wallpaper service, the static wallpaper service may send a second acquisition request to the wallpaper processing module, and the second acquisition request is used to request the wallpaper currently used by the mobile phone. In response to the second acquisition request, the wallpaper processing module sends an access request to the system extension class. The system extension class can obtain the static wallpaper currently used by the mobile phone and return the static wallpaper to the wallpaper processing module. The wallpaper processing module can return the static wallpaper to the target service, and the target service uses the static wallpaper as the first image.
在一个示例中,若目标服务为超级壁纸服务,该超级壁纸服务可以向壁纸处理模块发送第二获取请求,第二获取请求用于请求从手机当前所采用的壁纸。该壁纸处理模块响应于第二获取请求,从电子设备当前所采用的静态壁纸作为第一图像,静态壁纸包括一张图像;壁纸处理模块将第一图像返回目标服务;目标服务获取第一图像。In one example, if the target service is a super wallpaper service, the super wallpaper service can send a second acquisition request to the wallpaper processing module. The second acquisition request is used to request the wallpaper currently used by the mobile phone. In response to the second acquisition request, the wallpaper processing module takes the static wallpaper currently used by the electronic device as the first image, and the static wallpaper includes an image; the wallpaper processing module returns the first image to the target service; and the target service obtains the first image.
具体地,若目标服务为超级壁纸服务,该超级壁纸服务可以向壁纸处理模块发送第三获取请求,第三获取请求用于请求从手机当前所采用的壁纸。该壁纸处理模块响应于第三获取请求,向系统扩展类发送访问请求。该第三获取请求可以用于指示获取超级壁纸中最后一张显示的图像。该系统扩展类可以访问手机当前所采用的超级壁纸中最后一张显示的图像,并将该手机当前所采用的超级壁纸中最后一张显示的图像返回壁纸处理模块,由壁纸处理模块返回目标服务,该目标服务将手机当前所采用的超级壁纸中最后一张显示的图像作为第一图像。Specifically, if the target service is a super wallpaper service, the super wallpaper service may send a third acquisition request to the wallpaper processing module, and the third acquisition request is used to request the wallpaper currently used by the mobile phone. The wallpaper processing module responds to the third acquisition request and sends an access request to the system extension class. The third acquisition request may be used to instruct to acquire the last displayed image in the super wallpaper. This system extension class can access the last displayed image in the super wallpaper currently used by the mobile phone, and return the last displayed image in the super wallpaper currently used by the mobile phone to the wallpaper processing module, which returns the target service , the target service uses the last image displayed in the super wallpaper currently used by the mobile phone as the first image.
在一个示例中,若目标服务为动态壁纸服务,该动态壁纸服务可以向壁纸处理模块发送第四获取请求,第四获取请求用于请求从手机当前所采用的动态壁纸(即动态视频)。该壁纸处理模块响应于第四获取请求,获取电子设备当前所采用的动态视频;壁纸处理模块获取动态视频的最后一帧图像作为第一图像,并将第一图像返回目标服务;目标服务获取第一图像。In one example, if the target service is a dynamic wallpaper service, the dynamic wallpaper service may send a fourth acquisition request to the wallpaper processing module. The fourth acquisition request is used to request the dynamic wallpaper (i.e., dynamic video) currently used by the mobile phone. The wallpaper processing module responds to the fourth acquisition request to obtain the dynamic video currently used by the electronic device; the wallpaper processing module obtains the last frame image of the dynamic video as the first image, and returns the first image to the target service; the target service obtains the third an image.
具体地,该动态壁纸服务可以向壁纸处理模块发送第四获取请求,第四获取请求用于请求从手机当前所采用的壁纸。该壁纸处理模块响应于第四获取请求,向系统扩展类发送访问请求。该第四获取请求可以用于指示获取手机当前采用的动态视频。该系统扩展类可以访问手机当前所采用的动态视频,并将该动态视频返回壁纸处理模块。可选地,动态视频由一帧一帧的图像组成,该壁纸处理模块可以解析该动态视频,进而可以获取到动态视频中的任意一帧图像。Specifically, the dynamic wallpaper service may send a fourth acquisition request to the wallpaper processing module, and the fourth acquisition request is used to request the wallpaper currently used by the mobile phone. In response to the fourth acquisition request, the wallpaper processing module sends an access request to the system extension class. The fourth acquisition request may be used to instruct to acquire the dynamic video currently used by the mobile phone. This system extension class can access the dynamic video currently used by the mobile phone and return the dynamic video to the wallpaper processing module. Optionally, the dynamic video consists of images frame by frame, and the wallpaper processing module can parse the dynamic video, and then obtain any frame of the image in the dynamic video.
可选地,壁纸处理模块可以选取该动态视频中任意一帧的图像作为第一图像。本示例中以壁纸处理模块从解析的动态视频中获取最后一帧图像为例。由壁纸处理模块将动态视频中获取最后一帧图像返回目标服务,该目标服务将动态视频中最后一帧图像作为第一图像。Optionally, the wallpaper processing module can select an image of any frame in the dynamic video as the first image. In this example, the wallpaper processing module obtains the last frame image from the parsed dynamic video. The wallpaper processing module returns the last frame image obtained from the dynamic video to the target service, and the target service uses the last frame image in the dynamic video as the first image.
在一些实施例中,若用户进行了更新壁纸/更新主题的操作,使得手机当前采用的壁纸为超级壁纸时,该被选取的超级壁纸主题包可以进行广播,以通知桌面壁纸发生了更新。该广播的第一广播数据中可以包括超级壁纸中最后一张显示的图像的第一存储位置,进而使得壁纸处理模块可以根据第一存储位置,从超级壁纸主题包中获取最后一张显示的图像。该壁纸处理模块将超级壁纸中最后一张显示图像返回目标服务。In some embodiments, if the user performs the operation of updating the wallpaper/updating the theme, so that the wallpaper currently used by the mobile phone is the super wallpaper, the selected super wallpaper theme package can be broadcast to notify that the desktop wallpaper has been updated. The first broadcast data of the broadcast may include the first storage location of the last displayed image in the super wallpaper, so that the wallpaper processing module can obtain the last displayed image from the super wallpaper theme package according to the first storage location. . The wallpaper processing module returns the last displayed image in the super wallpaper to the target service.
同理,若用户将主题或壁纸更新为动态壁纸时,由主题服务进行广播,以通知桌面壁纸发生了更新。该广播的第二广播数据中可以包括动态视频的第二存储位置。当壁纸处理模块获取到第二存储位置后,该壁纸处理模块可以根据第二存储位置,从主题服务中获取动态视频。壁纸处理模块可以解码该动态视频,从解码的动态视频中获取最后一帧图像,并将动态视频中最后一帧图像返回目标服务。Similarly, if the user updates the theme or wallpaper to a dynamic wallpaper, the theme service will broadcast to notify that the desktop wallpaper has been updated. The second broadcast data of the broadcast may include a second storage location of the dynamic video. After the wallpaper processing module obtains the second storage location, the wallpaper processing module can obtain the dynamic video from the theme service according to the second storage location. The wallpaper processing module can decode the dynamic video, obtain the last frame image from the decoded dynamic video, and return the last frame image in the dynamic video to the target service.
步骤403:目标服务获取经过模糊处理后的第一图像作为目标图像,并将目标图像返回壁纸管理模块。Step 403: The target service obtains the blurred first image as the target image, and returns the target image to the wallpaper management module.
示例性地,目标服务获取到第一图像后,可以向壁纸处理模块发送第一处理指令,第一处理指令指示对第一图像进行图像压缩处理;壁纸处理模块响应于第一处理指令,对第一图像进行图像压缩指令;壁纸处理模块将压缩后的第一图像返回目标服务;目标服务获取压缩后的第一图像作为新的第一图像。该图像压缩的比例可以为10*10~30*30。图像压缩的方式是对图像进行丢帧处理,以减小图像的分辨率,缩小第一图像的容量。For example, after the target service obtains the first image, it may send a first processing instruction to the wallpaper processing module, and the first processing instruction instructs to perform image compression processing on the first image; in response to the first processing instruction, the wallpaper processing module performs image compression on the first image. Perform image compression instructions on an image; the wallpaper processing module returns the compressed first image to the target service; the target service obtains the compressed first image as a new first image. The image compression ratio can be 10*10~30*30. The method of image compression is to perform frame dropping processing on the image to reduce the resolution of the image and reduce the capacity of the first image.
该目标服务获得新的第一图像后,向壁纸处理模块发送第二处理指令,第二处理指令指示对该第一图像进行模糊处理;壁纸处理模块响应于第二处理指令,对第一图像进行高斯模糊的操作;壁纸处理模块将模糊处理后的图像返回目标服务;目标服务获取经过模糊处理后的第一图像。After obtaining the new first image, the target service sends a second processing instruction to the wallpaper processing module, and the second processing instruction instructs to perform blur processing on the first image; in response to the second processing instruction, the wallpaper processing module performs blur processing on the first image. Gaussian blur operation; the wallpaper processing module returns the blurred image to the target service; the target service obtains the first blurred image.
本示例中,壁纸处理模块先对第一图像进行图像压缩处理,可以减小的图像的分辨率,缩小第一图像的容量。再对图像压缩后的第一图像进行模糊处理,由于第一图像的分辨率减小,进一步减小了高斯模糊的处理量,提高对第一图像的处理速度,减小了手机处理第一图像的功耗。In this example, the wallpaper processing module first performs image compression processing on the first image, which can reduce the resolution of the image and reduce the capacity of the first image. Then the first image after image compression is blurred. Since the resolution of the first image is reduced, the processing amount of Gaussian blur is further reduced, the processing speed of the first image is improved, and the processing time of the first image by the mobile phone is reduced. of power consumption.
可选地,该目标服务还可以在获取到第一图像后,向壁纸处理模块发送第二处理指令。该壁纸处理模块直接对该第一图像进行模糊处理,并将模糊处理后的第一图像返回目标服务。目标服务将经过模糊处理后的第一图像作为目标图像,返回壁纸管理模块。Optionally, the target service may also send a second processing instruction to the wallpaper processing module after acquiring the first image. The wallpaper processing module directly performs blurring on the first image, and returns the blurred first image to the target service. The target service takes the first blurred image as the target image and returns it to the wallpaper management module.
步骤404:壁纸管理模块将目标图像传输至桌面,由桌面缓存目标图像。Step 404: The wallpaper management module transmits the target image to the desktop, and the desktop caches the target image.
示例性地,壁纸管理模块将目标图像返回桌面,桌面可以缓存该目标图像。可选地,当桌面切换壁纸或者,手机关机/重启时,桌面可以清除当前缓存的目标图像。Illustratively, the wallpaper management module returns the target image to the desktop, and the desktop can cache the target image. Optionally, when the desktop switches wallpaper or the phone is shut down/restarted, the desktop can clear the currently cached target image.
步骤405:桌面若检测到用户的多任务操作,则获取存储的目标图像作为多任务界面的背景图像。Step 405: If the desktop detects the user's multitasking operation, it obtains the stored target image as the background image of the multitasking interface.
当用户对手机进行上滑操作,手机响应于用户的多任务操作,该桌面可以直接获取存储的目标图像作为该多任务界面的背景图像,并显示该背景图像。在进入多任务界面的过程中,手机无需从系统侧获取当前采用的壁纸,并对壁纸进行模糊处理后展示,或者无需对动态壁纸或超级壁纸进行截屏,对截屏图像进行模糊处理后展示,降低了手机的功耗,减小了手机展示多任务界面的背景图像的过程的运算量,避免出现多任务界面中动画特效的卡顿、不流畅的问题。When the user slides up the mobile phone and the mobile phone responds to the user's multi-tasking operation, the desktop can directly obtain the stored target image as the background image of the multi-tasking interface and display the background image. When entering the multi-tasking interface, the phone does not need to obtain the currently used wallpaper from the system side and blur the wallpaper before displaying it, or it does not need to take a screenshot of the dynamic wallpaper or super wallpaper and blur the screenshot image before displaying it, which reduces It reduces the power consumption of the mobile phone, reduces the computational load of the process of displaying the background image of the multi-tasking interface on the mobile phone, and avoids the problem of stuck and unsmooth animation special effects in the multi-tasking interface.
图6为示例性示出的开启/重启手机且手机采用静态壁纸情况下,该多任务界面的显示方法中各模块之间的交互图。Figure 6 is an exemplary interaction diagram between modules in the display method of the multi-task interface when the mobile phone is turned on/restarted and the mobile phone adopts a static wallpaper.
如图6所示,该壁纸管理器可以包括:桌面、壁纸管理模块,目标服务、壁纸处理模块。本示例中,壁纸处理模块即为图6中的壁纸工具类。系统扩展类可以用于从系统中获取该手机当前采用的壁纸。As shown in Figure 6, the wallpaper manager may include: desktop, wallpaper management module, target service, and wallpaper processing module. In this example, the wallpaper processing module is the wallpaper tool class in Figure 6. The system extension class can be used to obtain the wallpaper currently used by the phone from the system.
步骤601:桌面响应于启动手机的操作,桌面执行初始化操作。Step 601: The desktop responds to the operation of starting the mobile phone, and the desktop performs an initialization operation.
具体地,用户进行重启操作或者开机操作时,该桌面可以检测到启动手机的操作。当桌面检测到启动手机的操作时,桌面执行初始化操作,该初始化操作可以参照现有方式中的初始化操作,此处将不再进行赘述。Specifically, when the user performs a restart operation or a boot operation, the desktop can detect the operation of starting the mobile phone. When the desktop detects the operation of starting the mobile phone, the desktop performs an initialization operation. This initialization operation can refer to the initialization operation in the existing method, which will not be described again here.
步骤602:桌面向壁纸管理模块发送壁纸获取请求。Step 602: The desktop sends a wallpaper acquisition request to the wallpaper management module.
具体地,该桌面可以向壁纸管理模块发送壁纸获取请求,以指示请求获取当前待显示的壁纸。Specifically, the desktop may send a wallpaper acquisition request to the wallpaper management module to indicate a request to acquire the wallpaper currently to be displayed.
步骤603:壁纸管理模块获取所采用的壁纸的壁纸类型。Step 603: The wallpaper management module obtains the wallpaper type of the adopted wallpaper.
具体地,该壁纸管理模块接收到壁纸获取请求后,可以获取当前手机所采用的壁纸的壁纸类型,例如,当前手机设置的壁纸的壁纸类型为静态壁纸类型,则该壁纸管理模块确定所采用的壁纸的壁纸类型为静态壁纸类型。Specifically, after receiving the wallpaper acquisition request, the wallpaper management module can obtain the wallpaper type of the wallpaper currently used by the mobile phone. For example, if the wallpaper type of the wallpaper currently set by the mobile phone is a static wallpaper type, then the wallpaper management module determines the wallpaper type used. The wallpaper type of wallpaper is static wallpaper type.
步骤604:壁纸管理模块根据壁纸类型,初始化静态壁纸服务,并将静态壁纸服务作为目标服务。Step 604: The wallpaper management module initializes the static wallpaper service according to the wallpaper type, and uses the static wallpaper service as the target service.
具体地,该壁纸管理模块获取静态壁纸类型,可以初始化静态壁纸实例(即静态壁纸服务)。壁纸管理模块可以将该静态壁纸服务作为当前手机的目标服务。Specifically, the wallpaper management module obtains the static wallpaper type and can initialize the static wallpaper instance (ie, static wallpaper service). The wallpaper management module can use the static wallpaper service as the target service of the current mobile phone.
步骤605:壁纸管理模块向静态壁纸服务请求获取目标图像。Step 605: The wallpaper management module requests the static wallpaper service to obtain the target image.
具体地,该壁纸管理模块向静态壁纸服务发送第一获取请求,该第一获取请求用于请求获取目标图像,该目标图像为经过模糊处理后的第一图像,第一图像为该手机当前所采用的静态壁纸。Specifically, the wallpaper management module sends a first acquisition request to the static wallpaper service. The first acquisition request is used to request acquisition of a target image. The target image is the first image after blur processing, and the first image is the current image of the mobile phone. Use static wallpaper.
步骤606:静态壁纸服务向壁纸工具类请求获取静态壁纸。Step 606: The static wallpaper service requests the wallpaper tool class to obtain the static wallpaper.
具体地,该静态壁纸服务响应于接收到的第一获取请求,向壁纸工具类请求获取静态壁纸,即该静态壁纸服务向壁纸工具类发送第二获取请求,第二获取请求用于请求获取静态壁纸。Specifically, in response to the received first acquisition request, the static wallpaper service requests the wallpaper tool class to obtain the static wallpaper, that is, the static wallpaper service sends a second acquisition request to the wallpaper tool class, and the second acquisition request is used to request to obtain the static wallpaper. wallpaper.
步骤607:壁纸工具类向系统扩展类发送访问请求,以访问壁纸资源。Step 607: The wallpaper tool class sends an access request to the system extension class to access wallpaper resources.
具体地,该壁纸工具类响应于第二获取请求,向系统扩展类发送访问请求。Specifically, in response to the second acquisition request, the wallpaper tool class sends an access request to the system extension class.
步骤608:系统扩展类向壁纸工具类返回静态壁纸。Step 608: The system extension class returns the static wallpaper to the wallpaper tool class.
具体地,该系统扩展类可以获知当前手机所采用的壁纸,故可以从系统中获取当前手机所采用的静态壁纸。该系统扩展类将该获取到的静态壁纸返回壁纸工具类。Specifically, the system extension class can learn the wallpaper used by the current mobile phone, so the static wallpaper used by the current mobile phone can be obtained from the system. The system extension class returns the obtained static wallpaper to the wallpaper tool class.
步骤609:壁纸工具类向静态壁纸服务返回静态壁纸。Step 609: The wallpaper tool class returns the static wallpaper to the static wallpaper service.
具体地,壁纸工具类接收到静态壁纸后,向静态壁纸服务返回该静态壁纸。Specifically, after receiving the static wallpaper, the wallpaper tool class returns the static wallpaper to the static wallpaper service.
步骤610:静态壁纸服务指示壁纸工具类对第一图像进行压缩处理。Step 610: The static wallpaper service instructs the wallpaper tool class to compress the first image.
具体地,该静态壁纸服务可以向壁纸工具类发送第一处理指令,该第一处理指令指示该壁纸工具类对第一图像进行压缩处理。该第一处理指令中还可以包括该第一图像,以便该壁纸工具类可以对该第一图像进行图像压缩的处理。可选地,该第一处理指令还可以包括图像压缩的压缩比例,图像压缩的比例范围可以是100倍至300倍,本示例中,该壁纸工具类可以对第一图像进行10*10的压缩。Specifically, the static wallpaper service may send a first processing instruction to the wallpaper tool class, and the first processing instruction instructs the wallpaper tool class to perform compression processing on the first image. The first processing instruction may also include the first image, so that the wallpaper tool class can perform image compression processing on the first image. Optionally, the first processing instruction may also include a compression ratio of image compression. The range of image compression ratio may be 100 times to 300 times. In this example, the wallpaper tool class may compress the first image 10*10 times. .
步骤611:壁纸工具类对第一图像进行图像压缩处理。Step 611: The wallpaper tool class performs image compression processing on the first image.
具体地,壁纸工具类接收到第一处理指令,可以获取第一图像以图像压缩的比例。该壁纸工具类按照接收的图像压缩比例,对该第一图像进行图像压缩处理。Specifically, the wallpaper tool class receives the first processing instruction and can obtain the first image at an image compression ratio. The wallpaper tool class performs image compression processing on the first image according to the received image compression ratio.
可选地,该壁纸工具类中可以按照预设的图像压缩比例对第一图像进行图像压缩处理,如预设的图像压缩比例可以为10*10,或者20*20。Optionally, the wallpaper tool class can perform image compression processing on the first image according to a preset image compression ratio. For example, the preset image compression ratio can be 10*10, or 20*20.
步骤612:壁纸工具类将图像压缩处理后的第一图像返回静态壁纸服务。Step 612: The wallpaper tool class returns the first image after image compression processing to the static wallpaper service.
具体地,壁纸工具类在完成对第一图像的图像压缩后,将压缩后的第一图像返回该静态壁纸服务。Specifically, after completing the image compression of the first image, the wallpaper tool class returns the compressed first image to the static wallpaper service.
步骤613:静态壁纸服务指示壁纸工具类对第一图像进行模糊处理。Step 613: The static wallpaper service instructs the wallpaper tool class to blur the first image.
具体地,静态壁纸服务接收待压缩后的第一图像后,可以将该压缩后的第一图像作为新的第一图像。该静态壁纸服务生成第二处理指令,该第二处理指令用于指示该壁纸工具类对第一图像进行模糊处理。可选地,该第二处理指令中可以携带新的第一图像。Specifically, after the static wallpaper service receives the first image to be compressed, the compressed first image can be used as a new first image. The static wallpaper service generates a second processing instruction, which is used to instruct the wallpaper tool class to blur the first image. Optionally, the second processing instruction may carry a new first image.
步骤614:壁纸工具类对第一图像进行模糊处理。Step 614: The wallpaper tool class blurs the first image.
具体地,壁纸工具类接收到第二处理指令,获取待处理的第一图像。该壁纸工具类根据第二处理指令,对第一图像进行模糊处理,模糊处理的方式包括高斯模糊。Specifically, the wallpaper tool class receives the second processing instruction and obtains the first image to be processed. The wallpaper tool class performs blur processing on the first image according to the second processing instruction, and the blur processing method includes Gaussian blur.
步骤615:壁纸工具类将模糊处理后的第一图像返回静态壁纸服务。Step 615: The wallpaper tool class returns the blurred first image to the static wallpaper service.
步骤616:静态壁纸服务将模糊处理后的第一图像作为目标图像。Step 616: The static wallpaper service uses the blurred first image as the target image.
步骤617:静态壁纸服务将目标图像返回壁纸管理模块。Step 617: The static wallpaper service returns the target image to the wallpaper management module.
步骤618:壁纸管理模块将目标图像返回桌面。Step 618: The wallpaper management module returns the target image to the desktop.
步骤619:桌面缓存该目标图像。Step 619: The desktop caches the target image.
该步骤618和步骤619可以参照步骤404中的相关描述,此处将不再进行赘述。For steps 618 and 619, reference may be made to the relevant description in step 404, which will not be described again here.
步骤620:桌面若检测到用户输入的多任务的操作,从缓存中获取目标图像作为多任务界面的背景图像。Step 620: If the desktop detects a multitasking operation input by the user, obtain the target image from the cache as the background image of the multitasking interface.
步骤621:该桌面显示该背景图像。Step 621: The desktop displays the background image.
步骤620和步骤621可以参照步骤405中的相关描述,此处将不再进行赘述。Steps 620 and 621 may refer to the relevant description in step 405, and will not be described again here.
图7为示例性示出的开启/重启手机且手机采用超级壁纸的情况下,该多任务界面的显示方法中各模块之间的交互图。Figure 7 is an exemplary interaction diagram between modules in the display method of the multi-task interface when the mobile phone is turned on/restarted and the mobile phone adopts super wallpaper.
步骤701:桌面响应于启动手机的操作,桌面执行初始化操作。Step 701: The desktop responds to the operation of starting the mobile phone, and the desktop performs an initialization operation.
该步骤可以参照步骤601中的相关描述,此处将不再进行赘述。For this step, reference can be made to the relevant description in step 601, which will not be described again here.
步骤702:桌面向壁纸管理模块发送壁纸获取请求。Step 702: The desktop sends a wallpaper acquisition request to the wallpaper management module.
步骤703:壁纸管理模块获取所采用的壁纸的壁纸类型。Step 703: The wallpaper management module obtains the wallpaper type of the adopted wallpaper.
具体地,当前手机设置的壁纸的壁纸类型为超级壁纸类型,则该壁纸管理模块确定所采用的壁纸的壁纸类型为超级壁纸类型。Specifically, if the wallpaper type of the wallpaper currently set on the mobile phone is the super wallpaper type, then the wallpaper management module determines that the wallpaper type of the adopted wallpaper is the super wallpaper type.
步骤704:壁纸管理模块根据壁纸类型,初始化超级壁纸服务,并将超级壁纸服务作为目标服务。Step 704: The wallpaper management module initializes the super wallpaper service according to the wallpaper type, and uses the super wallpaper service as the target service.
具体地,该壁纸管理模块获取超级壁纸类型,可以初始化超级壁纸实例(即超级壁纸服务)。壁纸管理模块可以将该超级壁纸服务作为当前手机的目标服务。Specifically, the wallpaper management module obtains the super wallpaper type and can initialize the super wallpaper instance (ie, super wallpaper service). The wallpaper management module can use the super wallpaper service as the target service of the current mobile phone.
步骤705:壁纸管理模块向超级壁纸服务请求获取目标图像。Step 705: The wallpaper management module requests the super wallpaper service to obtain the target image.
具体地,该壁纸管理模块向超级壁纸服务发送第一获取请求,该第一获取请求用于请求获取目标图像。Specifically, the wallpaper management module sends a first acquisition request to the super wallpaper service, where the first acquisition request is used to request acquisition of the target image.
步骤706:超级壁纸服务向壁纸工具类请求获取超级壁纸中最后一张显示的图像。Step 706: The super wallpaper service requests the wallpaper tool class to obtain the last image displayed in the super wallpaper.
具体地,该超级壁纸服务响应于接收到的第一获取请求,向壁纸工具类请求获取超级壁纸中最后显示的一张图像,即该超级壁纸服务向壁纸工具类发送第三获取请求,第三获取请求用于请求获取超级壁纸中最后显示的一张图像。Specifically, in response to the first acquisition request received, the super wallpaper service requests the wallpaper tool class to obtain the last image displayed in the super wallpaper, that is, the super wallpaper service sends a third acquisition request to the wallpaper tool class. The get request is used to request the last image displayed in the super wallpaper.
步骤707:壁纸工具类向系统扩展类发送访问请求,以访问壁纸资源。Step 707: The wallpaper tool class sends an access request to the system extension class to access wallpaper resources.
具体地,该壁纸工具类响应于第三获取请求,向系统扩展类发送访问请求。Specifically, in response to the third acquisition request, the wallpaper tool class sends an access request to the system extension class.
步骤708:系统扩展类向壁纸工具类返回静态壁纸。Step 708: The system extension class returns the static wallpaper to the wallpaper tool class.
具体地,该系统扩展类可以获知当前手机所采用的壁纸,故可以从系统中获取当前手机所采用的超级壁纸中最后显示的一张图像。该系统扩展类将该获取到的超级壁纸中最后显示的一张图像返回壁纸工具类。Specifically, the system extension class can know the wallpaper currently used by the mobile phone, so the last image displayed in the super wallpaper used by the current mobile phone can be obtained from the system. This system extension class returns the last image displayed in the obtained super wallpaper to the wallpaper tool class.
步骤709:壁纸工具类向超级壁纸服务返回超级壁纸中最后显示的一张图像。Step 709: The wallpaper tool class returns the last image displayed in the super wallpaper to the super wallpaper service.
具体地,壁纸工具类接收到超级壁纸后,向超级壁纸服务返回该超级壁纸中最后显示的一张图像。Specifically, after receiving the super wallpaper, the wallpaper tool class returns the last image displayed in the super wallpaper to the super wallpaper service.
步骤710:超级壁纸服务指示壁纸工具类对第一图像进行压缩处理。Step 710: The super wallpaper service instructs the wallpaper tool class to compress the first image.
具体地,超级壁纸服务将该超级壁纸中最后显示的一张图像作为第一图像,并可以向壁纸工具类发送第一处理指令,该第一处理指令指示该壁纸工具类对第一图像进行压缩处理。Specifically, the super wallpaper service uses the last image displayed in the super wallpaper as the first image, and can send a first processing instruction to the wallpaper tool class, where the first processing instruction instructs the wallpaper tool class to compress the first image. deal with.
步骤711:壁纸工具类对第一图像进行图像压缩处理。Step 711: The wallpaper tool class performs image compression processing on the first image.
该步骤可以参考步骤611中的相关描述,此处将不再进行赘述。For this step, reference can be made to the relevant description in step 611, which will not be described again here.
步骤712:壁纸工具类将图像压缩处理后的第一图像返回超级壁纸服务。Step 712: The wallpaper tool class returns the first image after image compression to the super wallpaper service.
具体地,壁纸工具类在完成对第一图像的图像压缩后,将压缩后的第一图像返回该超级壁纸服务。Specifically, after completing the image compression of the first image, the wallpaper tool class returns the compressed first image to the super wallpaper service.
步骤713:超级壁纸服务指示壁纸工具类对第一图像进行模糊处理。Step 713: The super wallpaper service instructs the wallpaper tool class to blur the first image.
该步骤可以参考步骤613中的相关描述,此处将不再进行赘述。For this step, reference can be made to the relevant description in step 613, which will not be described again here.
步骤714:壁纸工具类对第一图像进行模糊处理。Step 714: The wallpaper tool class performs blur processing on the first image.
该步骤可以参照步骤614中的相关描述,此处将不再进行赘述。For this step, reference may be made to the relevant description in step 614, which will not be described again here.
步骤715:壁纸工具类将模糊处理后的第一图像返回超级壁纸服务。Step 715: The wallpaper tool class returns the blurred first image to the super wallpaper service.
步骤716:超级壁纸服务将模糊处理后的第一图像作为目标图像。Step 716: The super wallpaper service uses the blurred first image as the target image.
步骤717:超级壁纸服务将目标图像返回壁纸管理模块。Step 717: The super wallpaper service returns the target image to the wallpaper management module.
步骤718:壁纸管理模块将目标图像返回桌面。Step 718: The wallpaper management module returns the target image to the desktop.
步骤719:桌面缓存该目标图像。Step 719: The desktop caches the target image.
步骤720:桌面若检测到用户输入的多任务的操作,从缓存中获取目标图像作为多任务界面的背景图像。Step 720: If the desktop detects a multitasking operation input by the user, obtain the target image from the cache as the background image of the multitasking interface.
步骤721:该桌面显示该背景图像。Step 721: The desktop displays the background image.
上述步骤715至步骤721可以参照步骤步骤615至步骤621中的相关描述,此处将不再进行赘述。For the above steps 715 to 721, reference may be made to the relevant descriptions in steps 615 to 621, which will not be described again here.
图8为示例性示出的开启/重启手机且手机采用动态壁纸情况下,该多任务界面的显示方法中各模块之间的交互图。Figure 8 is an exemplary interaction diagram between modules in the display method of the multi-task interface when the mobile phone is turned on/restarted and the mobile phone adopts dynamic wallpaper.
步骤801:桌面响应于启动手机的操作,桌面执行初始化操作。Step 801: The desktop responds to the operation of starting the mobile phone, and the desktop performs an initialization operation.
该步骤可以参照步骤601中的相关描述,此处将不再进行赘述。For this step, reference can be made to the relevant description in step 601, which will not be described again here.
步骤802:桌面向壁纸管理模块发送壁纸获取请求。Step 802: The desktop sends a wallpaper acquisition request to the wallpaper management module.
步骤803:壁纸管理模块获取所采用的壁纸的壁纸类型。Step 803: The wallpaper management module obtains the wallpaper type of the adopted wallpaper.
具体地,当前手机设置的壁纸的壁纸类型为动态壁纸类型,则该壁纸管理模块确定所采用的壁纸的壁纸类型为动态壁纸类型。Specifically, if the wallpaper type of the wallpaper currently set on the mobile phone is a dynamic wallpaper type, then the wallpaper management module determines that the wallpaper type of the adopted wallpaper is a dynamic wallpaper type.
步骤804:壁纸管理模块根据壁纸类型,初始化动态壁纸服务,并将动态壁纸服务作为目标服务。Step 804: The wallpaper management module initializes the dynamic wallpaper service according to the wallpaper type, and uses the dynamic wallpaper service as the target service.
具体地,该壁纸管理模块获取超级壁纸类型,可以初始化动态壁纸实例(即动态壁纸服务)。壁纸管理模块可以将该动态壁纸服务作为当前手机的目标服务。Specifically, the wallpaper management module obtains the super wallpaper type and can initialize the dynamic wallpaper instance (ie, dynamic wallpaper service). The wallpaper management module can use the dynamic wallpaper service as the target service of the current mobile phone.
步骤805:壁纸管理模块向动态壁纸服务请求获取目标图像。Step 805: The wallpaper management module requests the dynamic wallpaper service to obtain the target image.
具体地,该壁纸管理模块向动态壁纸服务发送第一获取请求,该第一获取请求用于请求获取目标图像。Specifically, the wallpaper management module sends a first acquisition request to the dynamic wallpaper service, where the first acquisition request is used to request acquisition of the target image.
步骤806:动态壁纸服务向壁纸工具类请求获取动态壁纸。Step 806: The dynamic wallpaper service requests the wallpaper tool class to obtain the dynamic wallpaper.
具体地,该动态壁纸服务响应于接收到的第一获取请求,向壁纸工具类发送第四获取请求,第四获取请求用于请求获取动态壁纸。Specifically, in response to the received first acquisition request, the dynamic wallpaper service sends a fourth acquisition request to the wallpaper tool class, and the fourth acquisition request is used to request acquisition of the dynamic wallpaper.
步骤807:壁纸工具类向系统扩展类发送访问请求,以访问壁纸资源。Step 807: The wallpaper tool class sends an access request to the system extension class to access wallpaper resources.
具体地,该壁纸工具类响应于第四获取请求,向系统扩展类发送访问请求。Specifically, in response to the fourth acquisition request, the wallpaper tool class sends an access request to the system extension class.
步骤808:系统扩展类向壁纸工具类返回动态壁纸。Step 808: The system extension class returns the dynamic wallpaper to the wallpaper tool class.
具体地,该系统扩展类可以获知当前手机所采用的壁纸,故可以从系统中获取当前手机所采用的动态壁纸,即动态视频。该系统扩展类将该获取到的动态视频返回壁纸工具类。Specifically, the system extension class can know the wallpaper used by the current mobile phone, so the dynamic wallpaper used by the current mobile phone, that is, the dynamic video, can be obtained from the system. The system extension class returns the obtained dynamic video to the wallpaper tool class.
步骤809:壁纸工具类解码动态视频。Step 809: The wallpaper tool class decodes the dynamic video.
步骤810:壁纸工具类获取解码的动态视频中最后一帧图像作为第一图像。Step 810: The wallpaper tool class obtains the last frame image in the decoded dynamic video as the first image.
步骤811:壁纸工具类向动态壁纸服务返回第一图像。Step 811: The wallpaper tool class returns the first image to the dynamic wallpaper service.
步骤812:动态壁纸服务指示壁纸工具类对第一图像进行压缩处理。Step 812: The dynamic wallpaper service instructs the wallpaper tool class to compress the first image.
该步骤可以参考步骤610中的相关描述,此处将不再进行赘述。For this step, reference may be made to the relevant description in step 610, which will not be described again here.
步骤813:壁纸工具类对第一图像进行图像压缩处理。Step 813: The wallpaper tool class performs image compression processing on the first image.
该步骤可以参考步骤611中的相关描述,此处将不再进行赘述。For this step, reference can be made to the relevant description in step 611, which will not be described again here.
步骤814:壁纸工具类将图像压缩处理后的第一图像返回动态壁纸服务。Step 814: The wallpaper tool class returns the first image after image compression to the dynamic wallpaper service.
步骤815:动态壁纸服务指示壁纸工具类对第一图像进行模糊处理。Step 815: The dynamic wallpaper service instructs the wallpaper tool class to blur the first image.
该步骤可以参考步骤613中的相关描述,此处将不再进行赘述。For this step, reference can be made to the relevant description in step 613, which will not be described again here.
步骤816:壁纸工具类对第一图像进行模糊处理。Step 816: The wallpaper tool class performs blur processing on the first image.
该步骤可以参照步骤614中的相关描述,此处将不再进行赘述。For this step, reference may be made to the relevant description in step 614, which will not be described again here.
步骤817:壁纸工具类将模糊处理后的第一图像返回动态壁纸服务。Step 817: The wallpaper tool class returns the blurred first image to the dynamic wallpaper service.
步骤818:动态壁纸服务将模糊处理后的第一图像作为目标图像。Step 818: The dynamic wallpaper service uses the blurred first image as the target image.
步骤819:动态壁纸服务将目标图像返回壁纸管理模块。Step 819: The dynamic wallpaper service returns the target image to the wallpaper management module.
步骤820:壁纸管理模块将目标图像返回桌面。Step 820: The wallpaper management module returns the target image to the desktop.
步骤821:桌面缓存该目标图像。Step 821: The desktop caches the target image.
步骤822:桌面若检测到用户输入的多任务的操作,从缓存中获取目标图像作为多任务界面的背景图像。Step 822: If the desktop detects a multitasking operation input by the user, obtain the target image from the cache as the background image of the multitasking interface.
步骤823:该桌面显示该背景图像。Step 823: The desktop displays the background image.
上述步骤817至步骤823可以参照步骤步骤615至步骤621中的相关描述,此处将不再进行赘述。For the above steps 817 to 823, reference may be made to the relevant descriptions in steps 615 to 621, which will not be described again here.
图9为示例性示出的更换壁纸且手机采用超级壁纸的情况下,该多任务界面的显示方法中各模块之间的交互图。Figure 9 is an exemplary interaction diagram between modules in the display method of the multi-task interface when the wallpaper is changed and the mobile phone adopts the super wallpaper.
步骤901:超级壁纸主题包在检测到更换的操作,则广播第一广播数据。Step 901: When the super wallpaper theme package detects the replacement operation, it broadcasts the first broadcast data.
具体地,该第一广播数据中包括第一存储位置,该第一存储位置为手机当前采用的超级壁纸中最后一张显示的图像的存储位置。本示例中该超级壁纸主题包为该手机当前所采用的超级壁纸多所对应的主题包。不同超级壁纸有各自对应的主题包。每个超级壁纸主题包存储有各自对应的该超级壁纸,即存储有组成该超级壁纸的多张图像。当用户选取了超级壁纸主题包时,被选取的超级壁纸主题包接收到用户输入的更换操作,获取第一存储位置,生成第一广播数据。即该第一广播数据中包括第一存储位置,如超级壁纸中最后一张显示的图像的URL(uniform resource locator,统一资源定位系统)。被选取的超级壁纸主题包广播该第一广播数据。Specifically, the first broadcast data includes a first storage location, and the first storage location is the storage location of the last displayed image in the super wallpaper currently used by the mobile phone. In this example, the super wallpaper theme package is a theme package corresponding to the super wallpaper currently used by the mobile phone. Different super wallpapers have their own corresponding theme packages. Each super wallpaper theme package stores its corresponding super wallpaper, that is, it stores multiple images that make up the super wallpaper. When the user selects the super wallpaper theme package, the selected super wallpaper theme package receives the replacement operation input by the user, obtains the first storage location, and generates the first broadcast data. That is, the first broadcast data includes the first storage location, such as the URL (uniform resource locator, Uniform Resource Locator) of the last image displayed in the super wallpaper. The selected super wallpaper theme package broadcasts the first broadcast data.
可选地,该第一广播数据用于指示当前手机的壁纸更新为被选中的超级壁纸(即被选中的超级壁纸主题包中存储的超级壁纸)。Optionally, the first broadcast data is used to indicate that the wallpaper of the current mobile phone is updated to the selected super wallpaper (that is, the super wallpaper stored in the selected super wallpaper theme package).
步骤902:桌面响应于第一广播数据,向壁纸管理模块发送壁纸获取请求。Step 902: In response to the first broadcast data, the desktop sends a wallpaper acquisition request to the wallpaper management module.
具体地,桌面接收到第一广播数据,解析该第一广播数据,确定手机将壁纸更新为超级壁纸类型以及获取第一存储位置。该桌面向壁纸管理模块发送壁纸获取请求,该壁纸获取请求中携带有第一存储位置。Specifically, the desktop receives the first broadcast data, analyzes the first broadcast data, determines that the mobile phone updates the wallpaper to the super wallpaper type, and obtains the first storage location. The desktop sends a wallpaper acquisition request to the wallpaper management module, and the wallpaper acquisition request carries the first storage location.
步骤903:壁纸管理模块获取所采用的壁纸的壁纸类型。Step 903: The wallpaper management module obtains the wallpaper type of the adopted wallpaper.
该步骤可以参考步骤703中的相关描述,此处不再进行赘述。For this step, please refer to the relevant description in step 703, which will not be described again here.
步骤904:壁纸管理模块根据壁纸类型,初始化超级壁纸服务,并将超级壁纸服务作为目标服务。Step 904: The wallpaper management module initializes the super wallpaper service according to the wallpaper type, and uses the super wallpaper service as the target service.
步骤905:壁纸管理模块向超级壁纸服务请求获取目标图像。Step 905: The wallpaper management module requests the super wallpaper service to obtain the target image.
该步骤可以参考步骤705中的相关描述,此处不再进行赘述。需要说明的是,壁纸管理模块向超级壁纸服务请求获取目标图像时,该壁纸管理模块将第一存储位置也发送至超级壁纸服务。For this step, reference can be made to the relevant description in step 705, which will not be described again here. It should be noted that when the wallpaper management module requests the super wallpaper service to obtain the target image, the wallpaper management module also sends the first storage location to the super wallpaper service.
步骤906:超级壁纸服务向壁纸工具类请求获取超级壁纸中最后一张显示的图像。Step 906: The super wallpaper service requests the wallpaper tool class to obtain the last image displayed in the super wallpaper.
超级壁纸服务将第一存储位置发送至壁纸工具类,该壁纸工具类获取到该第一存储位置后,即可根据该第一存储位置,获取手机当前采用的超级壁纸中最后一张显示的图像。The super wallpaper service sends the first storage location to the wallpaper tool class. After the wallpaper tool class obtains the first storage location, it can obtain the last displayed image in the super wallpaper currently used by the mobile phone based on the first storage location. .
在一个示例中,若第一广播数据中不包含第一存储位置,可以不执行步骤907,而是执行如图7中707~721中的步骤。In one example, if the first broadcast data does not include the first storage location, step 907 may not be performed, but steps 707 to 721 in Figure 7 may be performed.
步骤907:壁纸工具类向超级壁纸主题包获取超级壁纸中最后一张显示的图像。Step 907: The wallpaper tool class obtains the last image displayed in the super wallpaper from the super wallpaper theme package.
具体地,该壁纸工具类根据该第一存储位置,向被选中的超级壁纸主题包中请求获取手机当前采用的超级壁纸中最后一张显示的图像。Specifically, the wallpaper tool class requests the selected super wallpaper theme package to obtain the last displayed image in the super wallpaper currently used by the mobile phone according to the first storage location.
步骤908:超级壁纸主题包向壁纸工具类返回超级壁纸中最后一张显示的图像。Step 908: The super wallpaper theme package returns the last image displayed in the super wallpaper to the wallpaper tool class.
具体地,超级壁纸主题包根据第一存储位置,获取当前手机所采用的超级壁纸中最后显示的一张图像,并将超级壁纸中最后显示的一张图像返回该系统工具。Specifically, the super wallpaper theme package obtains the last image displayed in the super wallpaper currently used by the mobile phone according to the first storage location, and returns the last image displayed in the super wallpaper to the system tool.
步骤909:壁纸工具类向超级壁纸服务返回超级壁纸中最后显示的一张图像。Step 909: The wallpaper tool class returns the last image displayed in the super wallpaper to the super wallpaper service.
步骤910:超级壁纸服务指示壁纸工具类对第一图像进行压缩处理。Step 910: The super wallpaper service instructs the wallpaper tool class to compress the first image.
步骤911:壁纸工具类对第一图像进行图像压缩处理。Step 911: The wallpaper tool class performs image compression processing on the first image.
步骤912:壁纸工具类将图像压缩处理后的第一图像返回超级壁纸服务。Step 912: The wallpaper tool class returns the first image after image compression processing to the super wallpaper service.
步骤913:超级壁纸服务指示壁纸工具类对第一图像进行模糊处理。Step 913: The super wallpaper service instructs the wallpaper tool class to blur the first image.
步骤914:壁纸工具类对第一图像进行模糊处理。Step 914: The wallpaper tool class performs blur processing on the first image.
步骤915:壁纸工具类将模糊处理后的第一图像返回超级壁纸服务。Step 915: The wallpaper tool class returns the blurred first image to the super wallpaper service.
步骤916:超级壁纸服务将模糊处理后的第一图像作为目标图像。Step 916: The super wallpaper service uses the blurred first image as the target image.
步骤917:超级壁纸服务将目标图像返回壁纸管理模块。Step 917: The super wallpaper service returns the target image to the wallpaper management module.
步骤918:壁纸管理模块将目标图像返回桌面。Step 918: The wallpaper management module returns the target image to the desktop.
步骤919:桌面缓存该目标图像。Step 919: The desktop caches the target image.
步骤920:桌面若检测到用户输入的多任务的操作,从缓存中获取目标图像作为多任务界面的背景图像。Step 920: If the desktop detects a multitasking operation input by the user, obtain the target image from the cache as the background image of the multitasking interface.
步骤921:该桌面显示该背景图像。Step 921: The desktop displays the background image.
上述步骤909至步骤921可以参照步骤步骤709至步骤721中的相关描述,此处将不再进行赘述。For the above steps 909 to 921, reference may be made to the relevant descriptions in steps 709 to 721, which will not be described again here.
图10为示例性示出的更换壁纸且手机采用动态壁纸的情况下,该多任务界面的显示方法中各模块之间的交互图。Figure 10 is an exemplary interaction diagram between modules in the display method of the multi-task interface when the wallpaper is changed and the mobile phone adopts dynamic wallpaper.
步骤1001:主题服务在检测到更换的操作,则广播第二广播数据。Step 1001: When the theme service detects the replacement operation, it broadcasts the second broadcast data.
具体地,动态壁纸可以理解为动态视频,主题服务位于电子设备的应用程序框架层,当动态壁纸加载时,该主题服务可以从系统中获取待显示的动态视频。当主题服务检测到用户输入的更换壁纸或者更换主题的操作时,可以获取该手机待显示的动态视频所处的第二存储位置,该第二存储位置可以是动态视频的URL。该主题服务生成第二广播数据,可以用于指示手机更换了主题/壁纸,且该第二广播数据中包括该第二存储位置。Specifically, dynamic wallpaper can be understood as dynamic video. The theme service is located at the application framework layer of the electronic device. When the dynamic wallpaper is loaded, the theme service can obtain the dynamic video to be displayed from the system. When the theme service detects the operation of changing the wallpaper or changing the theme input by the user, it can obtain the second storage location where the dynamic video to be displayed on the mobile phone is located. The second storage location can be the URL of the dynamic video. The theme service generates second broadcast data, which can be used to indicate that the mobile phone has changed the theme/wallpaper, and the second broadcast data includes the second storage location.
主题服务以广播的形式通知其他模块手机更新了壁纸或主题。The theme service notifies other modules that the mobile phone has updated the wallpaper or theme in the form of broadcast.
步骤1002:桌面响应于第二广播数据,向壁纸管理模块发送壁纸获取请求。Step 1002: In response to the second broadcast data, the desktop sends a wallpaper acquisition request to the wallpaper management module.
具体地,桌面接收到第二广播数据,解析该第二广播数据,确定手机将壁纸更新为动态壁纸类型以及获取到第二存储位置。该桌面向壁纸管理模块发送壁纸获取请求,该壁纸获取请求中携带有第二存储位置。Specifically, the desktop receives the second broadcast data, analyzes the second broadcast data, determines that the mobile phone updates the wallpaper to the dynamic wallpaper type, and obtains the second storage location. The desktop sends a wallpaper acquisition request to the wallpaper management module, and the wallpaper acquisition request carries the second storage location.
步骤1003:壁纸管理模块获取所采用的壁纸的壁纸类型。Step 1003: The wallpaper management module obtains the wallpaper type of the adopted wallpaper.
具体地,当前手机设置的壁纸的壁纸类型为动态壁纸类型,则该壁纸管理模块确定所采用的壁纸的壁纸类型为动态壁纸类型。Specifically, if the wallpaper type of the wallpaper currently set on the mobile phone is a dynamic wallpaper type, then the wallpaper management module determines that the wallpaper type of the adopted wallpaper is a dynamic wallpaper type.
步骤1004:壁纸管理模块根据壁纸类型,初始化动态壁纸服务,并将动态壁纸服务作为目标服务。Step 1004: The wallpaper management module initializes the dynamic wallpaper service according to the wallpaper type, and uses the dynamic wallpaper service as the target service.
该步骤可以参考步骤804中的相关描述,此处不再进行赘述。For this step, reference can be made to the relevant description in step 804, which will not be described again here.
步骤1005:壁纸管理模块向动态壁纸服务请求获取目标图像。Step 1005: The wallpaper management module requests the dynamic wallpaper service to obtain the target image.
步骤1006:动态壁纸服务向壁纸工具类请求获取动态壁纸。Step 1006: The dynamic wallpaper service requests the wallpaper tool class to obtain the dynamic wallpaper.
步骤1007:壁纸工具类向主题服务发送访问请求,请求获取动态视频。Step 1007: The wallpaper tool class sends an access request to the theme service, requesting to obtain dynamic video.
具体地,壁纸工具类向主题服务发送访问请求,该访问请求中包括第二存储位置。Specifically, the wallpaper tool class sends an access request to the theme service, and the access request includes the second storage location.
步骤1008:主题服务向壁纸工具类返回动态视频。Step 1008: The theme service returns the dynamic video to the wallpaper tool class.
该主题服务根据第二存储位置,获取手机当前采用的动态壁纸。该主题服务将获取的动态视频返回壁纸工具类。本示例中,壁纸工具类无需跨进程从系统中获取动态视频,可以大大节省获取动态视频的时间。同时,由于广播具有时延,若通过系统扩展类,跨进程从系统中获取动态视频,存在获取到上一次手机采用的动态视频,而不是当前手机采用的动态视频的问题。而本示例中,通过第二广播数据中的第二存储位置,可以准确获取当前手机采用的动态视频,提高获取的动态视频的准确性。The theme service obtains the dynamic wallpaper currently used by the mobile phone based on the second storage location. The theme service returns the acquired dynamic video to the wallpaper tool class. In this example, the wallpaper tool class does not need to obtain dynamic videos from the system across processes, which can greatly save the time of obtaining dynamic videos. At the same time, due to the delay in broadcasting, if dynamic videos are obtained from the system across processes through system extension classes, there is a problem of obtaining the dynamic video used by the last mobile phone instead of the dynamic video used by the current mobile phone. In this example, through the second storage location in the second broadcast data, the dynamic video currently used by the mobile phone can be accurately obtained, thereby improving the accuracy of the obtained dynamic video.
步骤1009:壁纸工具类解码动态视频。Step 1009: The wallpaper tool class decodes the dynamic video.
步骤1010:壁纸工具类获取解码的动态视频中最后一帧图像作为第一图像。Step 1010: The wallpaper tool class obtains the last frame image in the decoded dynamic video as the first image.
步骤1011:壁纸工具类向动态壁纸服务返回第一图像。Step 1011: The wallpaper tool class returns the first image to the dynamic wallpaper service.
步骤1012:动态壁纸服务指示壁纸工具类对第一图像进行压缩处理。Step 1012: The dynamic wallpaper service instructs the wallpaper tool class to compress the first image.
步骤1013:壁纸工具类对第一图像进行图像压缩处理。Step 1013: The wallpaper tool class performs image compression processing on the first image.
步骤1014:壁纸工具类将图像压缩处理后的第一图像返回动态壁纸服务。Step 1014: The wallpaper tool class returns the first image after image compression to the dynamic wallpaper service.
步骤1015:动态壁纸服务指示壁纸工具类对第一图像进行模糊处理。Step 1015: The dynamic wallpaper service instructs the wallpaper tool class to blur the first image.
步骤1016:壁纸工具类对第一图像进行模糊处理。Step 1016: The wallpaper tool class blurs the first image.
步骤1017:壁纸工具类将模糊处理后的第一图像返回动态壁纸服务。Step 1017: The wallpaper tool class returns the blurred first image to the dynamic wallpaper service.
步骤1018:动态壁纸服务将模糊处理后的第一图像作为目标图像。Step 1018: The dynamic wallpaper service uses the blurred first image as the target image.
步骤1019:动态壁纸服务将目标图像返回壁纸管理模块。Step 1019: The dynamic wallpaper service returns the target image to the wallpaper management module.
步骤1020:壁纸管理模块将目标图像返回桌面。Step 1020: The wallpaper management module returns the target image to the desktop.
步骤1021:桌面缓存该目标图像。Step 1021: The desktop caches the target image.
步骤1022:桌面若检测到用户输入的多任务的操作,从缓存中获取目标图像作为多任务界面的背景图像。Step 1022: If the desktop detects a multitasking operation input by the user, obtain the target image from the cache as the background image of the multitasking interface.
步骤1023:该桌面显示该背景图像。Step 1023: The desktop displays the background image.
上述步骤1009至步骤1023可以参照步骤步骤809至步骤823中的相关描述,此处将不再进行赘述。For the above steps 1009 to 1023, reference may be made to the relevant descriptions in steps 809 to 823, which will not be described again here.
图11为示例性示出的更换壁纸且手机采用静态壁纸的情况下,该多任务界面的显示方法中各模块之间的交互图。Figure 11 is an exemplary interaction diagram between modules in the display method of the multi-task interface when the wallpaper is changed and the mobile phone adopts a static wallpaper.
步骤1101:主题服务在检测到更换的操作,则广播第三广播数据。Step 1101: When the theme service detects the replacement operation, it broadcasts the third broadcast data.
具体地,当主题服务加载静态壁纸时,该主题服务可以从系统中获取待显示的静态壁纸。当主题服务检测到用户输入的更换壁纸或者更换主题的操作时,可以获取该手机待显示的静态壁纸所处的第三存储位置,该第三存储位置可以是静态壁纸的URL。该主题服务生成第三广播数据,可以用于指示手机更换了主题/壁纸,且该第三广播数据中包括该第三存储位置。主题服务以广播的形式通知其他模块手机更新了壁纸或主题。Specifically, when the theme service loads a static wallpaper, the theme service can obtain the static wallpaper to be displayed from the system. When the theme service detects the operation of changing the wallpaper or changing the theme input by the user, it can obtain the third storage location where the static wallpaper to be displayed on the mobile phone is located. The third storage location can be the URL of the static wallpaper. The theme service generates third broadcast data, which can be used to indicate that the mobile phone has changed the theme/wallpaper, and the third broadcast data includes the third storage location. The theme service notifies other modules that the mobile phone has updated the wallpaper or theme in the form of broadcast.
步骤1102:桌面响应于第三广播数据,向壁纸管理模块发送壁纸获取请求。Step 1102: In response to the third broadcast data, the desktop sends a wallpaper acquisition request to the wallpaper management module.
步骤1103:壁纸管理模块获取所采用的壁纸的壁纸类型。Step 1103: The wallpaper management module obtains the wallpaper type of the adopted wallpaper.
步骤1104:壁纸管理模块根据壁纸类型,初始化超级壁纸服务,并将超级壁纸服务作为目标服务。Step 1104: The wallpaper management module initializes the super wallpaper service according to the wallpaper type, and uses the super wallpaper service as the target service.
步骤1105:壁纸管理模块向静态壁纸服务请求获取目标图像。Step 1105: The wallpaper management module requests the static wallpaper service to obtain the target image.
步骤1106:静态壁纸服务向壁纸工具类请求获取静态壁纸。Step 1106: The static wallpaper service requests the wallpaper tool class to obtain the static wallpaper.
步骤1107:壁纸工具类向系统扩展类发送访问请求,请求获取静态壁纸。Step 1107: The wallpaper tool class sends an access request to the system extension class, requesting to obtain static wallpaper.
具体地,壁纸工具类向主题服务发送访问请求,该访问请求中包括第三存储位置。Specifically, the wallpaper tool class sends an access request to the theme service, and the access request includes the third storage location.
步骤1108:主题服务向壁纸工具类返回返回静态壁纸。Step 1108: The theme service returns a static wallpaper to the wallpaper tool class.
具体地,该主题服务根据第三存储位置,获取手机当前采用的静态壁纸。该主题服务将获取的静态壁纸返回壁纸工具类。Specifically, the theme service obtains the static wallpaper currently used by the mobile phone according to the third storage location. The theme service returns the obtained static wallpaper to the wallpaper tool class.
步骤1109:壁纸工具类向静态壁纸服务返回静态壁纸。Step 1109: The wallpaper tool class returns the static wallpaper to the static wallpaper service.
步骤1110:静态壁纸服务指示壁纸工具类对第一图像进行压缩处理。Step 1110: The static wallpaper service instructs the wallpaper tool class to compress the first image.
步骤1111:壁纸工具类对第一图像进行图像压缩处理。Step 1111: The wallpaper tool class performs image compression processing on the first image.
步骤1112:壁纸工具类将图像压缩处理后的第一图像返回静态壁纸服务。Step 1112: The wallpaper tool class returns the first image after image compression to the static wallpaper service.
步骤1113:静态壁纸服务指示壁纸工具类对第一图像进行模糊处理。Step 1113: The static wallpaper service instructs the wallpaper tool class to blur the first image.
步骤1114:壁纸工具类对第一图像进行模糊处理。Step 1114: The wallpaper tool class performs blur processing on the first image.
步骤1115:壁纸工具类将模糊处理后的第一图像返回静态壁纸服务。Step 1115: The wallpaper tool class returns the blurred first image to the static wallpaper service.
步骤1116:静态壁纸服务将模糊处理后的第一图像作为目标图像。Step 1116: The static wallpaper service uses the blurred first image as the target image.
步骤1117:静态壁纸服务将目标图像返回壁纸管理模块。Step 1117: The static wallpaper service returns the target image to the wallpaper management module.
步骤1118:壁纸管理模块将目标图像返回桌面。Step 1118: The wallpaper management module returns the target image to the desktop.
步骤1119:桌面缓存该目标图像。Step 1119: The desktop caches the target image.
步骤1120:桌面若检测到用户输入的多任务的操作,从缓存中获取目标图像作为多任务界面的背景图像。Step 1120: If the desktop detects a multitasking operation input by the user, obtain the target image from the cache as the background image of the multitasking interface.
步骤1121:该桌面显示该背景图像。Step 1121: The desktop displays the background image.
上述步骤1109至步骤1121可以参照步骤步骤609至步骤621中的相关描述,此处将不再进行赘述。For the above steps 1109 to 1121, reference may be made to the relevant descriptions in steps 609 to 621, which will not be described again here.
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to implement the above functions, the electronic device includes corresponding hardware and/or software modules that perform each function. In conjunction with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application, but such implementations should not be considered to be beyond the scope of this application.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的多任务界面显示的方法。存储介质包括:U盘、移动硬盘、只读存储器(read onlymemory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。This embodiment also provides a computer storage medium. Computer instructions are stored in the computer storage medium. When the computer instructions are run on an electronic device, the electronic device causes the electronic device to execute the above related method steps to implement the multi-task interface display in the above embodiment. Methods. Storage media include: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的多任务界面显示的方法。This embodiment also provides a computer program product. When the computer program product is run on a computer, it causes the computer to perform the above related steps to implement the multi-task interface display method in the above embodiment.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the electronic equipment, computer storage media, computer program products or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the corresponding methods provided above. The beneficial effects of the method will not be repeated here.
本申请各个实施例的任意内容,以及同一实施例的任意内容,均可以自由组合。对上述内容的任意组合均在本申请的范围之内。Any contents of various embodiments of this application, as well as any contents of the same embodiment, can be freely combined. Any combination of the above is within the scope of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211113844.8ACN116719466B (en) | 2022-09-14 | 2022-09-14 | Multi-task interface display method, electronic device and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211113844.8ACN116719466B (en) | 2022-09-14 | 2022-09-14 | Multi-task interface display method, electronic device and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN116719466Atrue CN116719466A (en) | 2023-09-08 |
| CN116719466B CN116719466B (en) | 2024-04-12 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211113844.8AActiveCN116719466B (en) | 2022-09-14 | 2022-09-14 | Multi-task interface display method, electronic device and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN116719466B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0344082A2 (en)* | 1988-05-23 | 1989-11-29 | International Business Machines Corporation | Method for accessing visually obscured data in a multi-tasking system |
| US20120102428A1 (en)* | 2009-06-19 | 2012-04-26 | Moment Usa, Inc. | Systems and methods for dynamic background user interface(s) |
| CN103927086A (en)* | 2014-04-21 | 2014-07-16 | 深圳市中兴移动通信有限公司 | Wallpaper processing method and system and mobile terminal |
| CN105335216A (en)* | 2014-06-12 | 2016-02-17 | 乐蛙科技(上海)有限公司 | Communication terminal application management method and system |
| US20160048398A1 (en)* | 2014-08-12 | 2016-02-18 | Linkedin Corporation | Enhancing a multitasking user interface of an operating system |
| US20170322680A1 (en)* | 2014-07-30 | 2017-11-09 | Huawei Technologies Co., Ltd. | Method and apparatus for setting background of ui control, and terminal |
| CN109491737A (en)* | 2018-10-24 | 2019-03-19 | 珠海格力电器股份有限公司 | Display method, display device, terminal and readable storage medium |
| CN110826402A (en)* | 2019-09-27 | 2020-02-21 | 深圳市华付信息技术有限公司 | Multi-task-based face quality estimation method |
| CN111158815A (en)* | 2019-12-18 | 2020-05-15 | 努比亚技术有限公司 | Dynamic wallpaper fuzzy method, terminal and computer readable storage medium |
| US20200241746A1 (en)* | 2017-10-23 | 2020-07-30 | Huawei Technologies Co., Ltd. | Multi-task management method and terminal device |
| CN112988296A (en)* | 2021-02-26 | 2021-06-18 | 北京小米移动软件有限公司 | Interface display method and device, terminal equipment and storage medium |
| CN113986408A (en)* | 2020-07-09 | 2022-01-28 | 华为技术有限公司 | Application page display method and electronic equipment |
| WO2022083693A1 (en)* | 2020-10-22 | 2022-04-28 | 华为技术有限公司 | Information display method and related apparatus |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0344082A2 (en)* | 1988-05-23 | 1989-11-29 | International Business Machines Corporation | Method for accessing visually obscured data in a multi-tasking system |
| US20120102428A1 (en)* | 2009-06-19 | 2012-04-26 | Moment Usa, Inc. | Systems and methods for dynamic background user interface(s) |
| CN103927086A (en)* | 2014-04-21 | 2014-07-16 | 深圳市中兴移动通信有限公司 | Wallpaper processing method and system and mobile terminal |
| CN105335216A (en)* | 2014-06-12 | 2016-02-17 | 乐蛙科技(上海)有限公司 | Communication terminal application management method and system |
| US20170322680A1 (en)* | 2014-07-30 | 2017-11-09 | Huawei Technologies Co., Ltd. | Method and apparatus for setting background of ui control, and terminal |
| US20160048398A1 (en)* | 2014-08-12 | 2016-02-18 | Linkedin Corporation | Enhancing a multitasking user interface of an operating system |
| US20200241746A1 (en)* | 2017-10-23 | 2020-07-30 | Huawei Technologies Co., Ltd. | Multi-task management method and terminal device |
| CN109491737A (en)* | 2018-10-24 | 2019-03-19 | 珠海格力电器股份有限公司 | Display method, display device, terminal and readable storage medium |
| CN110826402A (en)* | 2019-09-27 | 2020-02-21 | 深圳市华付信息技术有限公司 | Multi-task-based face quality estimation method |
| CN111158815A (en)* | 2019-12-18 | 2020-05-15 | 努比亚技术有限公司 | Dynamic wallpaper fuzzy method, terminal and computer readable storage medium |
| CN113986408A (en)* | 2020-07-09 | 2022-01-28 | 华为技术有限公司 | Application page display method and electronic equipment |
| WO2022083693A1 (en)* | 2020-10-22 | 2022-04-28 | 华为技术有限公司 | Information display method and related apparatus |
| CN112988296A (en)* | 2021-02-26 | 2021-06-18 | 北京小米移动软件有限公司 | Interface display method and device, terminal equipment and storage medium |
| Title |
|---|
| VIVO: "vivo多任务背景怎么设置", pages 1, Retrieved from the Internet <URL:https://zhidao.baidu.com/question/633248794229929644.html>* |
| Publication number | Publication date |
|---|---|
| CN116719466B (en) | 2024-04-12 |
| Publication | Publication Date | Title |
|---|---|---|
| CN113741840B (en) | Application interface display method under multi-window screen projection scene and electronic equipment | |
| US10310722B2 (en) | Method and electronic device for controlling scroll speed of content | |
| WO2022161119A1 (en) | Display method and electronic device | |
| CN114138139B (en) | Application card management method, electronic device and medium | |
| EP4369176A1 (en) | Display method, apparatus, device, and storage medium | |
| EP3340155A1 (en) | Electronic device and method for displaying web page using the same | |
| CN105808307B (en) | Page display method and device | |
| CN105487640A (en) | Image pre-loading and caching method of Android watch | |
| US11314391B2 (en) | Navigation bar controlling method and terminal | |
| CN105934737A (en) | Electronic device and user interface display method for same | |
| CN113709026A (en) | Method, device, storage medium and program product for processing instant communication message | |
| US9256358B2 (en) | Multiple panel touch user interface navigation | |
| CN113391743B (en) | A display method and electronic device | |
| CN107688498A (en) | Applied program processing method and device, computer equipment, storage medium | |
| CN107491349A (en) | Application program processing method and device, computer equipment, storage medium | |
| WO2024099206A1 (en) | Graphical interface processing method and apparatus | |
| CN111638828A (en) | Interface display method and device | |
| CN116743908B (en) | Wallpaper display method and related device | |
| CN116719466A (en) | Multi-tasking interface display method, electronic device and storage medium | |
| CN117348953A (en) | Display method and related device | |
| CN113900740A (en) | Method and device for loading multiple list data | |
| CN113127101A (en) | Application program control method, device, equipment and medium | |
| CN115033193A (en) | Screen rotation processing method, screen rotation processing device, screen rotation processing medium and electronic equipment | |
| CN117724825B (en) | Interface display method and electronic equipment | |
| CN114595017B (en) | Data display method and device, electronic equipment and computer readable storage medium |
| 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 |