CN115129410B - Desktop wallpaper configuration method, device, electronic device and readable storage medium - Google Patents
Desktop wallpaper configuration method, device, electronic device and readable storage medium Download PDFInfo
- Publication number
- CN115129410B CN115129410B CN202210669583.1A CN202210669583A CN115129410B CN 115129410 B CN115129410 B CN 115129410B CN 202210669583 A CN202210669583 A CN 202210669583A CN 115129410 B CN115129410 B CN 115129410B
- Authority
- CN
- China
- Prior art keywords
- desktop
- control element
- image
- wallpaper
- target area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本申请适用于终端技术领域,提供了一种桌面壁纸配置方法、装置、电子设备及可读存储介质。在本申请的桌面壁纸配置方法中,电子设备在检测到将第一图像设定为桌面壁纸的操作时,通过对第一图像的主体元素进行识别,并确定主体元素在生成桌面预览图时所在的第一位置;通过桌面管理模块基于桌面上各个应用程序控件元素所在的第二位置,确定出桌面上控件元素未遮挡的目标区域,将第一图像进行缩放和移动处理,使得未遮挡的目标区域与第一图像的主体元素的位置相匹配,将第一图像配置为当前桌面的壁纸;从而在配置桌面壁纸时,使得图像中的主体元素自动避开控件元素所在的位置,使得配置桌面壁纸更加简便。
The present application is applicable to the field of terminal technology, and provides a desktop wallpaper configuration method, device, electronic equipment and readable storage medium. In the desktop wallpaper configuration method of the present application, when the electronic device detects the operation of setting the first image as the desktop wallpaper, it identifies the main element of the first image and determines where the main element is when generating the desktop preview image. The desktop management module determines the unoccluded target area of the control element on the desktop based on the second position of each application control element on the desktop through the desktop management module, and zooms and moves the first image so that the unoccluded target The area matches the position of the main element of the first image, and the first image is configured as the wallpaper of the current desktop; thus, when configuring the desktop wallpaper, the main element in the image automatically avoids the position of the control element, so that the configuration of the desktop wallpaper Easier.
Description
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种桌面壁纸配置方法、装置、电子设备及可读存储介质。The present application relates to the technical field of terminals, and in particular to a desktop wallpaper configuration method, device, electronic equipment and readable storage medium.
背景技术Background technique
随着移动通信技术的发展,诸如手机等电子设备越来越普及,给人们的日常生活带来极大的便利。With the development of mobile communication technology, electronic devices such as mobile phones are becoming more and more popular, which brings great convenience to people's daily life.
目前,电子设备的桌面是为用户提供的主屏幕区域,与用户体验息息相关。电子设备的桌面上通常为用户提供了壁纸的展示以及各种控件元素的展示;用户可以选择将不同的图片设置为桌面的壁纸。Currently, the desktop of an electronic device is a main screen area provided for a user, and is closely related to user experience. The desktop of the electronic device usually provides the display of wallpapers and various control elements for the user; the user can choose to set different pictures as the wallpaper of the desktop.
然而,在大多数情况下,桌面需同时显示壁纸和多个控件元素,控件元素会对桌面壁纸进行部分遮挡,需通过手动进行调整等,从而使得壁纸配置过程操作繁琐。However, in most cases, the desktop needs to display the wallpaper and multiple control elements at the same time, and the control elements will partially cover the desktop wallpaper and need to be adjusted manually, which makes the wallpaper configuration process cumbersome.
发明内容Contents of the invention
本申请提供一种桌面壁纸配置方法、装置、电子设备及可读存储介质,解决了现有技术中桌面壁纸配置过程中操作繁琐的问题。The present application provides a desktop wallpaper configuration method, device, electronic equipment and readable storage medium, which solves the problem of cumbersome operations in the desktop wallpaper configuration process in the prior art.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above object, the application adopts the following technical solutions:
第一方面,提供一种桌面壁纸配置方法,该方法可以包括:In a first aspect, a method for configuring a desktop wallpaper is provided, and the method may include:
响应于用户将第一图像设定为桌面壁纸的操作,电子设备识别该第一图像中的主体元素以及该主体元素对应在桌面的第一位置;电子设备获取桌面上控件元素的第二位置,并根据第二位置确定在桌面上控件元素未遮挡的目标区域;电子设备根据第一位置和目标区域,将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸。In response to the user's operation of setting the first image as the desktop wallpaper, the electronic device identifies the main element in the first image and the main element corresponds to the first position on the desktop; the electronic device obtains the second position of the control element on the desktop, And determine the target area on the desktop where the control element is not blocked according to the second position; the electronic device scales or moves the first image according to the first position and the target area, and configures it as a desktop wallpaper whose main element is located in the target area.
示例性的,电子设备解锁后的桌面上可以包括多个应用程序的控件元素,每个应用程序的控件元素在桌面上显示时,会遮挡桌面壁纸的部分区域,影响桌面壁纸主体元素部分的显示。Exemplarily, the unlocked desktop of the electronic device may include control elements of multiple applications. When the control elements of each application are displayed on the desktop, it will block a part of the desktop wallpaper and affect the display of the main elements of the desktop wallpaper. .
通过上述方式,电子设备在检测到将第一图像设定为桌面壁纸的操作时,可以通过对第一图像的主体元素进行识别,并确定主体元素在生成桌面预览图时所在的第一位置;通过桌面管理模块基于桌面上各个应用程序控件元素所在的第二位置,确定出桌面上控件元素未遮挡的目标区域,将第一图像进行缩放和移动处理,使得未遮挡的目标区域与第一图像的主体元素的位置相匹配,将第一图像配置为当前桌面的壁纸;从而在设置桌面壁纸时,可以使得图像中的主体元素自动避开控件元素所在的位置,无需用户一一手动调整相应的控件元素的位置或者在生成桌面预览图后手动移动图像位置等操作,使得配置桌面壁纸更加简便,桌面壁纸显示更加符合用户要求,用户体验更好;具有较强的易用性与实用性。Through the above method, when the electronic device detects the operation of setting the first image as the desktop wallpaper, it can identify the main element of the first image and determine the first position of the main element when generating the desktop preview image; Based on the second position of each application control element on the desktop, the desktop management module determines the unoccluded target area of the control element on the desktop, zooms and moves the first image, so that the unoccluded target area is consistent with the first image The position of the main element of the image matches the position of the main element, and the first image is configured as the wallpaper of the current desktop; thus, when setting the desktop wallpaper, the main element in the image can automatically avoid the position of the control element, and the user does not need to manually adjust the corresponding one by one. The position of the control elements or the operation of manually moving the image position after generating the desktop preview image make it easier to configure the desktop wallpaper, the desktop wallpaper display is more in line with user requirements, and the user experience is better; it has strong usability and practicality.
示例性的,对应设置桌面壁纸的桌面可以是多个桌面,所确定的桌面上的目标区域可以是多个桌面的共同对应的控件元素未遮挡的区域,还可以是每个桌面各自分别对应的控件元素未遮挡的区域。Exemplarily, the desktop on which the desktop wallpaper is correspondingly set may be multiple desktops, and the determined target area on the desktop may be the unblocked area of the common corresponding control elements of the multiple desktops, or may be the area corresponding to each desktop respectively. The unoccluded area of the control element.
示例性的,上述桌面上的控件元素可以包括应用程序图标、小部件widget或者文件夹等。第一图像的主体元素可以为画面中的人像、物像等元素。Exemplarily, the aforementioned control elements on the desktop may include application program icons, widgets or folders. The main elements of the first image may be elements such as portraits and objects in the picture.
在第一方面的一种可能的实现方式中,桌面包括主页面和第二屏,第二屏为除主页面以外的其他桌面显示页面;In a possible implementation manner of the first aspect, the desktop includes a main page and a second screen, and the second screen displays pages on other desktops except the main page;
获取桌面上控件元素的第二位置,并根据第二位置确定在桌面上控件元素未遮挡的目标区域,包括:Obtain the second position of the control element on the desktop, and determine the unoccluded target area of the control element on the desktop according to the second position, including:
获取主页面上控件元素的第二位置,并根据主页面上控件元素的第二位置确定在主页面上控件元素未遮挡的第一目标子区域;获取第二屏上控件元素的第二位置,并根据第二屏上控件元素的第二位置确定在第二屏上控件元素未遮挡的第二目标子区域;将第一目标子区域与第二目标子区域的公共区域作为目标区域。Get the second position of the control element on the main page, and determine the first target sub-area that is not blocked by the control element on the main page according to the second position of the control element on the main page; get the second position of the control element on the second screen, And according to the second position of the control element on the second screen, determine the second target sub-area that is not blocked by the control element on the second screen; use the common area between the first target sub-area and the second target sub-area as the target area.
在第一方面的一种可能的实现方式中,将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸,包括:In a possible implementation manner of the first aspect, zooming or moving the first image and configuring it as a desktop wallpaper whose main element is located in the target area includes:
将第一图像进行缩放或移动处理,配置为主体元素位于第一目标子区域与第二目标子区域的公共区域内的桌面壁纸。The first image is zoomed or moved, and configured as a desktop wallpaper whose main element is located in the common area of the first target sub-area and the second target sub-area.
示例性的,当电子设备具备多个桌面显示页面时,在不同的桌面显示页面均包括控件元素,例如应用程序图标等;因此需要确定控件元素在不同的桌面显示页面上分别对应的位置,从而计算得到各个桌面显示页面上的未遮挡区域,最后确定出各个桌面显示页面的未遮挡区域的公共区域,将桌面壁纸的主体元素在该公共区域内显示。Exemplarily, when the electronic device has multiple desktop display pages, the different desktop display pages include control elements, such as application program icons, etc.; therefore, it is necessary to determine the corresponding positions of the control elements on different desktop display pages, so that The unblocked area on each desktop display page is calculated, and finally the common area of the unblocked area of each desktop display page is determined, and the main elements of the desktop wallpaper are displayed in the common area.
从而在电子设备接收到切换桌面的滑动指令时,切换后的桌面显示页面上的图标依然不会遮挡壁纸的主体元素部分,使得配置的桌面壁纸可以适配于多个桌面显示页面的显示状态,使得壁纸配置更加智能与贴切,实用与适用性更强,大大提升了用户的使用体验感。Therefore, when the electronic device receives a sliding command to switch the desktop, the icons on the switched desktop display page will still not block the main element part of the wallpaper, so that the configured desktop wallpaper can be adapted to the display status of multiple desktop display pages, It makes the wallpaper configuration more intelligent and appropriate, more practical and applicable, and greatly improves the user experience.
在第一方面的一种可能的实现方式中,桌面包括主页面和第二屏,第二屏为除主页面以外的其他桌面显示页面;目标区域包括第一区域或第二区域;获取桌面上控件元素的第二位置,并根据第二位置确定在桌面上控件元素未遮挡的目标区域,包括:In a possible implementation manner of the first aspect, the desktop includes a main page and a second screen, and the second screen is a desktop display page other than the main page; the target area includes the first area or the second area; The second position of the control element, and determine the unoccluded target area of the control element on the desktop according to the second position, including:
获取主页面上控件元素的第二位置,并根据主页面上控件元素的第二位置确定在主页面上控件元素未遮挡的第一区域;获取第二屏上控件元素的第二位置,并根据第二屏上控件元素的第二位置确定在第二屏上控件元素未遮挡的第二区域。Obtain the second position of the control element on the main screen, and determine the first unoccluded area of the control element on the main screen according to the second position of the control element on the main screen; obtain the second position of the control element on the second screen, and determine according to the second position of the control element on the main screen The second position of the control element on the second screen determines a second area not covered by the control element on the second screen.
在第一方面的一种可能的实现方式中,根据第一位置和目标区域,将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸,包括:In a possible implementation manner of the first aspect, the first image is zoomed or moved according to the first position and the target area, and configured as a desktop wallpaper whose main element is located in the target area, including:
根据第一位置和第一区域,将第一图像进行缩放或移动处理,配置为主体元素位于第一区域内的主页面的桌面壁纸;根据第一位置和第二区域,将第一图像进行缩放或移动处理,配置为主体元素位于第二区域内的第二屏的桌面壁纸。According to the first position and the first area, the first image is scaled or moved, and configured as the desktop wallpaper of the main page where the main element is located in the first area; according to the first position and the second area, the first image is scaled Or mobile processing, configured as the desktop wallpaper of the second screen where the main element is located in the second area.
在第一方面的一种可能的实现方式中,在将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸之后,该方法还包括:In a possible implementation of the first aspect, after zooming or moving the first image and configuring it as a desktop wallpaper whose main element is located in the target area, the method further includes:
响应于用户从主页面切换至第二屏的桌面切换操作,将主页面对应的桌面壁纸切换为第二屏对应的桌面壁纸;响应于用户从第二屏切换至主页面的桌面切换操作,将第二屏对应的桌面壁纸切换为主页面对应的桌面壁纸。In response to the desktop switching operation of the user switching from the main page to the second screen, the desktop wallpaper corresponding to the main page is switched to the desktop wallpaper corresponding to the second screen; in response to the desktop switching operation of the user switching from the second screen to the main page, Switch the desktop wallpaper corresponding to the second screen to the desktop wallpaper corresponding to the main page.
示例性的,当电子设备具有多个桌面显示页面时,不同的桌面显示页面上的控件元素的布局可能不同,因此还可以基于不同的桌面显示页面,配置以相应的壁纸,使得在切换不同的桌面显示页面时,可以动态的适配于每一个桌面显示页面,使得每个桌面显示页面的壁纸均可以在控件元素未遮挡区域显示壁纸的主体元素。Exemplarily, when the electronic device has multiple desktop display pages, the layout of the control elements on different desktop display pages may be different, so it is also possible to configure corresponding wallpapers based on different desktop display pages, so that when switching between different When the desktop displays pages, it can be dynamically adapted to each desktop display page, so that the wallpaper of each desktop display page can display the main elements of the wallpaper in the unblocked area of the control elements.
从而基于动态的适配,增加壁纸配置的位置多样性,实现桌面壁纸在配置过程中的自动移动及适配,使得壁纸配置的操作过程更加简便、智能以及配置的效率更高,无需用户手动操作,配置过程更加简单,提高用户体验以及桌面壁纸的视觉效果。Therefore, based on dynamic adaptation, the location diversity of wallpaper configuration is increased, and the automatic movement and adaptation of desktop wallpaper in the configuration process is realized, making the operation process of wallpaper configuration easier, smarter and more efficient, without manual operation by the user , the configuration process is simpler, and the user experience and the visual effect of the desktop wallpaper are improved.
在第一方面的一种可能的实现方式中,在将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸之后,该方法还包括:In a possible implementation of the first aspect, after zooming or moving the first image and configuring it as a desktop wallpaper whose main element is located in the target area, the method further includes:
在检测到用户移动桌面上控件元素的操作时,获取桌面上控件元素移动后的第三位置,并根据第三位置确定桌面上控件元素移动后未遮挡的目标区域;将移动前的桌面壁纸调整为主体元素位于移动后未遮挡的目标区域内的桌面壁纸。When detecting the operation of the user moving the control element on the desktop, obtain the third position of the control element on the desktop after the movement, and determine the unoccluded target area after the control element on the desktop is moved according to the third position; adjust the desktop wallpaper before the movement A desktop wallpaper whose main element is within the unobstructed target area after the move.
在第一方面的一种可能的实现方式中,在将所述第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸之后,该方法还包括:In a possible implementation manner of the first aspect, after zooming or moving the first image and configuring it as a desktop wallpaper whose main element is located in the target area, the method further includes:
在检测到用户删除桌面上控件元素的操作时,获取桌面上剩余控件元素的第四位置,并根据第四位置确定桌面上剩余控件元素未遮挡的目标区域;将删除前的桌面壁纸调整为主体元素位于删除后的未遮挡的目标区域内的桌面壁纸。When detecting the user's operation to delete control elements on the desktop, obtain the fourth position of the remaining control elements on the desktop, and determine the unoccluded target area of the remaining control elements on the desktop according to the fourth position; adjust the desktop wallpaper before deletion as the main body Desktop wallpaper with elements located within the unoccluded target area after removal.
在第一方面的一种可能的实现方式中,在将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸之后,方法还包括:In a possible implementation manner of the first aspect, after zooming or moving the first image and configuring it as a desktop wallpaper whose main element is located in the target area, the method further includes:
在检测到用户下载新的桌面上控件元素的操作时,获取下载后桌面上控件元素的第五位置,并根据第五位置确定下载后桌面上控件元素未遮挡的目标区域;将下载前的桌面壁纸调整为主体元素位于下载后的未遮挡的目标区域内的桌面壁纸。When detecting the user's operation of downloading a new control element on the desktop, obtain the fifth position of the control element on the desktop after downloading, and determine the unoccluded target area of the control element on the desktop after downloading according to the fifth position; the desktop before downloading The wallpaper is adjusted to the desktop wallpaper whose main element is located in the downloaded unoccluded target area.
示例性的,当电子设备检测到桌面上的控件元素被移动、删除或者下载到新的控件元素时,例如下载新的应用程序图标,电子设备还可以识别桌面上控件元素布局的变化,获取布局变化后桌面上控件元素的位置信息,并基于桌面上控件元素布局变化后的位置信息自动调整该桌面对应的壁纸的大小及位置,使得壁纸的主体元素在桌面布局变化后未遮挡的目标区域进行显示;从而在桌面布局发生变化时可以继续优化桌面壁纸的适配度,使得桌面壁纸更加适配桌面布局的显示,使桌面壁纸配置操作也更加简便,壁纸的显示方式也更加多样化。Exemplarily, when the electronic device detects that a control element on the desktop is moved, deleted, or downloaded to a new control element, such as downloading a new application icon, the electronic device can also recognize the change in the layout of the control element on the desktop, and obtain the layout The position information of the control elements on the desktop after the change, and automatically adjust the size and position of the wallpaper corresponding to the desktop based on the position information of the control element layout changes on the desktop, so that the main elements of the wallpaper are displayed in the target area that is not blocked after the desktop layout changes. In this way, when the desktop layout changes, the adaptability of the desktop wallpaper can be continuously optimized, so that the desktop wallpaper is more suitable for the display of the desktop layout, the configuration operation of the desktop wallpaper is also easier, and the display methods of the wallpaper are more diversified.
在第一方面的一种可能的实现方式中,该方法还包括:In a possible implementation manner of the first aspect, the method further includes:
在响应于用户将第一图像设定为桌面壁纸的操作之前,生成第一图像的桌面预览图;响应于用户将第一图像的桌面预览图设定为桌面壁纸的操作,确定第一图像的应用范围;基于该应用范围,获取与应用范围对应的桌面上控件元素的第二位置。Before responding to the user setting the first image as the desktop wallpaper, generate a desktop preview of the first image; in response to the user setting the desktop preview of the first image as the desktop wallpaper, determine the first image An application scope; based on the application scope, the second position of the control element on the desktop corresponding to the application scope is acquired.
示例性的,该应用范围可以包括第一应用范围和第二应用范围;其中,第一应用范围用于指示第一图像被配置的属性,例如“设为锁屏”、“设为桌面”以及“同时设置”等属性;第二应用范围用于指示第一图像被配置的目标桌面显示页面。Exemplarily, the application scope may include a first application scope and a second application scope; wherein, the first application scope is used to indicate the configured attributes of the first image, such as "set as lock screen", "set as desktop" and Attributes such as "simultaneously set"; the second application range is used to indicate the target desktop display page where the first image is configured.
示例性的,当电子设备包括多个桌面显示页面时,该第二应用范围可以为多个桌面显示页面中的至少一个页面,例如主页面或第二屏对应的桌面显示页面;所设定的桌面壁纸的应用范围可以是其中的一个或多个页面也可以是所有页面。Exemplarily, when the electronic device includes a plurality of desktop display pages, the second application range may be at least one of the plurality of desktop display pages, such as the main page or the desktop display page corresponding to the second screen; the set The application range of the desktop wallpaper can be one or more pages or all pages.
示例性的,电子设备还可以使用不同的图像分别对应设置为不同桌面显示页面的壁纸,并基于不同桌面显示页面中控件元素未遮挡的目标区域,将相应的图像进行缩放或移动处理,使得各图像中的主体元素分别位于各自对应的桌面显示页面的控件元素未遮挡区域内。例如,可以将一个系列的多张图像分别设置为多个桌面显示页面的壁纸。Exemplarily, the electronic device can also use different images to correspond to the wallpapers set as different desktop display pages, and based on the unoccluded target areas of the control elements in different desktop display pages, zoom or move the corresponding images, so that each The main elements in the image are respectively located in the unoccluded areas of the control elements of the corresponding desktop display pages. For example, multiple images from a series can be set as wallpapers for multiple desktop display pages respectively.
从而在检测到用户切换桌面的滑动操作时,可以基于不同的桌面显示页面显示一个系列的不同效果及类型的壁纸,使得壁纸配置更加多样化,壁纸显示效果更好,用户的体验感也更好。Therefore, when the sliding operation of the user to switch the desktop is detected, a series of wallpapers with different effects and types can be displayed based on different desktop display pages, so that the wallpaper configuration is more diversified, the wallpaper display effect is better, and the user experience is also better. .
在第一方面的一种可能的实现方式中,识别第一图像中的主体元素包括:In a possible implementation manner of the first aspect, identifying the subject element in the first image includes:
对第一图像进行目标检测、特征提取以及分类识别处理,确定第一图像中的主体元素。Target detection, feature extraction, and classification and recognition processing are performed on the first image to determine the main body element in the first image.
示例性的,电子设备可以通过神经网络对第一图像中的目标进行检测及特征提取,然后基于类别的识别与对比处理,确定第一图像中的主体元素的类型与位置。Exemplarily, the electronic device may detect and extract features of the target in the first image through a neural network, and then determine the type and position of the subject element in the first image based on category recognition and comparison processing.
第二方面,提供一种桌面壁纸配置装置,该装置包括:In a second aspect, a desktop wallpaper configuration device is provided, the device comprising:
识别单元,用于响应于用户将第一图像设定为桌面壁纸的操作,识别所述第一图像中的主体元素以及所述主体元素对应在所述桌面的第一位置;An identifying unit, configured to identify the main element in the first image and the corresponding first position of the main element on the desktop in response to the user's operation of setting the first image as the desktop wallpaper;
获取单元,用于获取所述桌面上控件元素的第二位置,并根据所述第二位置确定在所述桌面上控件元素未遮挡的目标区域;An acquisition unit, configured to acquire a second position of the control element on the desktop, and determine an unoccluded target area of the control element on the desktop according to the second position;
配置单元,用于根据所述第一位置和所述目标区域,将所述第一图像进行缩放或移动处理,配置为所述主体元素位于所述目标区域内的桌面壁纸。A configuring unit, configured to scale or move the first image according to the first position and the target area, and configure it as a desktop wallpaper in which the main element is located in the target area.
在第二方面的一种可能的实现方式中,所述桌面包括主页面和第二屏,所述第二屏为除所述主页面以外的其他桌面显示页面。In a possible implementation manner of the second aspect, the desktop includes a main page and a second screen, and the second screen displays pages for desktops other than the main page.
所述获取单元,还用于获取所述主页面上控件元素的第二位置,并根据所述主页面上控件元素的第二位置确定在所述主页面上控件元素未遮挡的第一目标子区域;获取所述第二屏上控件元素的第二位置,并根据所述第二屏上控件元素的第二位置确定在所述第二屏上控件元素未遮挡的第二目标子区域;将所述第一目标子区域与所述第二目标子区域的公共区域作为所述目标区域。The acquiring unit is further configured to acquire the second position of the control element on the main page, and determine the first target child that is not blocked by the control element on the main page according to the second position of the control element on the main page area; acquire the second position of the control element on the second screen, and determine a second target sub-area that is not blocked by the control element on the second screen according to the second position of the control element on the second screen; A common area between the first target sub-area and the second target sub-area is used as the target area.
在第二方面的一种可能的实现方式中,所述配置单元,还用于将所述第一图像进行缩放或移动处理,配置为所述主体元素位于所述第一目标子区域与所述第二目标子区域的公共区域内的桌面壁纸。In a possible implementation manner of the second aspect, the configuring unit is further configured to zoom or move the first image, and configure the subject element to be located between the first target sub-area and the Desktop wallpaper in the public area of the second target sub-area.
在第二方面的一种可能的实现方式中,所述桌面包括主页面和第二屏,所述第二屏为除所述主页面以外的其他桌面显示页面;所述目标区域包括第一区域或第二区域。In a possible implementation manner of the second aspect, the desktop includes a main page and a second screen, and the second screen is a desktop display page other than the main page; the target area includes the first area or the second area.
所述获取单元,还用于获取所述主页面上控件元素的第二位置,并根据所述主页面上控件元素的第二位置确定在所述主页面上控件元素未遮挡的所述第一区域;获取所述第二屏上控件元素的第二位置,并根据所述第二屏上控件元素的第二位置确定在所述第二屏上控件元素未遮挡的所述第二区域。The acquisition unit is further configured to acquire the second position of the control element on the main page, and determine the first position of the control element on the main page that is not blocked by the control element according to the second position of the control element on the main page. Area: Acquire a second position of the control element on the second screen, and determine the second area that is not blocked by the control element on the second screen according to the second position of the control element on the second screen.
在第二方面的一种可能的实现方式中,所述配置单元,还用于根据所述第一位置和所述第一区域,将所述第一图像进行缩放或移动处理,配置为所述主体元素位于所述第一区域内的所述主页面的桌面壁纸;根据所述第一位置和所述第二区域,将所述第一图像进行缩放或移动处理,配置为所述主体元素位于所述第二区域内的所述第二屏的桌面壁纸。In a possible implementation manner of the second aspect, the configuring unit is further configured to zoom or move the first image according to the first position and the first area, and configure the The desktop wallpaper of the main page where the main element is located in the first area; according to the first position and the second area, the first image is zoomed or moved, and configured so that the main element is located The desktop wallpaper of the second screen in the second area.
在第二方面的一种可能的实现方式中,该装置还包括:In a possible implementation manner of the second aspect, the device further includes:
壁纸切换单元,用于响应于用户从所述主页面切换至所述第二屏的桌面切换操作,将所述主页面对应的桌面壁纸切换为所述第二屏对应的桌面壁纸;响应于用户从所述第二屏切换至所述主页面的桌面切换操作,将所述第二屏对应的桌面壁纸切换为所述主页面对应的桌面壁纸。A wallpaper switching unit, configured to switch the desktop wallpaper corresponding to the main page to the desktop wallpaper corresponding to the second screen in response to the user switching the desktop from the main page to the second screen; in response The desktop switching operation performed by the user to switch from the second screen to the main page switches the desktop wallpaper corresponding to the second screen to the desktop wallpaper corresponding to the main page.
在第二方面的一种可能的实现方式中,所述配置单元,还用于在检测到用户移动所述桌面上控件元素的操作时,获取所述桌面上控件元素移动后的第三位置,并根据所述第三位置确定所述桌面上控件元素移动后未遮挡的目标区域;将移动前的桌面壁纸调整为主体元素位于移动后未遮挡的目标区域内的桌面壁纸。In a possible implementation manner of the second aspect, the configuration unit is further configured to obtain a third position of the control element on the desktop after the movement of the control element on the desktop when an operation of moving the control element on the desktop by the user is detected, And determine the unoccluded target area of the control element on the desktop according to the third position; adjust the desktop wallpaper before the movement to the desktop wallpaper with the main element located in the unoccluded target area after the movement.
在第二方面的一种可能的实现方式中,所述配置单元,还用于在检测到用户删除所述桌面上控件元素的操作时,获取所述桌面上剩余控件元素的第四位置,并根据所述第四位置确定所述桌面上剩余控件元素未遮挡的目标区域;将删除前的桌面壁纸调整为主体元素位于删除后的未遮挡的目标区域内的桌面壁纸。In a possible implementation manner of the second aspect, the configuration unit is further configured to obtain the fourth position of the remaining control elements on the desktop when detecting the operation of deleting the control elements on the desktop by the user, and Determine the unoccluded target area of the remaining control elements on the desktop according to the fourth position; adjust the desktop wallpaper before deletion to the desktop wallpaper whose main element is located in the unoccluded target area after deletion.
在第二方面的一种可能的实现方式中,所述配置单元,还用于在检测到用户下载新的所述桌面上控件元素的操作时,获取下载后所述桌面上控件元素的第五位置,并根据所述第五位置确定下载后所述桌面上控件元素未遮挡的目标区域;将下载前的桌面壁纸调整为主体元素位于下载后的未遮挡的目标区域内的桌面壁纸。In a possible implementation manner of the second aspect, the configuration unit is further configured to, when detecting the user's operation of downloading a new control element on the desktop, obtain the fifth downloaded control element on the desktop. position, and determine the unblocked target area of the control element on the desktop after downloading according to the fifth position; adjust the desktop wallpaper before downloading to the desktop wallpaper whose main element is located in the unblocked target area after downloading.
在第二方面的一种可能的实现方式中,该装置还包括:In a possible implementation manner of the second aspect, the device further includes:
生成预览单元,用于在响应于用户将第一图像设定为桌面壁纸的操作之前,生成所述第一图像的桌面预览图;generating a preview unit, configured to generate a desktop preview image of the first image before responding to the user's operation of setting the first image as the desktop wallpaper;
应用范围确定单元,用于响应于用户将所述第一图像的所述桌面预览图设定为桌面壁纸的操作,确定所述第一图像的应用范围;An application range determining unit, configured to determine the application range of the first image in response to the user's operation of setting the desktop preview image of the first image as the desktop wallpaper;
所述获取单元,还用于基于所述应用范围,获取与所述应用范围对应的所述桌面上控件元素的所述第二位置。The obtaining unit is further configured to obtain, based on the application range, the second position of the control element on the desktop corresponding to the application range.
在第二方面的一种可能的实现方式中,该识别单元还用于对所述第一图像进行目标检测、特征提取以及分类识别处理,确定所述第一图像中的所述主体元素。In a possible implementation manner of the second aspect, the identification unit is further configured to perform target detection, feature extraction, and classification and identification processing on the first image to determine the subject element in the first image.
本申请实施例的第三方面提供了一种电子设备,所述电子设备包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第一方面中任一项所述方法的步骤。The third aspect of the embodiments of the present application provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program that can run on the processor, and the processor executes the The computer program implements the steps of the method described in any one of the above first aspects.
本申请实施例的第四方面提供了一种计算机可读存储介质,包括:存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面中任一项所述方法的步骤。A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, including: a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any one of the above-mentioned first aspects are implemented.
本申请实施例的第五方面提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面中任一项所述方法。A fifth aspect of the embodiments of the present application provides a computer program product, which, when the computer program product is run on a terminal device, causes the terminal device to execute the method described in any one of the foregoing first aspects.
可以理解的是,上述第二方面至第五方面的有益效果可以参见第一方面中的相关描述,在此不再赘述。It can be understood that, for the beneficial effects of the above-mentioned second aspect to the fifth aspect, reference may be made to relevant descriptions in the first aspect, and details are not repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种电子设备的系统架构图;FIG. 1 is a system architecture diagram of an electronic device provided in an embodiment of the present application;
图2为本申请实施例提供的一种软件架构的示意图;FIG. 2 is a schematic diagram of a software architecture provided by an embodiment of the present application;
图3为本申请实施例提供的一种桌面壁纸配置方法的流程示意图;FIG. 3 is a schematic flowchart of a method for configuring a desktop wallpaper provided in an embodiment of the present application;
图4为本申请实施例提供的一种桌面壁纸配置过程的界面示意图;FIG. 4 is a schematic interface diagram of a desktop wallpaper configuration process provided by an embodiment of the present application;
图5为本申请实施例提供的另一种桌面壁纸配置过程的界面示意图;FIG. 5 is a schematic interface diagram of another desktop wallpaper configuration process provided by the embodiment of the present application;
图6为本申请实施例提供的公共目标区域的界面示意图;FIG. 6 is a schematic diagram of the interface of the public target area provided by the embodiment of the present application;
图7为本申请实施例提供的各个桌面的目标区域的界面示意图;FIG. 7 is a schematic diagram of the interface of the target area of each desktop provided by the embodiment of the present application;
图8为本申请实施例提供的移动控件元素时的界面示意图;FIG. 8 is a schematic diagram of an interface when moving a control element provided by an embodiment of the present application;
图9为本申请实施例提供的删除控件元素时的界面示意图;FIG. 9 is a schematic diagram of an interface when deleting a control element provided by the embodiment of the present application;
图10为本申请实施例提供的下载控件元素时的界面示意图;FIG. 10 is a schematic diagram of an interface when downloading control elements provided by the embodiment of the present application;
图11为本申请实施例提供的配置系列桌面壁纸的界面示意图;FIG. 11 is a schematic diagram of an interface for configuring a series of desktop wallpapers provided by an embodiment of the present application;
图12为本申请实施例提供的一种桌面壁纸配置装置的结构示意图。FIG. 12 is a schematic structural diagram of a device for configuring desktop wallpapers provided by an embodiment of the present application.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions described in this application, specific examples are used below to illustrate.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and/or components, but does not exclude one or more other features. , whole, step, operation, element, component and/or the presence or addition of a collection thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terminology used in the specification of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural referents unless the context clearly dictates otherwise.
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should be further understood that the term "and/or" used in the description of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations .
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be construed as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context . Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be construed, depending on the context, to mean "once determined" or "in response to the determination" or "once detected [the described condition or event] ]” or “in response to detection of [described condition or event]”.
目前,电子设备的主屏幕区域的桌面上可以布局各种控件元素,例如应用程序的图标以及小部件等。在设置桌面壁纸时,桌面上布局的各种控件元素会对壁纸进行部分遮挡,从而影响壁纸的显示效果,需要用户进一步手动移动桌面上控件元素等操作,改变桌面上的布局;或者需要反复设置测试,才能使桌面壁纸的显示更加适配桌面上布局。因此,桌面壁纸的配置过程繁琐且用户体验不好。Currently, various control elements, such as application icons and widgets, can be laid out on the desktop of the main screen area of the electronic device. When setting the desktop wallpaper, various control elements on the desktop layout will partially block the wallpaper, thus affecting the display effect of the wallpaper, requiring the user to further manually move the control elements on the desktop to change the layout on the desktop; or need to repeatedly set Only by testing can the display of the desktop wallpaper be more suitable for the layout on the desktop. Therefore, the configuration process of the desktop wallpaper is cumbersome and the user experience is not good.
针对上述缺陷,本申请提供了一种桌面壁纸配置方法,可以提高桌面壁纸配置的效率,使得桌面壁纸配置过程简便易操作,壁纸的显示效果也更好,并且可以很好的提高用户体验。In view of the above defects, the present application provides a desktop wallpaper configuration method, which can improve the efficiency of desktop wallpaper configuration, make the desktop wallpaper configuration process simple and easy to operate, and the display effect of the wallpaper is also better, and can well improve user experience.
下面介绍本申请实施例所涉及的电子设备的硬件结构。The following describes the hardware structure of the electronic device involved in the embodiment of the present application.
图1示出了电子设备100的结构示意图。FIG. 1 shows a schematic structural diagram of an electronic device 100 .
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments,
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments,
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments,
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A,
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light emitting diode). AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (complementary metal-oxide-semiconductor, CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association ofthe USA,CTIA)标准接口。The
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may be comprised of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used for sensing ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The
基于上述电子设备100的硬件结构,本申请实施例还提供了电子设备的软件架构,下面本申请实施例进一步介绍软件架构。Based on the above hardware structure of the electronic device 100, the embodiment of the present application further provides a software architecture of the electronic device, and the following embodiment of the present application further introduces the software architecture.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
图2是本申请实施例的电子设备100的软件结构框图。FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
请参阅图2,安卓操作系统的系统架构可以包括应用(Application,APP)层、框架(Framework)层、本地(Native)层、核心(Kernel)层、硬件(Hardware)层。Referring to FIG. 2, the system architecture of the Android operating system may include an application (Application, APP) layer, a framework (Framework) layer, a local (Native) layer, a core (Kernel) layer, and a hardware (Hardware) layer.
应用层可以包括至少一个应用程序(Application),应用程序可以是系统应用程序,也可以是第三方的应用程序;例如图库,桌面管理模块launcher,相机,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。The application layer can include at least one application (Application), which can be a system application or a third-party application; such as a gallery, a desktop management module launcher, a camera, a calendar, a call, a map, a navigation, a WLAN, a Bluetooth , music, video, SMS and other applications.
在Framework层设置有窗口管理服务(Window Manager Service,WMS)模块、活动管理服务(Activity Manager Service,AMS)模块、窗口适配服务(Display ManagerSrevice,DMS)模块以及输入管理(Input Manager)模块。The Framework layer is provided with a window management service (Window Manager Service, WMS) module, an activity management service (Activity Manager Service, AMS) module, a window adaptation service (Display Manager Service, DMS) module and an input management (Input Manager) module.
WMS模块负责为应用程序分配窗口(surface)以及管理surface的属性(例如surface的大小、显示位置、显示区域以及隐藏区域)。The WMS module is responsible for allocating a window (surface) for the application program and managing properties of the surface (such as the size, display position, display area and hidden area of the surface).
AMS模块负责管理应用程序的生命周期以及处理事项。The AMS module is responsible for managing the life cycle of the application and processing transactions.
DMS模块负责管理系统当前显示屏的屏幕显示状态。The DMS module is responsible for managing the screen display status of the current display screen of the system.
InputManager模块负责传递数据。The InputManager module is responsible for passing data.
在Native层设置有硬件图形制作器(Hardware composer,HWC)以及送显通道(Display)。The Native layer is provided with a hardware graphics maker (Hardware composer, HWC) and a display channel (Display).
硬件图形制作器负责将屏幕显示数据上屏显示;硬件图形制作器还可以为安卓系统中进行窗口合成和显示的硬件抽象层(HardwareAbstraction Layer,HAL)模块。The hardware graphics maker is responsible for displaying the screen display data on the screen; the hardware graphics maker can also be a hardware abstraction layer (Hardware Abstraction Layer, HAL) module for window composition and display in the Android system.
Display负责传递配置的桌面壁纸对应的屏幕显示数据。Display is responsible for transmitting the screen display data corresponding to the configured desktop wallpaper.
在Kernel层设置有传感器驱动(SensorDriver)模块。A sensor driver (SensorDriver) module is provided at the Kernel layer.
SensorDriver模块负责接收和传递传感器采集的传感器数据,例如触摸传感器采集用户输入的触摸信号,该触摸信号用于指示桌面管理模块基于该触摸信号生成相应的壁纸配置事件的触发信息,该触发信息用于指示图库对相应的桌面壁纸的显示状态基于桌面上的控件元素及用户输入的触摸信号进行调整。The SensorDriver module is responsible for receiving and transmitting the sensor data collected by the sensor, for example, the touch sensor collects the touch signal input by the user, and the touch signal is used to instruct the desktop management module to generate the trigger information of the corresponding wallpaper configuration event based on the touch signal, and the trigger information is used for The gallery is instructed to adjust the display state of the corresponding desktop wallpaper based on the control elements on the desktop and the touch signal input by the user.
在Hardware层设置有显示屏(Screen)和触摸传感器。A display (Screen) and a touch sensor are provided on the Hardware layer.
Screen负责显示调整后的桌面壁纸。Screen is responsible for displaying the adjusted desktop wallpaper.
触摸传感器负责采集用户输入的触摸信号。The touch sensor is responsible for collecting touch signals input by the user.
下面结合配置桌面壁纸的场景,示例性说明电子设备100软件以及硬件的工作流程。The workflow of the software and hardware of the electronic device 100 will be exemplarily described below in conjunction with the scenario of configuring the desktop wallpaper.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层的传感器驱动模块将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The sensor driver module at the kernel layer processes touch operations into original input events (including touch coordinates, time stamps of touch operations, and other information). Raw input events are stored at the kernel level.
应用程序框架层的输入管理模块从内核层获取原始输入事件,识别该输入事件所对应的控件,例如针对设置控件中的设置壁纸控件或者图库中的设置壁纸的控件;该输入事件还可以是移动或删除桌面上控件元素的触发事件。输入管理模块可以基于原始输入事件以及对应的设置壁纸的控件,将原始输入事件的相关信息传输给桌面管理模块launcher,由桌面管理模块launcher传输给图库。The input management module of the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event, for example, the control for setting the wallpaper in the setting control or the control for setting the wallpaper in the gallery; the input event can also be a mobile Or delete the triggering event of the control element on the desktop. The input management module may transmit relevant information of the original input event to the launcher of the desktop management module based on the original input event and the corresponding control for setting the wallpaper, and the launcher of the desktop management module transmits the information to the gallery.
以该触摸操作是触摸单击操作,该单击操作所对应的控件为图库的应用图标的控件为例,图库基于原始输入事件以及调用应用框架层窗口管理服务模块的接口以及窗口适配服务模块的接口,生成相应桌面的壁纸,通过本地层的送显通道以及硬件图像制作器,配置为相应的桌面的壁纸并通过显示屏在桌面上显示。Take the touch operation as a touch and click operation, and the control corresponding to the click operation is the control of the application icon of the gallery. The gallery is based on the original input event and calls the interface of the window management service module of the application framework layer and the window adaptation service module The corresponding desktop wallpaper is generated through the interface of the local layer and the hardware image maker, configured as the corresponding desktop wallpaper and displayed on the desktop through the display screen.
其中,桌面管理模块launcher获取基于显示屏上的触摸传感器产生的对各个控件元素的操作指令(例如移动、删除等),基于该操作指令,确定调整后的桌面布局以及桌面上各控件元素的位置,并将该桌面布局或桌面上各个控件元素的位置进行存储或发送给图库;由图库基于该桌面布局或桌面上各个控件元素的位置,执行计算桌面上控件元素未遮挡的目标区域、识别图像中的主体元素及主体元素所在的位置,并将图像配置为主体元素位于目标区域内的壁纸。Among them, the desktop management module launcher obtains the operation instructions (such as moving, deleting, etc.) for each control element based on the touch sensor on the display screen, and based on the operation instruction, determines the adjusted desktop layout and the position of each control element on the desktop , and store or send the desktop layout or the position of each control element on the desktop to the gallery; based on the desktop layout or the position of each control element on the desktop, the gallery calculates the unoccluded target area of the control elements on the desktop and recognizes the image The host element in and the location of the host element, and configure the image as a wallpaper where the host element is located in the target area.
或者,由桌面管理模块launcher基于该桌面布局或桌面上各个控件元素的位置,直接计算出桌面上控件元素未遮挡的目标区域并发送给图库,由图库在识别出图像的主体元素及主体元素所在的位置,并将图像配置为主体元素位于目标区域内的壁纸。Or, based on the desktop layout or the position of each control element on the desktop, the desktop management module launcher directly calculates the unoccluded target area of the control elements on the desktop and sends it to the gallery, and the gallery recognizes the main element of the image and the location of the main element , and configure the image as wallpaper where the main element is within the target area.
或者,由桌面管理模块launcher基于该桌面布局或桌面上各个控件元素的位置,直接计算出桌面上控件元素未遮挡的目标区域,并由桌面管理模块launcher在桌面预览图界面识别出图像的主体元素及主体元素所在的位置,并将图像配置为主体元素位于目标区域内的壁纸。Alternatively, the desktop management module launcher directly calculates the unoccluded target area of the control elements on the desktop based on the desktop layout or the position of each control element on the desktop, and the desktop management module launcher recognizes the main element of the image on the desktop preview interface and the location of the main element, and configure the image as a wallpaper where the main element is located in the target area.
基于上述电子设备的硬件与软件架构,本申请实施例提供了一种桌面壁纸配置方法,应用于上述电子设备100,该电子设备100可以是但不限于智能手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、人工智能(ArtificialIntelligence,AI)终端等终端设备。本申请实施例对电子设备100的具体类型不作任何限制。Based on the hardware and software architecture of the above-mentioned electronic device, the embodiment of the present application provides a desktop wallpaper configuration method, which is applied to the above-mentioned electronic device 100. The electronic device 100 can be but not limited to a smart phone, a tablet computer, a wearable device, a vehicle devices, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs) , Artificial Intelligence (AI) terminal and other terminal equipment. The embodiment of the present application does not impose any limitation on the specific type of the electronic device 100 .
下面通过实施例介绍桌面壁纸配置方法的具体实施过程。The specific implementation process of the method for configuring the desktop wallpaper is introduced below through an embodiment.
参见图3,图3是本申请实施例提供的一种桌面壁纸配置方法的流程示意图;如图3所示,该方法可以包括以下步骤:Referring to FIG. 3, FIG. 3 is a schematic flowchart of a desktop wallpaper configuration method provided in an embodiment of the present application; as shown in FIG. 3, the method may include the following steps:
S301,响应于用户将第一图像设定为桌面壁纸的操作,电子设备识别第一图像中的主体元素以及主体元素对应在桌面的第一位置。S301. In response to the user's operation of setting a first image as a desktop wallpaper, the electronic device identifies a main element in the first image and a first position corresponding to the main element on the desktop.
在一些实施例中,电子设备可以接收用户通过点击桌面上的“设置”控件或“图库”控件输入的指令,进入桌面壁纸配置的流程。在基于第一图像设置桌面壁纸的过程中,电子设备还可以生成该第一图像的桌面预览图;基于该桌面预览图,电子设备在接收到用户设为桌面壁纸的操作时,可以对桌面预览图中所包含的主体元素进行识别,并确定该主体元素在预览界面时所在桌面的初始位置,即第一位置。In some embodiments, the electronic device may receive an instruction input by the user by clicking the "Settings" control or the "Gallery" control on the desktop, and enter the process of configuring the desktop wallpaper. In the process of setting the desktop wallpaper based on the first image, the electronic device can also generate a desktop preview image of the first image; based on the desktop preview image, the electronic device can preview the desktop when receiving the user's operation of setting the desktop wallpaper Identify the main element contained in the figure, and determine the initial position of the desktop where the main element is in the preview interface, that is, the first position.
下面通过两种配置方式介绍将图像配置为桌面壁纸的过程。The following describes the process of configuring images as desktop wallpapers through two configuration methods.
如图4所示,本申请实施例提供的一种桌面壁纸配置过程的界面示意图。如图4中的(a)图所示,该显示界面401可以为电子设备的主页面,在该主页面上布局有各种控件元素;该控件元素可以为应用程序图标,例如“设置”、“视频”、“运动健康”以及“图库”等;该控件还可以为桌面上的小部件等,例如显示界面401上显示地点、时间及日期等。As shown in FIG. 4 , it is a schematic interface diagram of a desktop wallpaper configuration process provided by the embodiment of the present application. As shown in (a) of Figure 4, the
如图4中的(a)图所示,电子设备接收用户点击“设置”控件的触摸信号时,可以进入到如图4中的(b)图所示的显示界面402,在该显示界面402包括“桌面和壁纸”控件。电子设备接收到用户点击该“桌面与壁纸”控件的触摸信号时,可以进入如图4中的(c)图所示的显示界面403,该显示界面403为可以显示待预览的图库,可以包括系统推荐的图库和用户通过截图或照相机拍摄存储的图库,本实施例中以推荐的图库为例进行说明。As shown in (a) in Figure 4, when the electronic device receives the touch signal that the user clicks on the "Settings" control, it can enter a
电子设备接收到用户点击推荐图库的控件的触摸信号时,可以进入如图4中的(d)图所示的推荐图库列表的显示界面404,在该推荐图库列表的显示界面404中可以包括多个图像。电子设备在接收到用户点击任一张图像的触摸信号后,可以打开该被点击的图像,并生成桌面壁纸的桌面预览图,如图4中的(e)图所示的显示界面405。When the electronic device receives the touch signal that the user clicks on the control of the recommended gallery, it can enter the
在该显示界面405包括进一步进行设置的选项控件,如图4中的(e)图所示,该选项控件显示为“√”;电子设备接收用户点击该选项控件的触摸信号,进入如图4中的(f)图所示的显示界面406,在显示界面406包括设置范围的控件,例如图4中的(f)图所示的“设为锁屏”、“设为桌面”以及“同时设置”的各个选项的控件。当电子设备接收到用户点击该“设为桌面”控件的触摸信号时,电子设备识别被选中的图像中的主体元素,以及主体元素在壁纸预览界面时所在的初始位置。The
另一种实现过程则是基于图库中的图像进行配置。如图5所示,本申请实施例提供的另一种桌面壁纸配置过程的界面示意图。如图5中的(a)图所示,该显示界面501可以为电子设备的主页面,在该主页面上布局有各种控件元素;该控件元素可以为应用程序图标,例如“视频”、“运动健康”、以及“图库”等;该控件还可以为桌面上的小部件等,例如显示界面501上显示地点、时间及日期等。Another implementation process is to configure based on the images in the gallery. As shown in FIG. 5 , it is a schematic interface diagram of another desktop wallpaper configuration process provided by the embodiment of the present application. As shown in (a) in Figure 5, the
如图5中的(a)图所示,电子设备接收用户点击“图库”控件的触摸信号时,可以进入到如图5中的(b)图所示的显示界面502,在该显示界面502包括多张图像。As shown in (a) in Figure 5, when the electronic device receives the touch signal that the user clicks on the "Gallery" control, it can enter a
电子设备接收到用户点击任一张图像的触摸信号时,可以进入如图5中的(c)图所示的显示界面503,该显示界面503为可以对该图像进行操作的各个功能控件,例如“分享”、“收藏”、“编辑”、“删除”以及“更多”等控件。When the electronic device receives a touch signal that the user clicks on any image, it can enter a
电子设备接收到用户点击“更多”控件的触摸信号时,可以进入如图5中的(d)图所示的显示界面504;在该显示界面504可以弹出其他对图像进行处理的功能控件列表,例如“移动”、“复制”、“隐藏”、“重命名”、“旋转”、“设置为”以及“添加备注”等功能控件。When the electronic device receives the touch signal that the user clicks on the "more" control, it can enter the
电子设备在接收到用户点击该功能控件中的“设置为”控件的触摸信号后,进入如图5中的(e)图所示的显示界面505,并在该显示界面505上生成该图像应用范围控件,例如“壁纸”、“联系人照片”以及“熄屏显示”等控件;电子设备接收用户点击该应用范围控件中“壁纸”控件的触摸信号时,进入如图5中的(f)图所示的显示界面506,即桌面壁纸的预览界面,此时图像为桌面预览图。After receiving the touch signal that the user clicks the "set to" control in the functional control, the electronic device enters the
在该显示界面506包括进一步进行设置的选项控件,如图5中的(f)图所示,该选项控件显示为“√”;电子设备接收用户点击该选项控件的触摸信号,进入如图5中的(g)图所示的显示界面507;在显示界面507包括设置范围的控件,例如图5中的(g)图所示的“设为锁屏”、“设为桌面”以及“同时设置”的各个选项的控件。当电子设备接收到用户点击该“设为桌面”控件的触摸信号时,电子设备识别被选中的图像中的主体元素,以及主体元素在壁纸预览界面时所在的初始位置。The
示例性的,电子设备对第一图像进行目标检测、特征提取以及分类识别处理,确定出第一图像中的主体元素。Exemplarily, the electronic device performs target detection, feature extraction, and classification and recognition processing on the first image to determine the subject element in the first image.
示例性的,电子设备可以通过神经网络对第一图像中的目标进行检测及特征提取,然后基于类别的识别与对比处理,确定第一图像中的主体元素的类型与位置。该主体元素的类型可以为用户的人脸部位,或者当图像为风景图时,主体元素可以是图像中的主要物体、建筑物或植物等,例如房屋、树木或者花朵等。Exemplarily, the electronic device may detect and extract features of the target in the first image through a neural network, and then determine the type and position of the subject element in the first image based on category recognition and comparison processing. The type of the subject element may be the face of the user, or when the image is a landscape image, the subject element may be the main object, building or plant in the image, such as a house, tree or flower.
S302,电子设备获取桌面上控件元素的第二位置,并根据第二位置确定在桌面上控件元素未遮挡的目标区域。S302. The electronic device acquires a second position of the control element on the desktop, and determines a target area not blocked by the control element on the desktop according to the second position.
在一些实施例中,电子设备可以通过桌面管理模块launcher确定各个控件元素在桌面上的位置。In some embodiments, the electronic device can determine the position of each control element on the desktop through the desktop management module launcher.
示例性的,桌面管理模块可以与桌面以及桌面上的控件元素产生绑定关系,通过对桌面上按照预定的划分方式,确定每个控件元素的具体位置;例如,桌面的划分方式可以是X×Y矩阵形式的单元格(如4×4或者4×5的单元格),通过确定控件元素在横向X以及纵向Y所占用的单元格数量以及控件元素的起始位置,即可确定控件元素在桌面上的位置。其中,为便于确定控件元素中的应用程序图标可能会占用一个单元格,而控件元素中的小部件则可能占用多个图标的位置,基于上述方式可以确定小部件在桌面上的位置。Exemplarily, the desktop management module can create a binding relationship with the desktop and the control elements on the desktop, and determine the specific position of each control element by dividing the desktop according to a predetermined method; for example, the desktop can be divided into X× For cells in the form of Y matrix (such as 4×4 or 4×5 cells), by determining the number of cells occupied by the control element in horizontal X and vertical Y and the starting position of the control element, the control element can be determined. position on the desktop. Wherein, in order to facilitate determining that the application icon in the control element may occupy one cell, and the widget in the control element may occupy the positions of multiple icons, based on the above method, the position of the widget on the desktop can be determined.
示例性的,电子设备在接收到桌面上的图标被删除、移动或下载安装新的控件元素时,系统会发出对应的广播,基于该广播launcher会执行相应的加载程序,对桌面上各个控件元素的移动、添加、删除、改变以及可用和不可用等各种情况进行监听及处理。Exemplarily, when the electronic device receives that an icon on the desktop is deleted, moved, or downloaded and installed a new control element, the system will send a corresponding broadcast. Monitor and process various situations such as moving, adding, deleting, changing, and being available and unavailable.
因此,如图2所示的电子设备的软件架构,launcher可以获取基于显示屏上的触摸传感器产生的对各个控件元素的操作指令(例如移动、删除等),基于该操作指令,确定调整后的桌面布局以及桌面上各控件元素的位置,并将该桌面布局和桌面上各个控件元素的位置进行存储或发送给图库。Therefore, in the software architecture of the electronic device shown in FIG. 2 , the launcher can obtain an operation instruction (such as moving, deleting, etc.) for each control element based on the touch sensor on the display screen, and determine the adjusted control element based on the operation instruction. The desktop layout and the positions of each control element on the desktop are stored or sent to a gallery.
在电子设备基于图库中的图像对桌面壁纸进行配置时,通过图库单元可以获取launcher中的桌面布局以及桌面上各个控件元素的位置,并基于该桌面布局和桌面上各个控件元素的位置确定出桌面上控件元素未遮挡的目标区域;或者,launcher在检测到桌面布局发生改变或者桌面上各控件元素的位置发生调整,则基于调整后的桌面布局及控件元素的位置向图库发送触发信号,该触发信号可以包括调整后的桌面布局以及各控件元素的位置,该触发信号用于指示图库基于获取到的调整后的桌面布局以及各控件元素的位置,重新确定桌面上控件元素未遮挡的目标区域。When the electronic device configures the desktop wallpaper based on the images in the gallery, the desktop layout in the launcher and the position of each control element on the desktop can be obtained through the gallery unit, and the desktop can be determined based on the desktop layout and the positions of each control element on the desktop The target area where the upper control elements are not blocked; or, when the launcher detects that the desktop layout has changed or the position of each control element on the desktop has been adjusted, it will send a trigger signal to the gallery based on the adjusted desktop layout and the position of the control elements. The signal may include the adjusted desktop layout and the positions of the control elements, and the trigger signal is used to instruct the gallery to re-determine the unoccluded target area of the control elements on the desktop based on the obtained adjusted desktop layout and the positions of the control elements.
示例性的,上述目标区域的计算还可以由launcher模块完成,基于与桌面以及桌面上各控件元素的绑定关系,确定出桌面上各控件元素的位置,并计算出控件元素为遮挡的目标区域。如图4中的(g)图所示,在显示界面407上的虚线框位置4071则为确定出的目标区域;再如图5中的(h)图所示,再显示界面508上的虚线框位置5081为确定出的目标区域。Exemplarily, the calculation of the above-mentioned target area can also be completed by the launcher module, based on the binding relationship with the desktop and each control element on the desktop, determine the position of each control element on the desktop, and calculate the target area where the control element is blocked . As shown in (g) figure among Fig. 4, the dotted
示例性的,电子设备可以包含多个桌面显示页面,分别可以称为主页面(第一屏)、第二屏、第三屏等,通过显示屏上的触摸传感器检测到用户向左或向右的滑动操作时,可以切换不同的桌面显示页面。在不同的桌面显示页面上,可以包含不同的控件元素以及对应不同的桌面布局。Exemplarily, the electronic device may include multiple desktop display pages, which may be called the main page (the first screen), the second screen, the third screen, etc., and the touch sensor on the display screen detects that the user moves left or right During the sliding operation, different desktop display pages can be switched. Different control elements may be contained on different desktop display pages and correspond to different desktop layouts.
因此,launcher模块可以分别与每个桌面显示页面进行绑定,并在向图库传送桌面布局或各控件元素在对应桌面上的位置时,分别携带有与各个桌面显示页面相对应的属性信息,即区分出每个桌面显示页面的桌面布局及各控件元素的位置。launcher可以将每个桌面显示页面的桌面布局或各控件元素的位置发送给图库,通过图库对各个桌面显示页面的未遮挡的目标区域进行计算;或者,launcher模块直接计算出每个桌面显示页面的未遮挡的目标区域,然后发送给图库。Therefore, the launcher module can be bound to each desktop display page separately, and when transmitting the desktop layout or the position of each control element on the corresponding desktop to the gallery, it carries attribute information corresponding to each desktop display page, namely Distinguish the desktop layout of each desktop display page and the position of each control element. The launcher can send the desktop layout of each desktop display page or the position of each control element to the gallery, and calculate the unoccluded target area of each desktop display page through the gallery; or, the launcher module directly calculates the position of each desktop display page The unoccluded target area is then sent to the gallery.
S303,根据第一位置和目标区域,电子设备将第一图像进行缩放或移动处理,并配置为主体元素位于目标区域内的桌面壁纸。S303. According to the first position and the target area, the electronic device scales or moves the first image, and configures it as a desktop wallpaper whose main element is located in the target area.
在一些实施例中,电子设备基于桌面预览图中主体元素所在的初始位置与未遮挡的目标区域的偏差,对第一图像进行缩小、放大或移动处理,将第一图像配置为主体元素位于未遮挡的目标区域中显示的桌面壁纸。In some embodiments, the electronic device shrinks, enlarges, or moves the first image based on the deviation between the initial position of the main element in the desktop preview image and the unoccluded target area, and configures the first image so that the main element is located in the unoccluded target area. The desktop wallpaper displayed in the occluded target area.
如图4中的(g)图所示的桌面壁纸,可以对第一图像缩小并向屏幕下方移动,使得第一图像中的主体元素(人脸部位)位于未遮挡的目标区域4071;又如图5中的(h)图所示的桌面壁纸,可以对第一图像缩小并向屏幕下方移动,使得第一图像中的主体元素(人脸部位)位于未遮挡的目标区域5081。也可以不进行缩放,只进行移动,具体可以基于目标区域的大小进行适应性确定,使得桌面壁纸与桌面更加适配的显示。As shown in Figure 4 (g) of the desktop wallpaper, the first image can be reduced and moved to the bottom of the screen, so that the main element (face) in the first image is located in the unblocked
通过本申请实施例,电子设备在检测到将第一图像设定为桌面壁纸的操作时,可以通过对第一图像的主体元素进行识别,并确定主体元素在生成桌面预览图时所在的第一位置;通过桌面管理模块基于桌面上各个应用程序控件元素所在的第二位置,确定出桌面上控件元素未遮挡的目标区域,将第一图像进行缩放和移动处理,使得未遮挡的目标区域与第一图像的主体元素的位置相匹配,将第一图像配置为当前桌面的壁纸;从而在设置桌面壁纸时,可以使得图像中的主体元素自动避开控件元素所在的位置,无需用户一一手动调整相应的控件元素的位置或者在生成桌面预览图后手动移动图像位置等操作,使得配置桌面壁纸更加简便,桌面壁纸显示更加符合用户要求,用户体验更好。Through the embodiment of the present application, when the electronic device detects the operation of setting the first image as the desktop wallpaper, it can identify the main element of the first image and determine the first location where the main element is located when generating the desktop preview image. position; through the desktop management module, based on the second position of each application control element on the desktop, determine the unoccluded target area of the control element on the desktop, zoom and move the first image, so that the unoccluded target area is the same as the second The positions of the main elements of the first image are matched, and the first image is configured as the wallpaper of the current desktop; thus, when setting the desktop wallpaper, the main elements in the image can automatically avoid the positions of the control elements, without the need for users to manually adjust one by one The position of the corresponding control elements or the operation of manually moving the image position after generating the desktop preview image make it easier to configure the desktop wallpaper, the desktop wallpaper display is more in line with user requirements, and the user experience is better.
在一些实施例中,桌面包括主页面和第二屏,所述第二屏为除所述主页面以外的其他桌面显示页面;电子设备获取桌面上控件元素的第二位置,并根据第二位置确定在桌面上控件元素未遮挡的目标区域,包括:In some embodiments, the desktop includes a main page and a second screen, and the second screen is a desktop display page other than the main page; the electronic device obtains the second position of the control element on the desktop, and according to the second position Determine the unobstructed target area of the control element on the desktop, including:
获取主页面上控件元素的第二位置,并根据主页面上控件元素的第二位置确定在主页面上控件元素未遮挡的第一目标子区域;获取第二屏上控件元素的第二位置,并根据第二屏上控件元素的第二位置确定在第二屏上控件元素未遮挡的第二目标子区域;将第一目标子区域与第二目标子区域的公共区域作为目标区域。Get the second position of the control element on the main page, and determine the first target sub-area that is not blocked by the control element on the main page according to the second position of the control element on the main page; get the second position of the control element on the second screen, And according to the second position of the control element on the second screen, determine the second target sub-area that is not blocked by the control element on the second screen; use the common area between the first target sub-area and the second target sub-area as the target area.
在一些实施例中,电子设备将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸,包括:In some embodiments, the electronic device zooms or moves the first image, and configures it as a desktop wallpaper whose main element is located in the target area, including:
电子设备将第一图像进行缩放或移动处理,配置为主体元素位于第一目标子区域与第二目标子区域的公共区域内的桌面壁纸。The electronic device zooms or moves the first image, and configures it as a desktop wallpaper whose main element is located in the common area of the first target sub-area and the second target sub-area.
如图6所示,本申请实施例提供的公共目标区域的界面示意图。电子设备包括多个桌面显示页面,如图6中的(a)图所示的主页面和如图6中的(b)图所示的第二屏的页面。As shown in FIG. 6 , a schematic diagram of the interface of the common target area provided by the embodiment of the present application. The electronic device includes multiple desktop display pages, such as the main page shown in (a) in FIG. 6 and the second screen page shown in (b) in FIG. 6 .
示例性的,当电子设备具备多个桌面显示页面时,电子设备通过图库或launcher模块可以分别计算出每个桌面显示页面的未遮挡的目标区域,然后基于每个桌面显示页面的未遮挡的目标区域计算出公共的目标区域。Exemplarily, when the electronic device has multiple desktop display pages, the electronic device can separately calculate the unoccluded target area of each desktop display page through the gallery or launcher module, and then based on the unoccluded target area of each desktop display page Region Computes the common object region.
如图6中的(a)图所示的虚线框表示的目标区域,以及图6中的(b)图所示的虚线框表示的目标区域,电子设备基于两者的目标区域,计算出公共的目标区域,如图6中的(c)图和(d)图分别所示的虚线框表示的公共的目标区域。电子设备基于该公共的目标区域配置桌面壁纸,将图像的主体元素位于该公共的目标区域内,如图6中的(c)图和(d)图分别所示的桌面壁纸。The target area represented by the dotted line box shown in Figure 6 (a) and the target area represented by the dotted line box shown in Figure 6 (b) , the electronic device calculates the common The target area of , such as the common target area indicated by the dotted box shown in (c) and (d) of FIG. 6 . The electronic device configures the desktop wallpaper based on the common target area, and places the main element of the image in the common target area, as shown in (c) and (d) of FIG. 6 , respectively.
相应的,在切换到不同的桌面显示页面时,均可以使图像的主体元素位于各桌面显示页面的未遮挡的目标区域,在简便桌面壁纸设置的同时,提升桌面壁纸的显示效果。Correspondingly, when switching to different desktop display pages, the main element of the image can be located in the unblocked target area of each desktop display page, and the display effect of the desktop wallpaper can be improved while facilitating the setting of the desktop wallpaper.
在一些实施例中,桌面包括主页面和第二屏,第二屏为除主页面以外的其他桌面显示页面;目标区域包括第一区域或第二区域;电子设备获取桌面上控件元素的第二位置,并根据第二位置确定在桌面上控件元素未遮挡的目标区域,包括:In some embodiments, the desktop includes a main page and a second screen, and the second screen is other desktop display pages except the main page; the target area includes the first area or the second area; the electronic device obtains the second screen of the control element on the desktop. position, and determine the unoccluded target area of the control element on the desktop according to the second position, including:
电子设备获取主页面上控件元素的第二位置,并根据主页面上控件元素的第二位置确定在主页面上控件元素未遮挡的第一区域;电子设备获取第二屏上控件元素的第二位置,并根据第二屏上控件元素的第二位置确定在第二屏上控件元素未遮挡的第二区域。The electronic device obtains the second position of the control element on the main screen, and determines the first area where the control element is not blocked on the main screen according to the second position of the control element on the main screen; the electronic device obtains the second position of the control element on the second screen. position, and determine the second area where the control element on the second screen is not blocked according to the second position of the control element on the second screen.
在一些实施例中,电子设备根据第一位置和目标区域,将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸,包括:In some embodiments, the electronic device scales or moves the first image according to the first position and the target area, and configures it as a desktop wallpaper whose main element is located in the target area, including:
电子设备根据第一位置和第一区域,将第一图像进行缩放或移动处理,配置为主体元素位于第一区域内的所述主页面的桌面壁纸;电子设备根据第一位置和第二区域,将第一图像进行缩放或移动处理,配置为主体元素位于第二区域内的第二屏的桌面壁纸。The electronic device scales or moves the first image according to the first position and the first area, and configures it as the desktop wallpaper of the main page whose main element is located in the first area; the electronic device, according to the first position and the second area, The first image is scaled or moved, and configured as the desktop wallpaper of the second screen whose main element is located in the second area.
如图7所示,本申请实施例提供的各个桌面的目标区域的界面示意图。电子设备包括多个桌面显示页面,如图7中的(a)图所示的主页面、如图7中的(b)图所示的第二屏的页面以及如图7中的(c)图所示的第三屏的页面。As shown in FIG. 7 , it is a schematic diagram of the interface of the target area of each desktop provided by the embodiment of the present application. Electronic equipment includes a plurality of desktop display pages, such as the main page shown in (a) figure in Figure 7, the page of the second screen as shown in Figure 7 (b) and the page of (c) in Figure 7 The page of the third screen shown in the figure.
示例性的,当电子设备具备多个桌面显示页面时,电子设备通过图库或launcher模块可以分别计算出每个桌面显示页面的未遮挡的目标区域。如图7中的(a)图所示的虚线框表示的目标区域、图7中的(b)图所示的虚线框表示的目标区域以及图7中的(c)图所示的虚线框表示的目标区域。Exemplarily, when the electronic device has multiple desktop display pages, the electronic device can separately calculate the unoccluded target area of each desktop display page through the gallery or launcher module. The target area represented by the dotted box shown in (a) figure in Figure 7, the target area represented by the dotted line box shown in (b) figure in Figure 7, and the dotted line box shown in (c) figure in Figure 7 Indicates the target area.
电子设备基于各个桌面显示页面分别对应的目标区域,对图像进行缩放或移动处理,将图像配置为的主体元素分别位于各个桌面显示页面的目标区域内的桌面壁纸,如图7中的(a)图、(b)图和(c)图所示的分别适配于不同桌面布局的桌面壁纸。The electronic device zooms or moves the image based on the target areas corresponding to each desktop display page, and configures the image as a desktop wallpaper whose main elements are respectively located in the target areas of each desktop display page, as shown in (a) in Figure 7 The desktop wallpapers shown in Fig. 1, (b) and (c) are respectively adapted to different desktop layouts.
相应的,在切换到不同的桌面显示页面时,所设置的桌面壁纸还可以随桌面显示页面的切换而动态改变,使图像的主体元素位于各桌面显示页面分别对应的目标区域,在简便桌面壁纸配置的同时,实现了桌面壁纸显示的多样性,提升桌面壁纸的显示效果。Correspondingly, when switching to different desktop display pages, the set desktop wallpaper can also be dynamically changed with the switching of the desktop display pages, so that the main elements of the image are located in the corresponding target areas of each desktop display page. At the same time of configuration, the diversity of desktop wallpaper display is realized, and the display effect of desktop wallpaper is improved.
需要说明的是,上述界面示意图仅示例性说明各个桌面显示页面上的控件元素分别对应的不同的布局,并不对各个桌面显示页面上的控件元素的类型以及布局方式进行限定。当基于每个桌面显示页面确定出的公共的未遮挡目标区域小于预设阈值,或者无法确定出公共的未遮挡的目标区域时,还可以将图像配置成与每个桌面显示页面的公共区域分别对应匹配的桌面壁纸。It should be noted that the above interface schematic diagrams only illustrate the different layouts corresponding to the control elements on each desktop display page, and do not limit the types and layout methods of the control elements on each desktop display page. When the common unoccluded target area determined based on each desktop display page is smaller than the preset threshold, or the common unoccluded target area cannot be determined, the image may also be configured to be separate from the common area of each desktop display page Corresponds to the matching desktop wallpaper.
在一些实施例中,在电子设备将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸之后,该方法还包括:In some embodiments, after the electronic device zooms or moves the first image and configures it as a desktop wallpaper whose main element is located in the target area, the method further includes:
电子设备在检测到用户移动桌面上控件元素的操作时,获取桌面上控件元素移动后的第三位置,并根据第三位置确定桌面上控件元素移动后未遮挡的目标区域;将移动前的桌面壁纸调整为主体元素位于移动后未遮挡的目标区域内的桌面壁纸。When the electronic device detects the user's operation of moving the control element on the desktop, it obtains the third position of the control element on the desktop after it is moved, and determines the unoccluded target area after the control element on the desktop is moved according to the third position; The wallpaper is adjusted to the desktop wallpaper whose main element is located in the unoccluded target area after moving.
如图8所示,本申请实施例提供的移动控件元素时的界面示意图;如图8中的(a)图所示的桌面上控件元素移动之前桌面壁纸显示状态以及显示主体元素的目标区域,图8中的(b)图则为将桌面上的“QQ”控件和“计算器”控件移动位置后,桌面壁纸随移动操作的结束,显示自动适配移动控件后的桌面壁纸。As shown in FIG. 8 , a schematic diagram of the interface when the control element is moved according to the embodiment of the present application; as shown in (a) of FIG. 8 , the display state of the desktop wallpaper before the movement of the control element on the desktop and the target area where the main element is displayed, Figure 8 (b) shows that after the "QQ" control and "calculator" control on the desktop are moved, the desktop wallpaper will automatically adapt to the desktop wallpaper after the mobile control is displayed after the end of the moving operation.
可以看出,电子设备基于桌面上的控件元素被移动后的布局重新确定了显示主体元素的目标区域,并调整了桌面壁纸中主体元素的显示位置。从而电子设备可以基于在桌面显示页面检测到的移动桌面上控件元素的操作时,触发图库或launcher模块对桌面壁纸显示位置的调整或者对设置为桌面壁纸的图像进行调整并重新配置桌面壁纸,使得桌面壁纸可以随桌面上控件元素的移动而动态的更新,提高桌面壁纸配置的适用性以及桌面壁纸与桌面布局的适配性,提高配置桌面壁纸简便性以及桌面壁纸的显示效果。It can be seen that the electronic device re-determines the target area for displaying the main element based on the layout of the moved control elements on the desktop, and adjusts the display position of the main element in the desktop wallpaper. Therefore, based on the operation of the control elements on the mobile desktop detected on the desktop display page, the electronic device can trigger the gallery or launcher module to adjust the display position of the desktop wallpaper or adjust the image set as the desktop wallpaper and reconfigure the desktop wallpaper, so that The desktop wallpaper can be dynamically updated with the movement of the control elements on the desktop, improving the applicability of the desktop wallpaper configuration and the adaptability of the desktop wallpaper and the desktop layout, improving the convenience of configuring the desktop wallpaper and the display effect of the desktop wallpaper.
在一些实施例中,在电子设备将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸之后,该方法还包括:In some embodiments, after the electronic device zooms or moves the first image and configures it as a desktop wallpaper whose main element is located in the target area, the method further includes:
在电子设备检测到用户删除桌面上控件元素的操作时,获取桌面上剩余控件元素的第四位置,并根据第四位置确定桌面上剩余控件元素未遮挡的目标区域;将删除前的桌面壁纸调整为主体元素位于删除后的未遮挡的目标区域内的桌面壁纸。When the electronic device detects that the user deletes the control elements on the desktop, obtain the fourth position of the remaining control elements on the desktop, and determine the unoccluded target area of the remaining control elements on the desktop according to the fourth position; adjust the desktop wallpaper before deletion A desktop wallpaper whose main element is located within the unoccluded target area after deletion.
如图9所示,为本申请实施例提供的删除控件元素时的界面示意图;如图9中的(a)图所示的桌面上控件元素删除之前桌面壁纸显示状态以及显示主体元素的目标区域,图9中的(b)图则为将桌面上的“微博”控件和“微信”控件删除后,桌面壁纸随删除操作的结束,显示自动适配删除控件后的桌面壁纸。As shown in Figure 9, it is a schematic diagram of the interface when the control element is deleted in the embodiment of the present application; as shown in Figure 9 (a), the display state of the desktop wallpaper before the deletion of the control element on the desktop and the target area where the main element is displayed , (b) in Figure 9 shows that after the "Weibo" control and "WeChat" control on the desktop are deleted, the desktop wallpaper will automatically adapt to the desktop wallpaper after the deleted control is displayed after the deletion operation ends.
可以看出,电子设备基于桌面上的控件元素被删除后的布局重新确定了显示主体元素的目标区域,并调整了桌面壁纸中主体元素的显示位置。从而电子设备可以基于在桌面显示页面检测到的删除桌面上控件元素的操作时,触发图库或launcher模块对桌面壁纸显示位置的调整或者对设置为桌面壁纸的图像进行调整并重新配置桌面壁纸,使得桌面壁纸可以随桌面上控件元素的布局变化而动态的更新,提高桌面壁纸配置的适用性以及桌面壁纸与桌面布局的适配性,提高配置桌面壁纸简便性以及桌面壁纸的显示效果。It can be seen that the electronic device re-determines the target area for displaying the main element based on the layout after the control element on the desktop is deleted, and adjusts the display position of the main element in the desktop wallpaper. Therefore, the electronic device can trigger the gallery or launcher module to adjust the display position of the desktop wallpaper or adjust the image set as the desktop wallpaper and reconfigure the desktop wallpaper based on the operation of deleting the control elements on the desktop detected on the desktop display page, so that The desktop wallpaper can be dynamically updated with changes in the layout of the control elements on the desktop, improving the applicability of the desktop wallpaper configuration and the adaptability of the desktop wallpaper and the desktop layout, improving the convenience of configuring the desktop wallpaper and the display effect of the desktop wallpaper.
在一些实施例中,在电子设备将第一图像进行缩放或移动处理,配置为主体元素位于目标区域内的桌面壁纸之后,该方法还包括:In some embodiments, after the electronic device zooms or moves the first image and configures it as a desktop wallpaper whose main element is located in the target area, the method further includes:
在电子设备检测到用户下载新的桌面上控件元素的操作时,获取下载后桌面上控件元素的第五位置,并根据第五位置确定下载后桌面上控件元素未遮挡的目标区域;将下载前的桌面壁纸调整为主体元素位于下载后的未遮挡的目标区域内的桌面壁纸。When the electronic device detects that the user downloads a new control element on the desktop, obtain the fifth position of the control element on the desktop after downloading, and determine the unoccluded target area of the control element on the desktop after downloading according to the fifth position; The desktop wallpaper of is adjusted to the desktop wallpaper whose main element is located in the unblocked target area after downloading.
如图10所示,为本申请实施例提供的下载控件元素时的界面示意图;如图10中的(a)图所示的桌面上下载新的控件元素之前桌面壁纸显示状态以及显示主体元素的目标区域,图10中的(b)图则为该桌面上下载并安装“微博”控件和“微信”控件后,桌面壁纸随下载并安装的动作结束,显示自动适配下载新控件后的桌面壁纸。As shown in Figure 10, it is a schematic diagram of the interface when downloading control elements provided by the embodiment of the present application; as shown in Figure 10 (a) on the desktop, the desktop wallpaper display status and the display status of the main element before downloading new control elements The target area, (b) in Figure 10 shows that after the "Weibo" control and "WeChat" control are downloaded and installed on the desktop, the desktop wallpaper ends with the action of downloading and installing, and the display automatically adapts to the image after downloading the new control. Desktop Wallpapers.
可以看出,电子设备基于桌面上安装新的控件元素后的布局重新确定了显示主体元素的目标区域,并调整了桌面壁纸中主体元素的显示位置。从而电子设备可以基于在桌面显示页面检测到桌面上下载并安装控件元素的操作时,触发图库或launcher模块对桌面壁纸显示位置的调整或者对设置为桌面壁纸的图像进行调整并重新配置桌面壁纸,使得桌面壁纸可以随桌面上控件元素的布局变化而动态的更新,提高桌面壁纸配置的适用性以及桌面壁纸与桌面布局的适配性,提高配置桌面壁纸简便性,提高桌面壁纸的显示效果及显示多样性。It can be seen that the electronic device re-determines the target area for displaying the main element based on the layout after the new control element is installed on the desktop, and adjusts the display position of the main element in the desktop wallpaper. Therefore, when the electronic device detects the operation of downloading and installing control elements on the desktop on the desktop display page, trigger the gallery or launcher module to adjust the display position of the desktop wallpaper or adjust the image set as the desktop wallpaper and reconfigure the desktop wallpaper, The desktop wallpaper can be dynamically updated with the layout changes of the control elements on the desktop, the applicability of the desktop wallpaper configuration and the adaptability of the desktop wallpaper and the desktop layout are improved, the convenience of configuring the desktop wallpaper is improved, and the display effect and display of the desktop wallpaper are improved. diversity.
在一些实施例中,该方法还包括:In some embodiments, the method also includes:
在响应于用户将第一图像设定为桌面壁纸的操作之前,电子设备生成第一图像的桌面预览图;响应于用户将第一图像的桌面预览图设定为桌面壁纸的操作,电子设备确定第一图像的应用范围;基于应用范围,获取与应用范围对应的桌面上控件元素的第二位置。Before responding to the user’s operation of setting the first image as the desktop wallpaper, the electronic device generates a desktop preview of the first image; in response to the user’s operation of setting the desktop preview of the first image as the desktop wallpaper, the electronic device determines The application range of the first image; based on the application range, the second position of the control element on the desktop corresponding to the application range is obtained.
示例性的,该应用范围可以包括第一应用范围和第二应用范围;其中,第一应用范围用于指示第一图像被配置的属性,例如“设为锁屏”、“设为桌面”以及“同时设置”等属性;第二应用范围用于指示第一图像被配置的目标桌面显示页面。Exemplarily, the application scope may include a first application scope and a second application scope; wherein, the first application scope is used to indicate the configured attributes of the first image, such as "set as lock screen", "set as desktop" and Attributes such as "simultaneously set"; the second application range is used to indicate the target desktop display page where the first image is configured.
示例性的,当电子设备包括多个桌面显示页面时,该第二应用范围可以为多个桌面显示页面中的至少一个页面,例如主页面或第二页面;所设定的桌面壁纸的应用范围可以是其中的一个或多个页面也可以是所有页面。Exemplarily, when the electronic device includes a plurality of desktop display pages, the second application range may be at least one of the plurality of desktop display pages, such as the main page or the second page; the application range of the set desktop wallpaper It can be one or more pages or all pages.
示例性的,电子设备还可以使用不同的图像分别对应设置为不同桌面显示页面的壁纸,并基于不同桌面显示页面中控件元素未遮挡的目标区域,将对应图像进行缩放或移动处理,使得各图像中的主体元素分别位于各自对应的桌面显示页面的控件元素未遮挡区域内。例如,可以将一个系列的多张图像分别设置为多个桌面显示页面的壁纸。从而在检测到用户切换桌面的滑动操作时,可以基于不同的桌面显示页面显示一个系列的不同效果及类型的壁纸,使得壁纸配置更加多样化,壁纸显示效果更好,用户的体验感也更好。Exemplarily, the electronic device can also use different images to correspond to the wallpapers set as different desktop display pages, and based on the unoccluded target areas of the control elements in the different desktop display pages, zoom or move the corresponding images, so that each image The main elements in are respectively located in the non-occluded areas of the control elements of the corresponding desktop display pages. For example, multiple images from a series can be set as wallpapers for multiple desktop display pages respectively. Therefore, when the sliding operation of the user to switch the desktop is detected, a series of wallpapers with different effects and types can be displayed based on different desktop display pages, so that the wallpaper configuration is more diversified, the wallpaper display effect is better, and the user experience is also better. .
如图11所示,本申请实施例提供的配置系列桌面壁纸的界面示意图;如图11中的(a)图、(d)图以及(g)所示的基于不同的图像,在配置桌面壁纸时生成的第一桌面预览图,在该第一桌面预览图的界面包括第一应用范围的控件,例如“设为锁屏”、“设为桌面”以及“同时设置”等项目控件。As shown in FIG. 11 , a schematic diagram of an interface for configuring a series of desktop wallpapers provided by the embodiment of the present application; as shown in (a), (d) and (g) in FIG. 11 , based on different images, when configuring desktop wallpapers The interface of the first desktop preview image includes controls in the first application range, such as "set as lock screen", "set as desktop" and "simultaneously set" and other item controls.
在该第一桌面预览图的界面,电子设备接收到用户点击“设为桌面”控件的触摸信号时,分别对应进入如图11中的(b)图、(e)图以及(h)图所示的第二桌面预览图的界面,在该第二桌面预览图的界面可以包括第二应用范围的控件,例如“主屏幕”、“第二屏”以及“第三屏”等屏幕控件,该控件还包括侧边的下拉滑动控件,当电子设备的桌面显示页面具有多个时,还可以基于下拉的滑动操作,显示不同的项目控件。On the interface of the first desktop preview image, when the electronic device receives the touch signal that the user clicks on the "set as desktop" control, the electronic device enters the screens shown in (b), (e) and (h) of Figure 11 respectively. The interface of the second desktop preview image is shown, and the interface of the second desktop preview image may include controls in the second application range, such as screen controls such as "main screen", "second screen" and "third screen". The control also includes a side pull-down slide control, and when there are multiple desktop display pages of the electronic device, different item controls can be displayed based on the pull-down slide operation.
如图11中的(c)图、(f)图以及(i)图,不同的桌面显示页面对应不同的桌面布局,从而确定出不同的目标区域;电子设备对不同的图像进行主体元素的识别及初始位置的确定,并基于桌面上不同的目标区域,对相应的图像进行调整,分别配置为各图像的主体元素对应位于相应的目标区域的桌面壁纸。从而可以实现对多个桌面显示页面配置不同图像的桌面壁纸,使得桌面壁纸的配置更加多样化,桌面壁纸显示的效果更好,用户的体验感更强。As shown in (c), (f) and (i) in Figure 11, different desktop display pages correspond to different desktop layouts, thereby determining different target areas; electronic devices identify the main elements of different images And the initial position is determined, and based on the different target areas on the desktop, the corresponding images are adjusted, and the main elements of each image are respectively configured to correspond to the desktop wallpapers located in the corresponding target areas. Therefore, desktop wallpapers with different images can be configured on multiple desktop display pages, so that the configuration of desktop wallpapers is more diversified, the display effect of desktop wallpapers is better, and the user experience is stronger.
通过本申请实施例,电子设备在检测到将第一图像设定为桌面壁纸的操作时,可以通过对第一图像的主体元素进行识别,并确定主体元素在生成桌面预览图时所在的第一位置;通过桌面管理模块基于桌面上各个应用程序控件元素所在的第二位置,确定出桌面上控件元素未遮挡的目标区域,将第一图像进行缩放和移动处理,使得未遮挡的目标区域与第一图像的主体元素的位置相匹配,将第一图像配置为当前桌面的壁纸;从而在设置桌面壁纸时,可以使得图像中的主体元素自动避开控件元素所在的位置,无需用户一一手动调整相应的控件元素的位置或者在生成桌面预览图后手动移动图像位置等操作,使得配置桌面壁纸更加简便,桌面壁纸显示更加符合用户要求,用户体验更好。Through the embodiment of the present application, when the electronic device detects the operation of setting the first image as the desktop wallpaper, it can identify the main element of the first image and determine the first location where the main element is located when generating the desktop preview image. position; through the desktop management module, based on the second position of each application control element on the desktop, determine the unoccluded target area of the control element on the desktop, zoom and move the first image, so that the unoccluded target area is the same as the second The positions of the main elements of the first image are matched, and the first image is configured as the wallpaper of the current desktop; thus, when setting the desktop wallpaper, the main elements in the image can automatically avoid the positions of the control elements, without the need for users to manually adjust one by one The position of the corresponding control elements or the operation of manually moving the image position after generating the desktop preview image make it easier to configure the desktop wallpaper, the desktop wallpaper display is more in line with user requirements, and the user experience is better.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
对应于上文实施例所述的桌面壁纸配置方法,图12示出了本申请实施例提供的桌面壁纸配置装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the desktop wallpaper configuration method described in the above embodiments, FIG. 12 shows a structural block diagram of the desktop wallpaper configuration device provided by the embodiment of the present application. For the convenience of description, only the parts related to the embodiment of the present application are shown.
请参见图12,本申请实施例提供的桌面壁纸配置装置的结构框图。如图12所示,该桌面壁纸配置装置包括:Please refer to FIG. 12 , which is a structural block diagram of an apparatus for configuring desktop wallpapers provided by an embodiment of the present application. As shown in Figure 12, the desktop wallpaper configuration device includes:
识别单元121,用于响应于用户将第一图像设定为桌面壁纸的操作,识别所述第一图像中的主体元素以及所述主体元素对应在所述桌面的第一位置;The
获取单元122,用于获取所述桌面上控件元素的第二位置,并根据所述第二位置确定在所述桌面上控件元素未遮挡的目标区域;An obtaining
配置单元123,用于根据所述第一位置和所述目标区域,将所述第一图像进行缩放或移动处理,配置为所述主体元素位于所述目标区域内的桌面壁纸。The
在一些实施例中,所述桌面包括主页面和第二屏,所述第二屏为除所述主页面以外的其他桌面显示页面;所述获取单元122,还用于获取所述主页面上控件元素的第二位置,并根据所述主页面上控件元素的第二位置确定在所述主页面上控件元素未遮挡的第一目标子区域;获取所述第二屏上控件元素的第二位置,并根据所述第二屏上控件元素的第二位置确定在所述第二屏上控件元素未遮挡的第二目标子区域;将所述第一目标子区域与所述第二目标子区域的公共区域作为所述目标区域。In some embodiments, the desktop includes a main page and a second screen, and the second screen is a desktop display page other than the main page; the acquiring
在一些实施例中,所述配置单元123,还用于将所述第一图像进行缩放或移动处理,配置为所述主体元素位于所述第一目标子区域与所述第二目标子区域的公共区域内的桌面壁纸。In some embodiments, the
在一些实施例中,所述桌面包括主页面和第二屏,所述第二屏为除所述主页面以外的其他桌面显示页面;所述目标区域包括第一区域或第二区域;所述获取单元122,还用于获取所述主页面上控件元素的第二位置,并根据所述主页面上控件元素的第二位置确定在所述主页面上控件元素未遮挡的所述第一区域;获取所述第二屏上控件元素的第二位置,并根据所述第二屏上控件元素的第二位置确定在所述第二屏上控件元素未遮挡的所述第二区域。In some embodiments, the desktop includes a main page and a second screen, and the second screen is a desktop display page other than the main page; the target area includes a first area or a second area; the
在一些实施例中,所述配置单元123,还用于根据所述第一位置和所述第一区域,将所述第一图像进行缩放或移动处理,配置为所述主体元素位于所述第一区域内的所述主页面的桌面壁纸;根据所述第一位置和所述第二区域,将所述第一图像进行缩放或移动处理,配置为所述主体元素位于所述第二区域内的所述第二屏的桌面壁纸。In some embodiments, the configuring
在一些实施例中,该装置还包括:In some embodiments, the device also includes:
壁纸切换单元,用于响应于用户从所述主页面切换至所述第二屏的桌面切换操作,将所述主页面对应的桌面壁纸切换为所述第二屏对应的桌面壁纸;响应于用户从所述第二屏切换至所述主页面的桌面切换操作,将所述第二屏对应的桌面壁纸切换为所述主页面对应的桌面壁纸。A wallpaper switching unit, configured to switch the desktop wallpaper corresponding to the main page to the desktop wallpaper corresponding to the second screen in response to the user switching the desktop from the main page to the second screen; in response The desktop switching operation performed by the user to switch from the second screen to the main page switches the desktop wallpaper corresponding to the second screen to the desktop wallpaper corresponding to the main page.
在一些实施例中,所述配置单元123,还用于在检测到用户移动所述桌面上控件元素的操作时,获取所述桌面上控件元素移动后的第三位置,并根据所述第三位置确定所述桌面上控件元素移动后未遮挡的目标区域;将移动前的桌面壁纸调整为主体元素位于移动后未遮挡的目标区域内的桌面壁纸。In some embodiments, the
在一些实施例中,所述配置单元123,还用于在检测到用户删除所述桌面上控件元素的操作时,获取所述桌面上剩余控件元素的第四位置,并根据所述第四位置确定所述桌面上剩余控件元素未遮挡的目标区域;将删除前的桌面壁纸调整为主体元素位于删除后的未遮挡的目标区域内的桌面壁纸。In some embodiments, the
在一些实施例中,所述配置单元123,还用于在检测到用户下载新的所述桌面上控件元素的操作时,获取下载后所述桌面上控件元素的第五位置,并根据所述第五位置确定下载后所述桌面上控件元素未遮挡的目标区域;将下载前的桌面壁纸调整为主体元素位于下载后的未遮挡的目标区域内的桌面壁纸。In some embodiments, the
在一些实施例中,该装置还包括:In some embodiments, the device also includes:
生成预览单元,用于在响应于用户将第一图像设定为桌面壁纸的操作之前,生成所述第一图像的桌面预览图;generating a preview unit, configured to generate a desktop preview image of the first image before responding to the user's operation of setting the first image as the desktop wallpaper;
应用范围确定单元,用于响应于用户将所述第一图像的所述桌面预览图设定为桌面壁纸的操作,确定所述第一图像的应用范围;An application range determining unit, configured to determine the application range of the first image in response to the user's operation of setting the desktop preview image of the first image as the desktop wallpaper;
所述获取单元,还用于基于所述应用范围,获取与所述应用范围对应的所述桌面上控件元素的所述第二位置。The obtaining unit is further configured to obtain, based on the application range, the second position of the control element on the desktop corresponding to the application range.
在一些实施例中,该识别单元121还用于对所述第一图像进行目标检测、特征提取以及分类识别处理,确定所述第一图像中的所述主体元素。In some embodiments, the
通过本申请实施例,电子设备在检测到将第一图像设定为桌面壁纸的操作时,通过对第一图像的主体元素进行识别,并确定主体元素在生成桌面预览图时所在的第一位置;通过桌面管理模块基于桌面上各个应用程序控件元素所在的第二位置,确定出桌面上控件元素未遮挡的目标区域,将第一图像进行缩放和移动处理,使得未遮挡的目标区域与第一图像的主体元素的位置相匹配,将第一图像配置为当前桌面的壁纸;从而在配置桌面壁纸时,使得图像中的主体元素自动避开控件元素所在的位置,使得配置桌面壁纸更加简便,用户体验更好。Through the embodiment of the present application, when the electronic device detects the operation of setting the first image as the desktop wallpaper, it recognizes the main element of the first image and determines the first position where the main element is when generating the desktop preview ; Through the desktop management module, based on the second position of each application control element on the desktop, determine the unoccluded target area of the control element on the desktop, zoom and move the first image, so that the unoccluded target area is the same as the first The position of the main element of the image is matched, and the first image is configured as the wallpaper of the current desktop; thus, when configuring the desktop wallpaper, the main element in the image automatically avoids the position of the control element, making it easier to configure the desktop wallpaper, and the user The experience is better.
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information interaction and execution process between the above-mentioned devices/units are based on the same concept as the method embodiment of the present application, and its specific functions and technical effects can be found in the method embodiment section. I won't repeat them here.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used for illustration. In practical applications, the above-mentioned functions can be assigned to different functional units, Completion of modules means that the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit, and the above-mentioned integrated units may adopt hardware It can also be implemented in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above system, reference may be made to the corresponding processes in the aforementioned method embodiments, and details will not be repeated here.
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each of the foregoing method embodiments can be realized.
本申请实施例提供了一种计算机程序产品,当计算机程序产品在移动终端上运行时,使得移动终端执行时实现可实现上述各个方法实施例中的步骤。An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal can implement the steps in the foregoing method embodiments when executed.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases, and for parts that are not detailed or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/网络设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/网络设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device/network device and method may be implemented in other ways. For example, the device/network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that: the above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the application shall be covered by this application. within the scope of the application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
Claims (13)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210669583.1A CN115129410B (en) | 2022-06-14 | 2022-06-14 | Desktop wallpaper configuration method, device, electronic device and readable storage medium |
| PCT/CN2023/088946 WO2023241209A1 (en) | 2022-06-14 | 2023-04-18 | Desktop wallpaper configuration method and apparatus, electronic device and readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210669583.1A CN115129410B (en) | 2022-06-14 | 2022-06-14 | Desktop wallpaper configuration method, device, electronic device and readable storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115129410A CN115129410A (en) | 2022-09-30 |
| CN115129410B true CN115129410B (en) | 2023-06-23 |
Family
ID=83378500
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210669583.1A Active CN115129410B (en) | 2022-06-14 | 2022-06-14 | Desktop wallpaper configuration method, device, electronic device and readable storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN115129410B (en) |
| WO (1) | WO2023241209A1 (en) |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115129410B (en) * | 2022-06-14 | 2023-06-23 | 荣耀终端有限公司 | Desktop wallpaper configuration method, device, electronic device and readable storage medium |
| CN119597183A (en) * | 2023-09-08 | 2025-03-11 | 华为终端有限公司 | Wallpaper processing method and electronic equipment |
| CN120010704A (en) * | 2023-11-08 | 2025-05-16 | 荣耀终端股份有限公司 | Wallpaper display method and electronic device |
| CN120029504A (en) * | 2023-11-22 | 2025-05-23 | 华为技术有限公司 | Method and terminal device for setting wallpaper |
| CN120066638A (en) * | 2023-11-30 | 2025-05-30 | 华为技术有限公司 | Display method, electronic device, and computer-readable medium |
| CN117455799B (en) * | 2023-12-21 | 2024-09-06 | 荣耀终端有限公司 | Image processing method, electronic device and storage medium |
| WO2025139797A1 (en) * | 2023-12-26 | 2025-07-03 | 荣耀终端股份有限公司 | Image processing method, electronic device, and storage medium |
| CN120335681B (en) * | 2024-01-10 | 2026-04-03 | 荣耀终端股份有限公司 | Wallpaper editing methods, electronic devices and storage media |
| CN118349153A (en) * | 2024-03-30 | 2024-07-16 | 华为技术有限公司 | Wallpaper display method and electronic device |
| WO2026065566A1 (en) * | 2024-09-30 | 2026-04-02 | 荣耀终端股份有限公司 | Desktop icon arrangement method, electronic device, and computer-readable storage medium |
| CN119311169A (en) * | 2024-10-28 | 2025-01-14 | 联想(北京)有限公司 | A processing method, device and equipment |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004112273A (en) * | 2002-09-18 | 2004-04-08 | Ricoh Co Ltd | Image forming device |
| CN103365639A (en) * | 2012-03-29 | 2013-10-23 | 宇龙计算机通信科技(深圳)有限公司 | Method, device and terminal for adjusting stand-by interface layout |
| KR101561827B1 (en) * | 2013-02-21 | 2015-10-20 | 주식회사 팬택 | Apparatus and method for processing object on screen of terminal |
| EP3091733A4 (en) * | 2013-12-31 | 2017-08-02 | Yulong Computer Telecommunication Scientific (Shenzhen) Co., Ltd. | Display method and terminal |
| CN105912189A (en) * | 2016-03-29 | 2016-08-31 | 乐视控股(北京)有限公司 | Method and device for arranging desktop icons |
| CN106201176B (en) * | 2016-06-24 | 2019-01-29 | 维沃移动通信有限公司 | Image display method and mobile terminal |
| CN106814932A (en) * | 2016-11-29 | 2017-06-09 | 深圳市金立通信设备有限公司 | A kind of desktop wallpaper display methods and terminal |
| CN108196754B (en) * | 2018-01-29 | 2020-06-23 | 维沃移动通信有限公司 | Method, terminal and server for displaying object |
| CN115129410B (en) * | 2022-06-14 | 2023-06-23 | 荣耀终端有限公司 | Desktop wallpaper configuration method, device, electronic device and readable storage medium |
-
2022
- 2022-06-14 CN CN202210669583.1A patent/CN115129410B/en active Active
-
2023
- 2023-04-18 WO PCT/CN2023/088946 patent/WO2023241209A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| WO2023241209A1 (en) | 2023-12-21 |
| WO2023241209A9 (en) | 2024-02-08 |
| CN115129410A (en) | 2022-09-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115129410B (en) | Desktop wallpaper configuration method, device, electronic device and readable storage medium | |
| CN113645351B (en) | Application interface interaction method, electronic device and computer-readable storage medium | |
| CN112130742B (en) | Full screen display method and device of mobile terminal | |
| CN109766036B (en) | Message processing method and electronic equipment | |
| WO2021103981A1 (en) | Split-screen display processing method and apparatus, and electronic device | |
| WO2020134869A1 (en) | Electronic device operating method and electronic device | |
| CN114546190A (en) | Application display method and electronic equipment | |
| WO2020029306A1 (en) | Image capture method and electronic device | |
| CN113986070A (en) | Quick viewing method for application card and electronic equipment | |
| WO2021042878A1 (en) | Photography method and electronic device | |
| WO2021036770A1 (en) | Split-screen processing method and terminal device | |
| CN112150499B (en) | Image processing method and related device | |
| CN114115770A (en) | Display control method and related device | |
| CN115967851A (en) | Quick photographing method, electronic device and computer readable storage medium | |
| WO2020118490A1 (en) | Automatic screen-splitting method, graphical user interface, and electronic device | |
| WO2022001258A1 (en) | Multi-screen display method and apparatus, terminal device, and storage medium | |
| WO2021218429A1 (en) | Method for managing application window, and terminal device and computer-readable storage medium | |
| CN116048358A (en) | Control method and related device for suspended ball | |
| WO2022143180A1 (en) | Collaborative display method, terminal device, and computer readable storage medium | |
| WO2023116411A1 (en) | Management method for application card, electronic device, and storage medium | |
| CN113934352B (en) | Notification message processing method, electronic device and computer-readable storage medium | |
| WO2023273543A1 (en) | Folder management method and apparatus | |
| CN115480682A (en) | A dragging method and electronic device | |
| CN118502624A (en) | Desktop management method and electronic equipment | |
| CN116709018B (en) | Zoom bar segmentation method and electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
| CP03 | Change of name, title or address |
