WO2022111593A1 - Graphical user interface display method and apparatus - Google Patents

Graphical user interface display method and apparatus Download PDF

Info

Publication number
WO2022111593A1
WO2022111593A1 PCT/CN2021/133215 CN2021133215W WO2022111593A1 WO 2022111593 A1 WO2022111593 A1 WO 2022111593A1 CN 2021133215 W CN2021133215 W CN 2021133215W WO 2022111593 A1 WO2022111593 A1 WO 2022111593A1
Authority
WO
WIPO (PCT)
Prior art keywords
light source
shadow
view control
electronic device
specified view
Prior art date
Application number
PCT/CN2021/133215
Other languages
French (fr)
Chinese (zh)
Inventor
范振华
杨婉艺
曹原
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022111593A1 publication Critical patent/WO2022111593A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

A graphical user interface (GUI) display method and apparatus, applied to an electronic device, the electronic device comprising a display screen for displaying a GUI, and the GUI comprising a specified view control having a depth attribute. The method may comprise: determining, according to a captured first image of a biological characteristic, the position of the biological characteristic with respect to a first light source of a display screen; generating and outputting a first shadow light effect for a specified view control according to the position of the first light source; determining, according to a captured second image of the biological characteristic, the position of the biological characteristic with respect to a second light source of the display screen; and generating and outputting a second shadow light effect for the specified view control according to the position of the second light source. The position of the first light source is different from the position of the second light source, and the first shadow light effect is different from the second shadow light effect, so that a shadow and a light effect of the specified view control can be dynamically displayed, and thus improving the sense of reality of the GUI.

Description

一种用户图形界面显示方法及其装置A kind of user graphic interface display method and device
本申请要求于2020年11月28日提交中国专利局、申请号为202011363058.4、申请名称为“一种用户图形界面显示方法及其装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on November 28, 2020 with the application number 202011363058.4 and the application title is "a method for displaying a graphical user interface and its device", the entire contents of which are incorporated by reference in in this application.
技术领域technical field
本申请涉及电子设备技术领域,具体涉及一种用户图形界面显示方法及其装置。The present application relates to the technical field of electronic equipment, and in particular, to a method and apparatus for displaying a user graphical interface.
背景技术Background technique
用户图形界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的一个图标、窗口、控件等界面元素,其中控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏等可视的界面元素。Graphical user interface (GUI) refers to a user interface related to computer operations displayed in a graphical manner. It can be an icon, window, control and other interface elements displayed on the display screen of the electronic device, wherein the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, etc. interface elements.
大多电子设备厂商采用单一、静态、固定的GUI,这种GUI无法满足用户日益增长的,对真实感的需求。因此,有些电子设备厂商在GUI中引入阴影和光效,以构建具有真实感的用户界面,从而提升用户体验。Most electronic equipment manufacturers use a single, static and fixed GUI, which cannot meet the increasing demands of users for realism. Therefore, some electronic equipment manufacturers introduce shadows and light effects in GUIs to build realistic user interfaces, thereby enhancing user experience.
目前,虽然在GUI中引入了阴影和光效,但是这种GUI依然是静态、固定的。At present, although shadows and light effects are introduced in the GUI, the GUI is still static and fixed.
发明内容SUMMARY OF THE INVENTION
本申请提供一种用户图形界面显示方法及其装置,可以动态地显示GUI中指定视图控件的阴影和光效,从而提高GUI的真实感。The present application provides a user graphical interface display method and device thereof, which can dynamically display the shadow and light effect of a specified view control in the GUI, thereby improving the realism of the GUI.
第一方面,本申请提供一种用户图形界面显示方法,该方法应用于电子设备,该电子设备包括用于显示用户图形界面的显示屏,该用户图形界面包括具有深度属性的指定视图控件。该方法包括:电子设备根据采集的生物特征的第一图像,确定第一光源的位置;根据第一光源的位置,针对指定视图控件生成并输出第一阴影光效;根据采集的生物特征的第二图像,确定第二光源的位置;根据第二光源的位置,针对指定视图控件生成并输出第二阴影光效。In a first aspect, the present application provides a method for displaying a graphical user interface. The method is applied to an electronic device, the electronic device includes a display screen for displaying a graphical user interface, and the graphical user interface includes a specified view control with a depth attribute. The method includes: the electronic device determines the position of the first light source according to the first image of the collected biological features; according to the position of the first light source, generating and outputting a first shadow light effect for a specified view control; according to the first image of the collected biological features Two images, determine the position of the second light source; according to the position of the second light source, generate and output the second shadow light effect for the specified view control.
其中,第一光源的位置和第二光源的位置为生物特征相对于显示屏的位置,且第一光源的位置不同于第二光源的位置,进而第一阴影光效不同于第二阴影光效。也即是说,不同的光源位置对同一指定视图控件而言,可以生成不同的阴影光效。The position of the first light source and the position of the second light source are the positions of the biological feature relative to the display screen, and the position of the first light source is different from the position of the second light source, and the first shadow light effect is different from the second shadow light effect. . That is to say, different light source positions can generate different shadow light effects for the same specified view control.
可见,同一指定视图控件的阴影光效可随着光源位置的变化而变化,从而实现指定视图控件的阴影效果的动态显示,有利于构建更具真实感的用户图形界面。It can be seen that the shadow light effect of the same specified view control can change with the change of the light source position, so as to realize the dynamic display of the shadow effect of the specified view control, which is beneficial to build a more realistic user graphical interface.
结合第一方面,在一种可能的实现方式中,电子设备根据采集的生物特征的第一图像,确定生物特征在第一图像中的第一图像位置,并估算生物特征相对于显示屏的距离;根据第一图像位置和距离,确定第一光源的位置。按照同样的方式,可以确定出第二光源的位置。With reference to the first aspect, in a possible implementation manner, the electronic device determines the first image position of the biometric feature in the first image according to the collected first image of the biometric feature, and estimates the distance of the biometric feature relative to the display screen ; Determine the position of the first light source according to the position and distance of the first image. In the same way, the position of the second light source can be determined.
可见,根据生物特征在图像中的位置以及相对于显示屏的距离,确定光源的位置,可以确保光源的位置的准确性。It can be seen that the position of the light source can be determined according to the position of the biological feature in the image and the distance relative to the display screen, which can ensure the accuracy of the position of the light source.
结合第一方面,在一种可能的实现方式中,在显示屏与水平方向的夹角在预设范围内的情况下,电子设备根据第一图像位置和距离,确定第一视角,并根据第一视角,确定第一光源的位置。显示屏与水平方向的夹角在预设范围内,可以理解为显示屏与水平方向垂直或接近垂直,该种情况下可以不考虑电子设备的姿态对光源位置的影响,减少计算量。In combination with the first aspect, in a possible implementation manner, when the angle between the display screen and the horizontal direction is within a preset range, the electronic device determines the first viewing angle according to the position and distance of the first image, and determines the first viewing angle according to the first image position and distance. A viewing angle is used to determine the position of the first light source. If the angle between the display screen and the horizontal direction is within the preset range, it can be understood that the display screen is vertical or nearly vertical to the horizontal direction. In this case, the influence of the posture of the electronic device on the position of the light source can be ignored, and the amount of calculation can be reduced.
结合第一方面,在一种可能的实现方式中,在显示屏与水平方向的夹角不在预设范围内,电子设备根据显示屏与水平方向的夹角、第一图像位置和距离,确定第二视角,并根据第二视角,确定第一光源的位置。显示屏与水平方向的夹角不在预设范围内,可以理解为显示屏倾斜角度较大,该种情况下考虑电子设备的姿态对光源位置的影响,进而可以准确性较高的光源位置。In combination with the first aspect, in a possible implementation manner, when the angle between the display screen and the horizontal direction is not within the preset range, the electronic device determines the first image according to the angle between the display screen and the horizontal direction, the position and distance of the first image. There are two viewing angles, and the position of the first light source is determined according to the second viewing angle. If the angle between the display screen and the horizontal direction is not within the preset range, it can be understood that the tilt angle of the display screen is relatively large. In this case, considering the influence of the posture of the electronic device on the position of the light source, the position of the light source with higher accuracy can be obtained.
可见,视角的改变将改变光源的位置,进而针对同一指定视图控件,可以生成不同的阴影光效。It can be seen that the change of the viewing angle will change the position of the light source, and then different shadow light effects can be generated for the same specified view control.
结合第一方面,在一种可能的实现方式中,第一阴影光效包括第一阴影。电子设备根据第一光源的位置、第一光源的强度和指定视图控件的材质属性信息,针对指定视图控件生成并输出第一阴影。电子设备在生成阴影时,不仅考虑光源位置和光源强度,还考虑材质属性信息,可以丰富阴影效果,使得阴影效果与材质更加贴合。With reference to the first aspect, in a possible implementation manner, the first shadow light effect includes a first shadow. The electronic device generates and outputs a first shadow for the specified view control according to the position of the first light source, the intensity of the first light source and the material attribute information of the specified view control. When generating shadows, electronic devices not only consider the position and intensity of the light source, but also the material attribute information, which can enrich the shadow effect and make the shadow effect more suitable for the material.
结合第一方面,在一种可能的实现方式中,电子设备根据第一光源的位置和第一光源的强度,确定主体模糊半径;根据第一光源的位置和指定视图控件的材质属性信息,确定投影模糊信息;根据主体模糊半径和投影模糊信息,针对指定视图控件生成并输出第一阴影。该方式不仅适用于矩形、圆角矩形和圆形的指定视图控件,还适用于其他形状的指定视图控件,适用范围更广。With reference to the first aspect, in a possible implementation manner, the electronic device determines the blur radius of the subject according to the position of the first light source and the intensity of the first light source; and determines the blur radius of the subject according to the position of the first light source and the material attribute information of the specified view control. Projection blur information; according to the subject blur radius and projection blur information, generate and output the first shadow for the specified view control. This method is not only applicable to specified view controls of rectangle, rounded rectangle and circle, but also to specified view controls of other shapes, and has a wider application range.
其中,指定视图控件的材质属性信息可以包括折射率、反射率、漫反射率或透明度中的一种或多种。材质可以包括背景材质、边框材质或背板材质中的一种或多种。也即是说,指定视图控件的材质属性信息不同,可以生成不同轻重、颜色的阴影和不同效果的光效。Wherein, the material property information of the specified view control may include one or more of refractive index, reflectance, diffuse reflectance or transparency. Materials can include one or more of background materials, border materials, or backplane materials. That is to say, if the material property information of the specified view control is different, shadows of different weights, colors, and light effects of different effects can be generated.
结合第一方面,在一种可能的实现方式中,第一阴影光效包括第一光效。电子设备根据第一光源的位置、第一光源的强度和指定视图控件的原始颜色信息,针对指定视图控件生成并输出第一光效。也即是说,若电子设备确定的光源的位置、光源的强度、和/或指定视图控件的原始颜色信息不同,生成的光效就不同,从而可以达到动态显示指定视图控件的目的。With reference to the first aspect, in a possible implementation manner, the first shadow light effect includes a first light effect. The electronic device generates and outputs a first light effect for the specified view control according to the position of the first light source, the intensity of the first light source and the original color information of the specified view control. That is to say, if the position of the light source, the intensity of the light source, and/or the original color information of the specified view control determined by the electronic device are different, the generated light effect will be different, so that the purpose of dynamically displaying the specified view control can be achieved.
结合第一方面,在一种可能的实现方式中,第一阴影光效包括第一光效。电子设备根据第一光源的位置,确定径向渐变半径;根据第一光源的强度,确定高斯模糊半径;根据径向渐变半径和高斯模糊半径,针对指定视图控件生成并输出第一光效。也即是说,电子设备确定的光源的位置或光源的强度不同,径向渐变半径和高斯模糊半径不同,从而生成的光效不同。With reference to the first aspect, in a possible implementation manner, the first shadow light effect includes a first light effect. The electronic device determines the radial gradient radius according to the position of the first light source; determines the Gaussian blur radius according to the intensity of the first light source; generates and outputs the first light effect for the specified view control according to the radial gradient radius and the Gaussian blur radius. That is to say, the position of the light source or the intensity of the light source determined by the electronic device is different, the radial gradient radius and the Gaussian blur radius are different, and thus the generated light effects are different.
第二方面,本申请提供了一种用户图形界面显示方法,该方法应用于电子设备,该电子设备包括用于显示用户图形界面的显示屏,该用户图形界面包括具有深度属性的指定视图控件。该方法包括:电子设备获取电子设备相对于预设光源的第一位置;根据第一位置和预设光源的位置,针对指定视图控件生成并输出第一阴影光效;获取电子设备相对于预设光源的第二位置;根据第二位置和预设光源的位置,针对指定视图控件生成并输出第二阴影光效。In a second aspect, the present application provides a method for displaying a graphical user interface, the method is applied to an electronic device, the electronic device includes a display screen for displaying a graphical user interface, and the graphical user interface includes a specified view control with a depth attribute. The method includes: the electronic device obtains a first position of the electronic device relative to a preset light source; according to the first position and the position of the preset light source, generating and outputting a first shadow light effect for a specified view control; obtaining the electronic device relative to a preset light source The second position of the light source; according to the second position and the position of the preset light source, generate and output a second shadow light effect for the specified view control.
其中,第一位置不同于第二位置,进而第一阴影光效不同于第二阴影光效。也即是说,预设光源的位置固定,电子设备相对于预设光源的位置不同,针对同一指定视图控件,可以生成不同的阴影光效。第一位置不同于第二位置,可以理解为电子设备的姿态不同。The first position is different from the second position, and the first shadow light effect is different from the second shadow light effect. That is to say, the position of the preset light source is fixed, the position of the electronic device relative to the preset light source is different, and different shadow light effects can be generated for the same specified view control. The difference between the first position and the second position can be understood as the different postures of the electronic device.
可见,同一指定视图控件的阴影光效可随着电子设备的姿态变化而变化,从而实现指定视图控件的阴影效果的动态显示,有利于构建更具真实感的用户图形界面。该方法根据电子设备的字条生成阴影光效,功耗较低。It can be seen that the shadow light effect of the same specified view control can change with the posture of the electronic device, so as to realize the dynamic display of the shadow effect of the specified view control, which is conducive to building a more realistic user graphical interface. The method generates a shadow light effect according to the word strip of the electronic device, and has low power consumption.
结合第二方面,在一种可能的实现方式中,第一阴影效果包括第一阴影。电子设备根据第一位置、预设光源的位置、第一光源的强度和指定视图控件的材质属性信息,针对指定视 图控件生成并输出第一阴影。电子设备在生成阴影时,不仅考虑光源位置和光源强度,还考虑材质属性信息,可以丰富阴影效果,使得阴影效果与材质更加贴合。With reference to the second aspect, in a possible implementation manner, the first shadow effect includes a first shadow. The electronic device generates and outputs a first shadow for the specified view control according to the first position, the position of the preset light source, the intensity of the first light source, and the material attribute information of the specified view control. When generating shadows, electronic devices not only consider the position and intensity of the light source, but also the material attribute information, which can enrich the shadow effect and make the shadow effect more suitable for the material.
其中,指定视图控件的材质属性信息包括折射率、反射率、漫反射率或透明度中的一种或多种。材质可以包括背景材质、边框材质或背板材质中的一种或多种。也即是说,指定视图控件的材质属性信息不同,可以生成不同轻重、颜色的阴影和不同效果的光效。Wherein, the material property information of the specified view control includes one or more of refractive index, reflectance, diffuse reflectance or transparency. Materials can include one or more of background materials, border materials, or backplane materials. That is to say, if the material property information of the specified view control is different, shadows of different weights, colors, and light effects of different effects can be generated.
结合第二方面,在一种可能的实现方式中,第一阴影光效包括第一光效。电子设备根据第一位置、预设光源的位置、第一光源的强度和指定视图控件的原始颜色信息,针对指定视图控件生成并输出所述第一光效。也即是说,电子设备确定的第一位置、预设光源的位置、光源的强度、和/或指定视图控件的原始颜色信息不同,生成的光效就不同,从而可以达到动态显示指定视图控件的目的。With reference to the second aspect, in a possible implementation manner, the first shadow light effect includes the first light effect. The electronic device generates and outputs the first light effect for the specified view control according to the first position, the position of the preset light source, the intensity of the first light source, and the original color information of the specified view control. That is to say, if the first position determined by the electronic device, the position of the preset light source, the intensity of the light source, and/or the original color information of the specified view control are different, the generated light effects will be different, so that the specified view control can be dynamically displayed. the goal of.
结合第二方面,在一种可能的实现方式中,电子设备根据第一位置和预设光源的位置,确定径向渐变半径;根据第一位置和预设光源的强度,确定高斯模糊半径;根据径向渐变半径和高斯模糊半径,针对指定视图控件生成并输出第一光效。也即是说,电子设备相对于预设光源的位置或预设光源的强度不同,径向渐变半径和高斯模糊半径不同,从而生成的光效不同。With reference to the second aspect, in a possible implementation manner, the electronic device determines the radial gradient radius according to the first position and the position of the preset light source; determines the Gaussian blur radius according to the first position and the intensity of the preset light source; Radial gradient radius and Gaussian blur radius, generate and output the first light effect for the specified view control. That is to say, the position of the electronic device relative to the preset light source or the intensity of the preset light source is different, the radial gradient radius and the Gaussian blur radius are different, and thus the generated light effects are different.
第三方面,提供一种用户图形界面显示装置,该用户图形界面显示装置具有实现上述第一方面或第二方面所述的电子设备的部分或全部功能。比如,装置的功能可具备本申请中电子设备的部分或全部实施例中的功能,也可以具备单独实施本申请中的任一实施例的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的单元或模块。In a third aspect, a user graphical interface display device is provided, and the user graphical interface display device has part or all of the functions of the electronic device described in the first aspect or the second aspect. For example, the function of the apparatus may have the function of some or all of the embodiments of the electronic device in the present application, and may also have the function of independently implementing any embodiment of the present application. The functions can be implemented by hardware, or can be implemented by hardware executing corresponding software. The hardware or software includes one or more units or modules corresponding to the above functions.
在一种可能的设计中,该用户图形界面显示装置的结构中可包括处理单元和显示单元,所述处理单元被配置为支持用户图形界面显示装置执行上述方法中相应的功能。所述显示单元被配置为显示用户图形界面显示装置执行上述方法中相应的输出阴影光效。所述用户图形界面显示装置还可以包括存储单元,所述存储单元用于与处理单元和显示单元耦合,其保存用户图形界面显示装置必要的程序指令和数据。In a possible design, the structure of the user graphic interface display device may include a processing unit and a display unit, and the processing unit is configured to support the user graphic interface display device to perform the corresponding functions in the above method. The display unit is configured to display the corresponding output shadow light effect in the above-mentioned method performed by the user graphical interface display device. The user graphical interface display device may further include a storage unit, which is used for coupling with the processing unit and the display unit, and stores necessary program instructions and data of the user graphical interface display device.
结合第三方面,在一种可能的实施方式中,上述用户图形界面显示装置包括:With reference to the third aspect, in a possible implementation manner, the above-mentioned user graphical interface display device includes:
处理单元,用于根据采集的生物特征的第一图像,确定第一光源的位置;根据第一光源的位置,针对指定视图控件生成第一阴影光效;a processing unit, configured to determine the position of the first light source according to the collected first image of the biological feature; generate a first shadow light effect for the specified view control according to the position of the first light source;
显示单元,用于输出第一阴影光效;a display unit for outputting the first shadow light effect;
处理单元,还用于根据采集的生物特征的第二图像,确定第二光源的位置;根据第二光源的位置,针对指定视图控件生成第二阴影光效;The processing unit is further configured to determine the position of the second light source according to the collected second image of the biological feature; according to the position of the second light source, generate a second shadow light effect for the specified view control;
显示单元,还用于输出第二阴影光效;a display unit, further used for outputting a second shadow light effect;
其中,第一光源的位置和第二光源的位置为生物特征相对于显示屏的位置,且第一光源的位置不同于第二光源的位置;第一阴影光效不同于第二阴影光效。Wherein, the position of the first light source and the position of the second light source are the positions of the biological feature relative to the display screen, and the position of the first light source is different from the position of the second light source; the first shadow light effect is different from the second shadow light effect.
该实施方式的相关内容可参见上述第一方面的相关内容,此处不再详述。For the relevant content of this embodiment, reference may be made to the relevant content of the above-mentioned first aspect, which will not be described in detail here.
结合第三方面,在一种可能的实施方式中,上述用户图形界面显示装置包括:With reference to the third aspect, in a possible implementation manner, the above-mentioned user graphical interface display device includes:
处理单元,用于获取电子设备相对于预设光源的第一位置;根据第一位置和预设光源的位置,针对指定视图控件生成第一阴影光效;a processing unit for acquiring a first position of the electronic device relative to the preset light source; generating a first shadow light effect for a specified view control according to the first position and the position of the preset light source;
显示单元,用于输出第一阴影光效;a display unit for outputting the first shadow light effect;
处理单元,还用于获取电子设备相对于预设光源的第二位置;根据第二位置和预设光源的位置,针对指定视图控件生成第二阴影光效;The processing unit is further configured to obtain a second position of the electronic device relative to the preset light source; according to the second position and the position of the preset light source, generate a second shadow light effect for the specified view control;
显示单元,还用于输出第二阴影光效;a display unit, further used for outputting a second shadow light effect;
其中,第一位置不同于第二位置,第一阴影光效不同于第二阴影光效。Wherein, the first position is different from the second position, and the first shadow light effect is different from the second shadow light effect.
该实施方式的相关内容可参见上述第二方面的相关内容,此处不再详述。For the relevant content of this embodiment, reference may be made to the relevant content of the above-mentioned second aspect, which will not be described in detail here.
第四方面,本申请提供一种用户图形界面显示装置,包括显示屏,存储器,一个或多个处理器,多个应用程序,以及一个或多个程序。其中,一个或多个程序被存储在存储器中,一个或多个处理器在执行一个或多个程序时,使得用户图形界面显示装置实现第一方面或第二方面描述的方法。In a fourth aspect, the present application provides a user graphical interface display device, including a display screen, a memory, one or more processors, multiple application programs, and one or more programs. Wherein, one or more programs are stored in the memory, and when the one or more processors execute the one or more programs, the user graphical interface display device implements the method described in the first aspect or the second aspect.
第五方面,本申请提供一种计算机设备,包括存储器,处理器以及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时,使得计算机设备实现第一方面或第二方面描述的方法。In a fifth aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the computer device implements the first aspect or the second aspect. method described in the aspect.
第六方面,本申请提供一种包含指令的计算机程序产品,当上述计算机程序产品在电子设备上运行时,使得上述电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法;或执行如第二方面以及第二方面中任一可能的实现方式描述的方法。In a sixth aspect, the present application provides a computer program product containing instructions, when the computer program product is run on an electronic device, the electronic device is made to execute the first aspect and any possible implementation of the first aspect. method; or performing the method as described in the second aspect and any possible implementation manner of the second aspect.
第七方面,本申请提供一种计算机可读存储介质,包括指令,当上述指令在电子设备上运行时,使得上述电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法;或执行如第二方面以及第二方面中任一可能的实现方式描述的方法。In a seventh aspect, the present application provides a computer-readable storage medium, comprising instructions that, when the above-mentioned instructions are executed on an electronic device, cause the above-mentioned electronic device to execute as described in the first aspect and any possible implementation manner of the first aspect method; or performing the method as described in the second aspect and any possible implementation manner of the second aspect.
附图说明Description of drawings
图1为手机的三维坐标轴的示例图;Fig. 1 is an example diagram of a three-dimensional coordinate axis of a mobile phone;
图2为指定视图控件在光源作用下的阴影效果的示例图;Figure 2 is an example diagram of the shadow effect of the specified view control under the action of the light source;
图3为一实施例提供的电子设备的结构的示意图;3 is a schematic diagram of a structure of an electronic device provided by an embodiment;
图4为本申请实施例提供的一种用户图形界面显示方法的流程示意图;4 is a schematic flowchart of a method for displaying a graphical user interface provided by an embodiment of the present application;
图5为本申请实施例提供的第一图像的示例图;FIG. 5 is an example diagram of a first image provided by an embodiment of the present application;
图6为本申请实施例提供的第一图像与显示屏的示例图;FIG. 6 is an example diagram of a first image and a display screen provided by an embodiment of the present application;
图7-1为本申请实施例提供的一种确定第一光源的位置的示例图;FIG. 7-1 is an exemplary diagram of determining the position of the first light source according to an embodiment of the present application;
图7-2为本申请实施例提供的另一种确定第一光源的位置的示例图;FIG. 7-2 is another exemplary diagram of determining the position of the first light source provided by the embodiment of the present application;
图8为本申请实施例提供的生成第一阴影的示例图;FIG. 8 is an example diagram of generating a first shadow provided by an embodiment of the present application;
图9为本申请实施例提供的生成第一光效的示例图;FIG. 9 is an example diagram of generating a first light effect provided by an embodiment of the present application;
图10为本申请实施例提供的一个示例图;FIG. 10 is an example diagram provided by the embodiment of the present application;
图11为本申请实施例提供的另一个示例图;FIG. 11 is another example diagram provided by an embodiment of the present application;
图12为本申请实施例提供的另一种用户图形界面显示方法的流程示意图;12 is a schematic flowchart of another method for displaying a graphical user interface provided by an embodiment of the present application;
图13为本申请实施例提供的又一个示例图;FIG. 13 is another example diagram provided by an embodiment of the present application;
图14为本申请实施例提供的用户图形界面显示装置的示意图。FIG. 14 is a schematic diagram of a user graphical interface display device provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations of the present application. As used in the specification of this application and the appended claims, the singular expressions "a," "an," "the," "above," "the," and "the" are intended to also Plural expressions are included unless the context clearly dictates otherwise. It will also be understood that, as used in this application, the term "and/or" refers to and includes any and all possible combinations of one or more of the listed items.
本申请涉及电子设备技术领域。在一些实施例中,电子设备可以是还包含其他功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯 功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2021133215-appb-000001
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如具有触敏表面或触控面板的膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是具有触敏表面或触控面板的台式计算机。
The present application relates to the technical field of electronic equipment. In some embodiments, the electronic device may be a portable electronic device that also includes other functions such as personal digital assistant and/or music player functions, such as a cell phone, tablet computer, wearable electronic device with wireless communication capabilities (eg, a smart watch) Wait. Exemplary embodiments of portable electronic devices include, but are not limited to, carry-on
Figure PCTCN2021133215-appb-000001
Or portable electronic devices with other operating systems. The portable electronic device described above may also be other portable electronic devices, such as a laptop computer (Laptop) with a touch-sensitive surface or a touch panel, or the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer having a touch-sensitive surface or a touch panel.
本申请的说明书和权利要求书及附图中的术语“用户图形界面”,是用户界面(user interface,UI)常用的表现形式。UI是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。应用程序的用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在终端设备上经过解析,渲染,最终呈现为用户可以识别的内容,比如图片、文字、按钮等控件。控件(control)也称为部件(widget),是用户界面的基本元素,典型的控件有工具栏(toolbar)、菜单栏(menu bar)、文本框(text box)、按钮(button)、滚动条(scrollbar)、图片和文本。界面中的控件的属性和内容是通过标签或者节点来定义的,比如XML通过<Textview>、<ImgView>、<VideoView>等节点来规定界面所包含的控件。一个节点对应界面中一个控件或属性,节点经过解析和渲染之后呈现为用户可视的内容。此外,很多应用程序,比如混合应用(hybrid application)的界面中通常还包含有网页。网页,也称为页面,可以理解为内嵌在应用程序界面中的一个特殊的控件,网页是通过特定计算机语言编写的源代码,例如超文本标记语言(hyper text markup language,GTML),层叠样式表(cascading style sheets,CSS),java脚本(JavaScript,JS)等,网页源代码可以由浏览器或与浏览器功能类似的网页显示组件加载和显示为用户可识别的内容。网页所包含的具体内容也是通过网页源代码中的标签或者节点来定义的,比如GTML通过<p>、<img>、<video>、<canvas>来定义网页的元素和属性。The term "user graphical interface" in the description, claims and drawings of this application is a commonly used expression form of user interface (UI). UI is a medium interface for interaction and information exchange between application programs or operating systems and users, and it realizes the conversion between the internal form of information and the form acceptable to users. The user interface of the application is the source code written in a specific computer language such as java and extensible markup language (XML). Such as pictures, text, buttons and other controls. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, and scroll bars. (scrollbar), pictures and text. The attributes and content of controls in the interface are defined by tags or nodes. For example, XML specifies the controls contained in the interface through nodes such as <Textview>, <ImgView>, and <VideoView>. A node corresponds to a control or property in the interface, and the node is rendered as user-visible content after parsing and rendering. In addition, many applications, such as hybrid applications, often contain web pages in their interface. A web page, also known as a page, can be understood as a special control embedded in an application interface. A web page is source code written in a specific computer language, such as hypertext markup language (GTML), cascading styles Tables (cascading style sheets, CSS), java scripts (JavaScript, JS), etc., the source code of the web page can be loaded and displayed as user-identifiable content by a browser or a web page display component similar in function to a browser. The specific content contained in a web page is also defined by tags or nodes in the source code of the web page. For example, GTML defines the elements and attributes of web pages through <p>, <img>, <video>, and <canvas>.
用户图形界面是指采用图形方式显示的与计算机操作相关的用户界面。用户图形界面可以是在电子设备的显示屏中显示的一个图标、窗口、控件等界面元素,其中控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。Graphical user interface refers to a user interface related to computer operation displayed in a graphical manner. The user graphical interface can be an icon, window, control or other interface elements displayed on the display screen of the electronic device, wherein the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets and other visual interface elements.
本申请实施例提供一种用户图形界面显示方法及其装置,可以动态地显示用户图形界面中指定视图控件的阴影和光效,从而提供用户图形界面的真实感。The embodiments of the present application provide a user graphical interface display method and device thereof, which can dynamically display shadows and light effects of specified view controls in the user graphical interface, thereby providing a realistic sense of the user graphical interface.
在本申请实施例中,用户图形显示界面包括具有深度(depth)属性的指定视图控件。视图控件可以是用户图形界面中的图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏等可视的界面元素。指定视图控件指的是,具有深度属性的视图控件。深度属性也可以描述为Z轴属性、海拔(elevation)属性或高度属性等名称。可以理解的是,指定视图控件在常规的具有X轴和Y轴属性的视图控件的基础上,增加Z轴属性。In this embodiment of the present application, the user graphical display interface includes a specified view control with a depth attribute. View controls can be visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, and navigation bars in a user graphical interface. The specified view control refers to a view control with a depth property. The depth attribute can also be described as a Z-axis attribute, an elevation attribute, or an altitude attribute, among other names. It can be understood that the specified view control adds a Z-axis attribute on the basis of a conventional view control with X-axis and Y-axis attributes.
电子设备以手机为例,Android系统对手机三维坐标轴的定义可参见图1所示。图1的A中,手机的短轴为X轴,长轴为Y轴,垂直手机显示屏向上为Z轴;图1的B中,手机的短轴为Y轴,长轴为X轴,垂直手机显示屏向上为Z轴。The electronic device takes a mobile phone as an example, and the definition of the three-dimensional coordinate axis of the mobile phone by the Android system can be seen in Figure 1. In A of Figure 1, the short axis of the mobile phone is the X axis, the long axis is the Y axis, and the vertical upward direction of the mobile phone display is the Z axis; in B of Figure 1, the short axis of the mobile phone is the Y axis, the long axis is the X axis, and the vertical axis is the X axis. The screen of the mobile phone is the Z-axis upwards.
指定视图控件在光源的作用下,可以产生阴影效果。例如,可参见图2所示,指定视图控件以按钮为例,该按钮的深度属性从0dp变为6dp,可产生阴影效果;该按钮的深度属性从6dp变为0dp,无阴影效果。图2中,深度属性为6dp的按钮,其阴影效果具有两重效果,分别为环境光阴影效果和点光源阴影效果。在深度属性的值固定的情况下,图2所示的阴影效果是静态、固定的,不会随着手机姿态的改变而改变,也不会随着用户眼睛位置的改变而改变。Specifies that the view control can produce shadow effects under the action of the light source. For example, as shown in Figure 2, the specified view control takes a button as an example. The button's depth attribute changes from 0dp to 6dp, which can produce a shadow effect; the button's depth attribute changes from 6dp to 0dp, without shadow effect. In Figure 2, a button with a depth attribute of 6dp has two shadow effects, namely the ambient light shadow effect and the point light shadow effect. In the case where the value of the depth attribute is fixed, the shadow effect shown in Figure 2 is static and fixed, and will not change with the change of the posture of the mobile phone, nor will it change with the change of the user's eye position.
指定视图控件在光源的作用下,除了可以产生阴影效果之外,还可以产生光效效果。平行光的光效效果与光线的方向和受光照平面的朝向有关。当光线的方向与受光照平面呈90度角时,光效效果最强;当光线的方向与受光照平面之间的夹角逐渐变小,光效效果逐渐变弱;当光线的方向与受光照平面平行时,此时没有光照射到受光照平面上,光强为0,无光效效果。点光源的光效效果不仅与光线的方向和受光照平面的朝向有关,还与光强、光的颜色有关,应用在本申请中,光效效果还与指定视图控件的原始颜色有关。Under the action of the light source, the specified view control can not only produce shadow effects, but also light effects. The light effect of parallel light is related to the direction of the light and the orientation of the illuminated plane. When the direction of the light is at a 90-degree angle to the illuminated plane, the light effect is the strongest; when the angle between the direction of the light and the illuminated plane gradually decreases, the light effect gradually becomes weaker; When the illumination plane is parallel, no light is irradiated on the illuminated plane, the light intensity is 0, and there is no light effect. The light effect of a point light source is not only related to the direction of the light and the orientation of the illuminated plane, but also to the light intensity and color of the light. In this application, the light effect is also related to the original color of the specified view control.
可以理解的是,“指定视图控件”、“深度属性”、“阴影”、“光效”等词语是本申请实施例中使用的一些词语,代表的含义在本申请实施例中已记载,并不构成对本申请实施例的限定。“阴影”也可以被称为例如“阴影效果”等其他名词,“光效”也可以被称为例如“光效效果”或“光照效果”等其他名词。在本申请实施例中,用“阴影光效”来描述“阴影”和“光效”两种效果,即“阴影光效”可以包括“阴影”和/或“光效”。It can be understood that words such as "specified view control", "depth attribute", "shadow", and "light effect" are some words used in the embodiments of the present application, and their meanings have been recorded in the embodiments of the present application, and It does not constitute a limitation to the embodiments of the present application. "Shadow" may also be referred to as other terms such as "shadow effect", and "light effect" may also be referred to as other terms such as "light effect" or "light effect". In this embodiment of the present application, "shadow light effect" is used to describe two effects of "shadow" and "light effect", that is, "shadow light effect" may include "shadow" and/or "light effect".
首先介绍本申请以下实施例中提供的示例性电子设备100。First, the exemplary electronic device 100 provided in the following embodiments of the present application is introduced.
图3示出了电子设备100的结构示意图。FIG. 3 shows a schematic structural diagram of the 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 processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do 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 less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber  identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may 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 typically used to connect the processor 110 with the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically 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 to play audio through the headphones. The 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 illustrated in the embodiments 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 charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏 194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a separate device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110, and be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,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),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems, SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can 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 diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
在本申请实施例中,显示屏194可用于显示指定视图控件的阴影和光效。电子设备显示指定视图控件的阴影光效的方式可参照后续实施例的相关描述,在此不再赘述。In this embodiment of the present application, the display screen 194 may be used to display shadows and light effects of specified view controls. For the manner in which the electronic device displays the shadow light effect of the specified view control, reference may be made to the related descriptions in the subsequent embodiments, and details are not described herein again.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element 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 tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided 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的正整数。进一步的,电子设备100可以包括1个或多个后置摄像头,还可以包括1个或多个前置摄像头。后置摄像头通常位于显示屏194的背面,前置摄像头通常位于显示屏194这一面。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical 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 formats of 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. Further, the electronic device 100 may include one or more rear cameras, and may also include one or more front cameras. The rear camera is usually located on the back of the display screen 194 , and the front camera is usually located on the side of the display screen 194 .
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it 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 frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备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 of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电 子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。Internal memory 121 may be used to store computer executable program code, which includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D can be the USB interface 130, or can be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of 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 the 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 whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by 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 offset the shaking of the electronic device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of 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测距以实现快速对焦。Distance sensor 180F for measuring distance. The electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance 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 to the outside 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 can 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 holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense 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 a 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 realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering 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 the temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to 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所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may 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 touch operations may be provided through 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 location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations 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, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, 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 SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
图3示例性所示的电子设备100可以通过显示屏194在GUI中动态显示指定视图控件。在一些实施例中,电子设备100可以通过摄像头193采集的图像,确定不同的光源位置,进而动态显示指定视图控件的阴影光效。在一些实施例中,电子设备100可以通过陀螺仪传感器180B、加速度传感器180E等检测用户手持电子设备100的姿态,进而根据不同的姿态,动态显示视图控件的阴影光效。在一些实施例中,电子设备100可以通过摄像头193采集的图像以及陀螺仪传感器180B、加速度传感器180E等检测用户手持电子设备100的姿态,动态显示指定视图控件的阴影光效。The electronic device 100 exemplarily shown in FIG. 3 may dynamically display designated view controls in the GUI through the display screen 194 . In some embodiments, the electronic device 100 may determine the positions of different light sources through the images captured by the camera 193, and then dynamically display the shadow light effects of the specified view controls. In some embodiments, the electronic device 100 may detect the posture of the user holding the electronic device 100 through the gyro sensor 180B, the acceleration sensor 180E, etc., and then dynamically display the shadow light effect of the view control according to different postures. In some embodiments, the electronic device 100 can detect the gesture of the user holding the electronic device 100 through the image collected by the camera 193 and the gyro sensor 180B, the acceleration sensor 180E, etc., and dynamically display the shadow light effect of the specified view control.
下面将介绍本申请提供的用户图形界面显示方法。The following will introduce the user graphical interface display method provided by the present application.
请参见图4,为本申请实施例提供的一种用户图形界面显示方法的流程示意图,该流程可以但不限于如下步骤:Please refer to FIG. 4 , which is a schematic flowchart of a method for displaying a graphical user interface provided by an embodiment of the present application. The process may be but not limited to the following steps:
步骤401,根据采集的生物特征的第一图像,确定第一光源的位置。Step 401: Determine the position of the first light source according to the collected first image of the biological feature.
其中,生物是指具有动能的生物体,例如可以是人、猫、狗等。在本申请实施例中,生物以人为例,即用户。生物特征通常具有唯一性(与其他生物不同),可用于测量、识别、验证等。生物特征可以包括但不限于眼睛、鼻子、嘴巴、脸、虹膜、指纹等。在本申请实施例中,生物特征以眼睛为例。Wherein, the organism refers to an organism with kinetic energy, such as a human, a cat, a dog, and the like. In the embodiments of the present application, the creature takes a human as an example, that is, a user. Biometrics are often unique (unlike other living things) and can be used for measurement, identification, verification, etc. Biometrics may include, but are not limited to, eyes, nose, mouth, face, iris, fingerprints, and the like. In the embodiments of the present application, the biological feature takes eyes as an example.
在一种实现方式中,电子设备100启动前置摄像头,并通过前置摄像头采集生物特征的第一图像,第一图像包括眼睛,可以是图5中的A所示的完整的面部图像,也可以是图5中的B所示的只包括眼睛的图像,眼睛在第一图像中的位置与前置摄像头的焦距以及眼睛相对于显示屏194的距离有关。在不考虑显示屏厚度的情况下,眼睛相对于显示屏194的距离可以理解为眼睛相对于电子设备100的距离。In an implementation manner, the electronic device 100 starts the front camera, and collects the first image of the biometric feature through the front camera. The first image includes eyes, which can be the complete facial image shown in A in FIG. The image shown in B in FIG. 5 only includes the eyes, and the position of the eyes in the first image is related to the focal length of the front camera and the distance of the eyes relative to the display screen 194 . Without considering the thickness of the display screen, the distance of the eyes relative to the display screen 194 can be understood as the distance of the eyes relative to the electronic device 100 .
在另一种实现方式中,电子设备100将预置的面容(face)标识(identify,ID)或采集的面容ID作为第一图像。面容ID用于进行面部识别,应用在本申请实施例中,面容ID还用于确定光源的位置,将面容ID中的眼睛作为光源。电子设备100可预先通过摄像头193采集面容ID,并存储,将其作为预置的面容ID。In another implementation manner, the electronic device 100 uses a preset face (face) identification (identify, ID) or a collected face ID as the first image. The face ID is used for face recognition, and in the embodiment of the present application, the face ID is also used to determine the position of the light source, and the eyes in the face ID are used as the light source. The electronic device 100 may collect the face ID through the camera 193 in advance, and store it as a preset face ID.
电子设备100根据第一图像,确定第一光源的位置。第一光源的位置为眼睛相对于显示屏的位置。具体的,电子设备100根据眼睛在第一图像中的第一图像位置和眼睛相对于显示 屏的距离,确定第一光源的位置。The electronic device 100 determines the position of the first light source according to the first image. The position of the first light source is the position of the eye relative to the display screen. Specifically, the electronic device 100 determines the position of the first light source according to the first image position of the eye in the first image and the distance of the eye relative to the display screen.
其中,第一图像位置可包括左眼在第一图像中的位置,和/或右眼在第一图像中的位置。电子设备100可通过人眼识别算法,识别出第一图像中的眼睛,进而确定出第一图像位置。或,电子设备100可通过面部识别算法,识别出第一图像中的人脸,进而通过眼睛与人脸的比例,确定出第一图像位置。电子设备100如何确定第一图像位置的方法,在本申请实施例中不作限定。The first image position may include the position of the left eye in the first image, and/or the position of the right eye in the first image. The electronic device 100 can identify the eye in the first image through a human eye recognition algorithm, and then determine the position of the first image. Or, the electronic device 100 may identify the human face in the first image through a face recognition algorithm, and then determine the position of the first image through the ratio of the eyes to the human face. The method for how the electronic device 100 determines the position of the first image is not limited in this embodiment of the present application.
眼睛相对于显示屏的距离,可以理解为眼睛相对于显示屏的垂直距离,也即第一图像相对于显示屏的垂直距离。电子设备100可通过面部面积、第一图像的面积,以及前置摄像头的预置焦距,估算眼睛相对于显示屏的距离。具体的,可如下公式,估算眼睛相对于显示屏的距离。The distance of the eye relative to the display screen can be understood as the vertical distance of the eye relative to the display screen, that is, the vertical distance of the first image relative to the display screen. The electronic device 100 can estimate the distance of the eyes relative to the display screen according to the face area, the area of the first image, and the preset focal length of the front camera. Specifically, the following formula can be used to estimate the distance of the eye relative to the display screen.
距离=面部面积/第一图像的面积*换算系数Distance = face area / area of the first image * conversion factor
其中,换算系数与预置焦距以及采集第一图像时的焦距有关,具体关系以及具体数值在本申请实施例中不作限定。为进一步提高该距离的精确度,可使用双眼间距的方法,来辅助计算距离。电子设备100也可采用其他方法计算得到眼睛相对于显示屏的距离,本申请实施例中不限定如何计算得到眼睛相对于显示屏的距离。The conversion coefficient is related to the preset focal length and the focal length when the first image is collected, and the specific relationship and specific value are not limited in the embodiments of the present application. To further improve the accuracy of the distance, the method of distance between eyes can be used to assist in calculating the distance. The electronic device 100 may also use other methods to calculate the distance between the eyes and the display screen, and the embodiment of the present application does not limit how to calculate the distance between the eyes and the display screen.
电子设备100在得到第一图像位置和上述距离的情况下,确定眼睛的位置,即第一光源的位置。可参见图6所示,电子设备100在确定眼睛相对于显示屏的距离以及眼睛在第一图像中的位置的情况下,确定眼睛相对于显示屏的位置。若两个眼睛所在的直线相对于水平方向平行,那么图6中的角度1和角度2相同;反之,角度1与角度2存在一定差值。The electronic device 100 determines the position of the eye, that is, the position of the first light source, when the position of the first image and the above-mentioned distance are obtained. As shown in FIG. 6 , the electronic device 100 determines the position of the eye relative to the display screen in the case of determining the distance of the eye relative to the display screen and the position of the eye in the first image. If the lines on which the two eyes are located are parallel to the horizontal direction, then the angle 1 and the angle 2 in FIG. 6 are the same; otherwise, there is a certain difference between the angle 1 and the angle 2.
在一种实现方式中,第一光源的位置可包括左眼的位置和/或右眼的位置。在另一种实现方式中,第一光源的位置为根据左眼的位置和右眼的位置综合确定的一个位置。In one implementation, the location of the first light source may include the location of the left eye and/or the location of the right eye. In another implementation manner, the position of the first light source is a position comprehensively determined according to the position of the left eye and the position of the right eye.
电子设备100根据显示屏与水平方向的夹角是否在预设范围内,分情况确定第一光源的位置。其中,预设范围可以是[90°-M°,90°+M°],例如M为5,在[85°,95°]范围内,认为显示屏相对于水平方向垂直。M的具体数值在本申请实施例中不作限定。可以理解的是,在显示屏与水平方向之间的夹角在90度偏差范围内时,认为显示屏相对于水平方向垂直,偏差值可忽略不计。The electronic device 100 determines the position of the first light source according to whether the angle between the display screen and the horizontal direction is within a preset range. The preset range may be [90°-M°, 90°+M°], for example, M is 5, and within the range of [85°, 95°], the display screen is considered to be vertical relative to the horizontal direction. The specific value of M is not limited in the embodiments of the present application. It can be understood that when the included angle between the display screen and the horizontal direction is within the deviation range of 90 degrees, the display screen is considered to be vertical with respect to the horizontal direction, and the deviation value can be ignored.
情况一:显示屏与水平方向之间的夹角在预设范围内,即显示屏相对于水平方向垂直。电子设备100根据第一图像位置和上述距离,确定第一视角,根据第一视角确定第一光源的位置。以第一光源的位置为右眼的位置为例,可参见图7-1所示,根据第一图像位置和上述距离,结合三角函数原理,可计算得到第一视角,进而根据第一视角,可计算得到右眼的位置(x,y,z)。Case 1: The angle between the display screen and the horizontal direction is within a preset range, that is, the display screen is vertical relative to the horizontal direction. The electronic device 100 determines the first viewing angle according to the first image position and the above-mentioned distance, and determines the position of the first light source according to the first viewing angle. Taking the position of the first light source as the position of the right eye as an example, as shown in Figure 7-1, according to the first image position and the above distance, combined with the principle of trigonometric functions, the first angle of view can be calculated, and then according to the first angle of view, The position (x, y, z) of the right eye can be calculated.
情况二:显示屏与水平方向之间的夹角不在预设范围内,即显示屏相对于水平方向有一定夹角。电子设备100根据第一图像位置、上述距离以及显示屏与水平方向之间的夹角,确定第二视角,根据第二视角确定第一光源的位置。可以理解的是,在假设显示屏相对于水平方向垂直的情况下,确定出第一视角,根据显示屏与水平方向之间的夹角对第一视角进行修正,得到第二视角。以第一光源的位置为右眼的位置为例,可参见图7-2所示,对第一视角进行修正,得到第二视角,进而根据第二视角,可计算得到右眼的位置(x,y,z)。Case 2: The angle between the display screen and the horizontal direction is not within the preset range, that is, the display screen has a certain angle relative to the horizontal direction. The electronic device 100 determines the second viewing angle according to the first image position, the above-mentioned distance, and the angle between the display screen and the horizontal direction, and determines the position of the first light source according to the second viewing angle. It can be understood that, assuming that the display screen is vertical relative to the horizontal direction, the first viewing angle is determined, and the first viewing angle is corrected according to the angle between the display screen and the horizontal direction to obtain the second viewing angle. Taking the position of the first light source as the position of the right eye as an example, as shown in Figure 7-2, the first viewing angle is corrected to obtain the second viewing angle, and then the position of the right eye (x) can be calculated according to the second viewing angle. , y, z).
情况二下计算得到的第一光源的位置,相比情况一,准确度更高。The calculated position of the first light source in the second case is more accurate than that in the first case.
进一步的,电子设备100在确定第一光源的位置的情况下,可确定第一光源的强度。可以理解的是,光源与显示屏之间的距离越近,光源的强度越强;反之,光源的强度越弱。在本申请实施例中,电子设备100如何确定第一光源的强度不作限定。Further, in the case of determining the position of the first light source, the electronic device 100 may determine the intensity of the first light source. It can be understood that the closer the distance between the light source and the display screen, the stronger the intensity of the light source; otherwise, the weaker the intensity of the light source. In this embodiment of the present application, how the electronic device 100 determines the intensity of the first light source is not limited.
步骤402,根据第一光源的位置,针对指定视图控件生成并输出第一阴影光效。 Step 402 , according to the position of the first light source, generate and output a first shadow light effect for a specified view control.
其中,第一阴影光效可包括第一阴影。电子设备100可通过如下方式,根据第一光源的位置,针对指定视图控件生成第一阴影,并通过显示屏输出第一阴影。Wherein, the first shadow light effect may include a first shadow. The electronic device 100 may generate the first shadow for the specified view control according to the position of the first light source in the following manner, and output the first shadow through the display screen.
方式一,电子设备100根据第一光源的位置和阴影绘制算法,针对指定视图控件生成第一阴影,并通过显示屏输出第一阴影。其中,阴影绘制算法可是阴影绘制命令。针对GUI中的指定视图控件的外框(矩形、圆角矩形、圆形),在接收到阴影绘制命令时,执行阴影绘制命令,绘制阴影,根据第一光源的位置,分别生成环境光阴影和点光源阴影。Manner 1, the electronic device 100 generates the first shadow for the specified view control according to the position of the first light source and the shadow drawing algorithm, and outputs the first shadow through the display screen. The shadow drawing algorithm may be a shadow drawing command. For the outer frame (rectangle, rounded rectangle, circle) of the specified view control in the GUI, when the shadow drawing command is received, the shadow drawing command is executed, the shadow is drawn, and the ambient light shadow and the shadow are respectively generated according to the position of the first light source. Point light shadows.
方式一可以适用于指定视图控件的外框为矩形、圆角矩形或圆形,可以生成环境光阴影和点光源阴影。Method 1 can be applied to specify that the outer frame of the view control is a rectangle, a rounded rectangle or a circle, and can generate ambient light shadows and point light shadows.
方式二,电子设备100根据第一光源的位置,第一光源的强度和指定视图控件的材质属性信息,针对指定视图控件生成第一阴影,并通过显示屏输出第一阴影。具体的,电子设备100根据第一光源的位置和第一光源的强度,确定主体模糊半径;根据第一光源的位置和指定视图控件的材质属性信息,确定投影模糊信息;根据主体模糊半径和投影模糊信息,针对指定视图控件生成第一阴影。In a second manner, the electronic device 100 generates a first shadow for the specified view control according to the position of the first light source, the intensity of the first light source and the material attribute information of the specified view control, and outputs the first shadow through the display screen. Specifically, the electronic device 100 determines the subject blur radius according to the position of the first light source and the intensity of the first light source; determines the projection blur information according to the position of the first light source and the material attribute information of the specified view control; Blur information, generate the first shadow for the specified view control.
示例性的,可参见图8所示。电子设备100获取主体图像,即指定视图控件的图像,根据第一光源的位置和第一光源的强度,确定主体模糊半径,例如高斯模糊20,并采用该主体模糊半径对指定视图控件进行主体模糊,得到主体模糊后的效果。电子设备100根据第一光源的位置和指定视图控件的材质属性信息,确定投影模糊信息,例如包括投影颜色#000000,13%不透明,投影模糊半径40,Y轴偏移8,并采用投影模糊信息对指定视图控件进行投影模糊,得到投影模糊后的效果。电子设备100将主体模糊后的效果与投影模糊后的效果进行叠加,得到叠加效果,将叠加效果与主体图像叠加,使得主体图像具有阴影效果。For example, see FIG. 8 . The electronic device 100 acquires the subject image, that is, the image of the specified view control, determines the subject blur radius, such as Gaussian blur 20, according to the position of the first light source and the intensity of the first light source, and uses the subject blur radius to perform subject blur on the specified view control. , to get the effect of blurring the subject. The electronic device 100 determines the projection blur information according to the position of the first light source and the material property information of the specified view control, for example, includes projection color #000000, 13% opacity, projection blur radius 40, Y-axis offset 8, and uses the projection blur information Perform projection blur on the specified view control to obtain the effect of projection blur. The electronic device 100 superimposes the blurred effect of the subject and the effect of projection blur to obtain a superimposed effect, and superimposes the superimposed effect with the subject image, so that the subject image has a shadow effect.
其中,指定视图控件的材质属性信息包括折射率、反射率、漫反射率或透明度中的一种或多种。材质可以包括背景材质、边框材质或背板材质中的一种或多种。用户可以对GUI中的视图控件定义折射率、反射率、漫反射率或透明度等信息,或者直接设置视图控件的类型,如毛玻璃、纸面、镜面等。指定视图控件的材质属性信息不同,将产生不同轻重、颜色的阴影和不同效果的光效。Wherein, the material property information of the specified view control includes one or more of refractive index, reflectance, diffuse reflectance or transparency. Materials can include one or more of background materials, border materials, or backplane materials. Users can define information such as refractive index, reflectivity, diffuse reflectivity or transparency for the view controls in the GUI, or directly set the type of view controls, such as frosted glass, paper, specular, etc. Different material property information of the specified view control will produce shadows of different weights, colors, and light effects of different effects.
光源的位置和材质属性信息可以影响投影透明度、投影模糊半径和投影偏移。The position of the light source and material property information can affect the shadow transparency, shadow blur radius, and shadow offset.
方式二可以适用于任意形态的指定视图控件的外框,适用范围更广,并结合材质属性,更贴合实际应用。The second method can be applied to the outer frame of the specified view control in any shape, and has a wider scope of application. Combined with the material properties, it is more suitable for practical applications.
上述方式一和方式二用于举例,实际应用中可能采用其他方式生成第一阴影。The above manners 1 and 2 are used as examples, and other manners may be used to generate the first shadow in practical applications.
其中,第一阴影光效可包括第一光效。电子设备100可通过如下方式,根据第一光源的位置,针对指定视图控件生成第一光效,并通过显示屏输出第一光效。Wherein, the first shadow light effect may include a first light effect. The electronic device 100 can generate the first light effect for a specified view control according to the position of the first light source in the following manner, and output the first light effect through the display screen.
方式A,电子设备100根据第一光源的位置、第一光源的强度和指定视图控件的原始颜色信息,针对指定视图控件生成第一光效,并通过显示屏输出第一光效。Mode A, the electronic device 100 generates a first light effect for the specified view control according to the position of the first light source, the intensity of the first light source and the original color information of the specified view control, and outputs the first light effect through the display screen.
具体的,将第一光源作为平行光源,电子设备100获取光线的角度信息和光线的颜色信息。电子设备100可根据第一光源的位置和指定视图控件的深度属性,获得光线的角度信息。进而,电子设备100根据光线的颜色信息、光线的角度信息和第一光源的强度,与指定视图控件的原始颜色信息进行点乘运算,从而改变指定视图控件的原始颜色的强度信息。电子设备100根据改变后的强度信息重现绘制用户图形界面,从而显示另一种光效。Specifically, using the first light source as a parallel light source, the electronic device 100 obtains the angle information of the light and the color information of the light. The electronic device 100 may obtain the angle information of the light according to the position of the first light source and the depth attribute of the specified view control. Further, the electronic device 100 performs a dot product operation with the original color information of the specified view control according to the color information of the light, the angle information of the light and the intensity of the first light source, thereby changing the intensity information of the original color of the specified view control. The electronic device 100 reproduces and draws the user graphical interface according to the changed intensity information, thereby displaying another light effect.
方式B,电子设备100根据第一光源的位置,确定径向渐变半径;根据第一光源的强度,确定高斯模糊半径;根据径向渐变半径和高斯模糊半径,针对指定视图控件生成第一光效, 并通过显示屏输出第一光效。Mode B, the electronic device 100 determines the radial gradient radius according to the position of the first light source; determines the Gaussian blur radius according to the intensity of the first light source; generates the first light effect for the specified view control according to the radial gradient radius and the Gaussian blur radius , and output the first light effect through the display screen.
具体的,电子设备100根据第一光源的位置,确定径向渐变半径,进而根据径向渐变半径,绘制一个径向渐变的圆球,圆球的颜色可以是预定义的颜色,例如默认为白光。电子设备100根据第一光源的强度,确定高斯模糊半径,进而根据高斯模糊半径对圆球进行高斯模糊。在指定视图控件上,绘制高斯模糊后的圆球,即生成第一光效,如图9所示。Specifically, the electronic device 100 determines the radial gradient radius according to the position of the first light source, and then draws a radial gradient sphere according to the radial gradient radius. The color of the sphere can be a predefined color, such as white light by default. . The electronic device 100 determines the Gaussian blur radius according to the intensity of the first light source, and then performs Gaussian blur on the sphere according to the Gaussian blur radius. On the specified view control, draw a Gaussian blurred sphere to generate the first light effect, as shown in Figure 9.
步骤403,根据采集的生物特征的第二图像,确定第二光源位置。Step 403: Determine the position of the second light source according to the collected second image of the biological feature.
步骤404,根据第二光源的位置,针对指定视图控件生成并输出第二阴影光效。 Step 404 , according to the position of the second light source, generate and output a second shadow light effect for the specified view control.
需要说明的是,步骤403至步骤404的执行过程与步骤401至步骤402的执行过程类似,具体可参见步骤401至步骤402的描述。不同之处在于,步骤403与步骤401中光源的位置不同。It should be noted that the execution process of step 403 to step 404 is similar to the execution process of step 401 to step 402 , for details, please refer to the description of step 401 to step 402 . The difference is that the position of the light source in step 403 is different from that in step 401 .
第一光源的位置与第二光源的位置为眼睛相对于显示屏的不同的位置,即第一光源的位置不同于第二光源的位置。在一种可能的实现方式中,第一光源的位置为第一时刻,眼睛相对于显示屏的位置;第二光源的位置为第二时刻,眼睛相对于显示屏的位置,从而使得第一光源的位置不同于第二光源的位置。The position of the first light source and the position of the second light source are different positions of the eyes relative to the display screen, that is, the position of the first light source is different from the position of the second light source. In a possible implementation manner, the position of the first light source is the first moment, the position of the eye relative to the display screen; the position of the second light source is the second moment, the position of the eye relative to the display screen, so that the first light source is is different from the position of the second light source.
在图4所示的实施例中,第一光源的位置不同于第二光源的位置,进而第一阴影光效不同于第二阴影光效。可见,同一指定视图控件的阴影光效可随着光源位置的变化而变化,从而实现指定视图控件的阴影效果的动态显示,有利于构建更具真实感的用户图形界面。In the embodiment shown in FIG. 4 , the position of the first light source is different from the position of the second light source, and thus the first shadow light effect is different from the second shadow light effect. It can be seen that the shadow light effect of the same specified view control can change with the change of the light source position, so as to realize the dynamic display of the shadow effect of the specified view control, which is beneficial to build a more realistic user graphical interface.
在一个示例中,如图10所示,在显示屏与水平面的夹角在预设范围内的情况下,图10的A中,眼睛的位置与图10的B中,眼睛的位置不同,从而针对同一指定视图控件,图10中的A的阴影光效不同于图10中的B的阴影光效。In an example, as shown in FIG. 10 , when the angle between the display screen and the horizontal plane is within a preset range, the position of the eyes in A in FIG. 10 is different from that in B in FIG. 10 , so that For the same specified view control, the shadow light effect of A in FIG. 10 is different from the shadow light effect of B in FIG. 10 .
在另一个示例中,如图11所示,在显示屏与水平面的夹角不在预设范围内的情况下,图11的A中,电子设备100的姿态不同于图11的B中,电子设备100的姿态,从而针对同一指定视图控件,图11中的A的阴影光效不同于图11中的B的阴影光效。若图11中的A,眼睛的位置与图11中的B,眼睛的位置不同,且电子设备100的姿态不同,生成的阴影光效也不同。即使图11中的A,眼睛的位置与图11中的B,眼睛的位置相同,也可以生成不同的阴影光效。In another example, as shown in FIG. 11 , when the angle between the display screen and the horizontal plane is not within the preset range, in A in FIG. 11 , the posture of the electronic device 100 is different from that in B in FIG. 11 . 100, so that for the same specified view control, the shadow light effect of A in FIG. 11 is different from the shadow light effect of B in FIG. 11 . If the position of the eye in A in FIG. 11 is different from that in B in FIG. 11 , the position of the eye is different, and the posture of the electronic device 100 is different, the generated shadow light effects are also different. Even if the position of the eyes in A in Figure 11 is the same as the position of the eyes in B in Figure 11, different shadow light effects can be generated.
请参见图12,为本申请实施例提供的另一种用户图形界面显示方法的流程示意图,该流程可以但不限于如下步骤:Please refer to FIG. 12 , which is a schematic flowchart of another method for displaying a graphical user interface provided by an embodiment of the present application. The process may be but not limited to the following steps:
步骤501,获取电子设备相对于预设光源的第一位置。Step 501: Obtain a first position of the electronic device relative to a preset light source.
需要说明的是,当出于性能考虑或电子设备硬件限制,无法根据采集的生物特征的图像确定光源的位置时,可以使用图12所示的方法实现用户图形界面的动态显示。It should be noted that, when the position of the light source cannot be determined according to the collected biometric image due to performance considerations or hardware limitations of the electronic device, the method shown in FIG. 12 can be used to realize the dynamic display of the user graphical interface.
图12所示的方法中,预先光源可以理解为假设的光源,实际可能并不存在,预设光源的位置可由用户设置或系统默认,具体预设光源的位置在本申请实施例中不作限定。In the method shown in FIG. 12 , the pre-light source can be understood as a hypothetical light source, which may not actually exist. The position of the preset light source can be set by the user or defaulted by the system. The specific position of the preset light source is not limited in the embodiments of the present application.
电子设备100可以根据其内部的传感器,获取电子设备100相对于预设光源的位置。电子设备100相对于预设光源的位置,可以理解为电子设备100相对于预设光源的姿态。The electronic device 100 may acquire the position of the electronic device 100 relative to the preset light source according to the sensor in the electronic device 100 . The position of the electronic device 100 relative to the preset light source may be understood as the posture of the electronic device 100 relative to the preset light source.
步骤502,根据第一位置和预设光源的位置,针对指定视图控件生成并输出第一阴影光效。Step 502: Generate and output a first shadow light effect for a specified view control according to the first position and the position of the preset light source.
需要说明的是,步骤502的执行过程可以参见步骤402中的具体描述,此处不在赘述。不同之处在于,步骤402是根据第一光源的位置,针对指定视图控件生成并输出第一阴影光效,而步骤502是根据预设光源的位置和电子设备相对于预设光源的第一位置,针对指定视图控件生成并输出第一阴影光效。It should be noted that, for the execution process of step 502, reference may be made to the specific description in step 402, which is not repeated here. The difference is that step 402 is to generate and output a first shadow light effect for the specified view control according to the position of the first light source, while step 502 is to generate and output the first shadow light effect according to the position of the preset light source and the first position of the electronic device relative to the preset light source. , generates and outputs the first shadow light effect for the specified view control.
步骤503,获取电子设备相对于预设光源的第二位置。Step 503: Obtain a second position of the electronic device relative to the preset light source.
步骤504,根据第二位置和预设光源的位置,针对指定视图控件生成并输出第二阴影光效。 Step 504 , according to the second position and the position of the preset light source, generate and output a second shadow light effect for the specified view control.
需要说明的是,步骤503至步骤504的执行过程与步骤401至步骤402的执行过程类似,具体可参见步骤501至步骤502中的描述。不同之处在于,步骤503与步骤501中电子设备相对于预设光源的位置不同。It should be noted that the execution process of step 503 to step 504 is similar to the execution process of step 401 to step 402 , for details, please refer to the description in step 501 to step 502 . The difference is that the position of the electronic device relative to the preset light source in step 503 and step 501 is different.
在图12所示的实施例中,第一位置不同于第二位置,进而第一阴影光效不同于第二阴影光效。可见,同一指定视图控件的阴影光效可随着电子设备的姿态变化而变化,从而实现指定视图控件的阴影效果的动态显示,有利于构建更具真实感的用户图形界面。In the embodiment shown in FIG. 12 , the first position is different from the second position, and thus the first shadow light effect is different from the second shadow light effect. It can be seen that the shadow light effect of the same specified view control can change with the posture of the electronic device, so as to realize the dynamic display of the shadow effect of the specified view control, which is conducive to building a more realistic user graphical interface.
在一个示例中,如图13所示,图13的A中,电子设备100相对于预设光源的位置,与图13中的B和C均不同,即A、B、C中电子设备100的姿态各不相同,光线的角度也不相同,进而针对同一指定视图控件,生成的阴影光效不相同。In an example, as shown in FIG. 13 , in A of FIG. 13 , the position of the electronic device 100 relative to the preset light source is different from that of B and C in FIG. 13 , that is, the positions of the electronic device 100 in A, B, and C are different The poses are different, the angle of the light is different, and the shadow light effects generated for the same specified view control are different.
图12所示的实施例只使用电子设备内部的传感器,具有更低功耗的特点,更具备商业价值。The embodiment shown in FIG. 12 only uses the sensor inside the electronic device, has the characteristics of lower power consumption, and has more commercial value.
图14所示的实施例为本申请提供的用户图形界面显示装置的示意图。该装置包括处理单元1401和显示单元1402。The embodiment shown in FIG. 14 is a schematic diagram of a user graphical interface display device provided by the present application. The apparatus includes a processing unit 1401 and a display unit 1402 .
在一个实施例中:In one embodiment:
处理单元1401,用于根据采集的生物特征的第一图像,确定第一光源的位置;根据第一光源的位置,针对指定视图控件生成第一阴影光效;The processing unit 1401 is configured to determine the position of the first light source according to the collected first image of the biological feature; and generate the first shadow light effect for the specified view control according to the position of the first light source;
显示单元1402,用于输出第一阴影光效;a display unit 1402, configured to output a first shadow light effect;
处理单元1401,还用于根据采集的生物特征的第二图像,确定第二光源的位置;根据第二光源的位置,针对指定视图控件生成第二阴影光效;The processing unit 1401 is further configured to determine the position of the second light source according to the collected second image of the biological feature; and generate a second shadow light effect for the specified view control according to the position of the second light source;
显示单元1402,还用于输出第二阴影光效;The display unit 1402 is further configured to output the second shadow light effect;
其中,第一光源的位置和第二光源的位置为生物特征相对于显示屏的位置,且第一光源的位置不同于第二光源的位置;第一阴影光效不同于第二阴影光效。Wherein, the position of the first light source and the position of the second light source are the positions of the biological feature relative to the display screen, and the position of the first light source is different from the position of the second light source; the first shadow light effect is different from the second shadow light effect.
在一种实现方式中,处理单元1401,具体用于根据采集的生物特征的第一图像,确定生物特征在第一图像中的第一图像位置,并估算生物特征相对于显示屏的距离;根据第一图像位置和距离,确定第一光源的位置。In an implementation manner, the processing unit 1401 is specifically configured to determine the first image position of the biological feature in the first image according to the collected first image of the biological feature, and estimate the distance of the biological feature relative to the display screen; The first image position and distance determine the position of the first light source.
在一种实现方式中,处理单元1401,具体用于显示屏与水平方向的夹角在预设范围内,根据第一图像位置和距离,确定第一视角;根据第一视角,确定第一光源的位置。In an implementation manner, the processing unit 1401 is specifically configured to determine the first viewing angle according to the first image position and distance according to the angle between the display screen and the horizontal direction within a preset range; and determine the first light source according to the first viewing angle s position.
在一种实现方式中,处理单元1401,具体用于显示屏与水平方向的夹角不在预设范围内,根据显示屏与水平方向的夹角、第一图像位置和距离,确定第二视角;根据第二视角,确定第一光源的位置。In an implementation manner, the processing unit 1401 is specifically configured to determine the second viewing angle according to the angle between the display screen and the horizontal direction, the position and distance of the first image, if the angle between the display screen and the horizontal direction is not within the preset range; According to the second viewing angle, the position of the first light source is determined.
在一种实现方式中,第一阴影光效包括第一阴影;处理单元1401,具体用于根据第一光源的位置、第一光源的强度和指定视图控件的材质属性信息,针对指定视图控件生成并输出第一阴影。In an implementation manner, the first shadow light effect includes a first shadow; the processing unit 1401 is specifically configured to generate the specified view control according to the position of the first light source, the intensity of the first light source and the material attribute information of the specified view control and output the first shadow.
在一种实现方式中,处理单元1401,具体用于根据第一光源的位置和第一光源的强度,确定主体模糊半径;根据第一光源的位置和指定视图控件的材质属性信息,确定投影模糊信息;根据主体模糊半径和投影模糊信息,针对指定视图控件生成并输出第一阴影。In one implementation, the processing unit 1401 is specifically configured to determine the subject blur radius according to the position of the first light source and the intensity of the first light source; and determine the projection blur according to the position of the first light source and the material attribute information of the specified view control information; generate and output the first shadow for the specified view control according to the blur radius of the subject and the shadow blur information.
在一种实现方式中,指定视图控件的材质属性信息包括折射率、反射率、漫反射率或透明度中的一种或多种。In one implementation, the material property information of the specified view control includes one or more of refractive index, reflectance, diffuse reflectance, or transparency.
在一种实现方式中,第一阴影光效包括第一光效;处理单元1401,具体用于根据第一光源的位置、第一光源的强度和指定视图控件的原始颜色信息,针对指定视图控件生成并输出第一光效。In an implementation manner, the first shadow light effect includes a first light effect; the processing unit 1401 is specifically configured to, according to the position of the first light source, the intensity of the first light source and the original color information of the specified view control, target the specified view control A first light effect is generated and output.
在一种实现方式中,第一阴影光效包括第一光效;处理单元1401,具体用于根据第一光源的位置,确定径向渐变半径;根据第一光源的强度,确定高斯模糊半径;根据径向渐变半径和高斯模糊半径,针对指定视图控件生成并输出第一光效。In an implementation manner, the first shadow light effect includes a first light effect; the processing unit 1401 is specifically configured to determine the radial gradient radius according to the position of the first light source; and determine the Gaussian blur radius according to the intensity of the first light source; Generates and outputs the first light effect for the specified view control based on the radial gradient radius and Gaussian blur radius.
在另一个实施例中:In another embodiment:
处理单元1401,用于获取电子设备相对于预设光源的第一位置;根据第一位置和预设光源的位置,针对指定视图控件生成第一阴影光效;The processing unit 1401 is used to obtain a first position of the electronic device relative to the preset light source; according to the first position and the position of the preset light source, generate a first shadow light effect for a specified view control;
显示单元1402,用于输出第一阴影光效;a display unit 1402, configured to output a first shadow light effect;
处理单元1401,还用于获取电子设备相对于预设光源的第二位置;根据第二位置和预设光源的位置,针对指定视图控件生成第二阴影光效;The processing unit 1401 is further configured to acquire a second position of the electronic device relative to the preset light source; generate a second shadow light effect for the specified view control according to the second position and the position of the preset light source;
显示单元1402,还用于输出第二阴影光效;The display unit 1402 is further configured to output the second shadow light effect;
其中,第一位置不同于第二位置,第一阴影光效不同于第二阴影光效。Wherein, the first position is different from the second position, and the first shadow light effect is different from the second shadow light effect.
在一种实现方式中,第一阴影光效包括第一阴影;处理单元1401,具体用于根据第一位置、预设光源的位置、第一光源的强度和指定视图控件的材质属性信息,针对指定视图控件生成并输出第一阴影。In an implementation manner, the first shadow light effect includes a first shadow; the processing unit 1401 is specifically configured to, according to the first position, the position of the preset light source, the intensity of the first light source, and the material attribute information of the specified view control, for Specifies that the view control generates and outputs the first shadow.
在一种实现方式中,指定视图控件的材质属性信息包括折射率、反射率、漫反射率或透明度中的一种或多种。In one implementation, the material property information of the specified view control includes one or more of refractive index, reflectance, diffuse reflectance, or transparency.
在一种实现方式中,第一阴影光效包括第一光效;处理单元1401,具体用于根据第一位置、预设光源的位置、第一光源的强度和指定视图控件的原始颜色信息,针对指定视图控件生成并输出第一光效。In an implementation manner, the first shadow light effect includes a first light effect; the processing unit 1401 is specifically configured to, according to the first position, the position of the preset light source, the intensity of the first light source and the original color information of the specified view control, Generates and outputs the first light effect for the specified view control.
在一种实现方式中,第一阴影光效包括第一光效;处理单元1401,具体用于根据第一位置和预设光源的位置,确定径向渐变半径;根据第一位置和预设光源的强度,确定高斯模糊半径;根据径向渐变半径和高斯模糊半径,针对指定视图控件生成并输出第一光效。In an implementation manner, the first shadow light effect includes a first light effect; the processing unit 1401 is specifically configured to determine the radial gradient radius according to the first position and the position of the preset light source; according to the first position and the preset light source Determine the Gaussian blur radius; according to the radial gradient radius and Gaussian blur radius, generate and output the first light effect for the specified view control.
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the above embodiments, the term "when" may be interpreted to mean "if" or "after" or "in response to determining..." or "in response to detecting..." depending on the context. Similarly, depending on the context, the phrases "in determining..." or "if detecting (the stated condition or event)" can be interpreted to mean "if determining..." or "in response to determining..." or "on detecting (the stated condition or event)" or "in response to the detection of (the stated condition or event)".
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state drives), and the like.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented. The process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed , which may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: ROM or random storage memory RAM, magnetic disk or optical disk and other mediums that can store program codes.

Claims (18)

  1. 一种用户图形界面显示方法,其特征在于,所述方法应用于电子设备,所述电子设备包括用于显示用户图形界面的显示屏,所述用户图形界面包括具有深度属性的指定视图控件,所述方法包括:A method for displaying a graphical user interface, characterized in that the method is applied to an electronic device, the electronic device includes a display screen for displaying a graphical user interface, the graphical user interface includes a specified view control with a depth attribute, the The methods described include:
    根据采集的生物特征的第一图像,确定第一光源的位置;determining the position of the first light source according to the collected first image of the biological feature;
    根据所述第一光源的位置,针对所述指定视图控件生成并输出第一阴影光效;generating and outputting a first shadow light effect for the specified view control according to the position of the first light source;
    根据采集的所述生物特征的第二图像,确定第二光源的位置;determining the position of the second light source according to the collected second image of the biological feature;
    根据所述第二光源的位置,针对所述指定视图控件生成并输出第二阴影光效;generating and outputting a second shadow light effect for the specified view control according to the position of the second light source;
    其中,所述第一光源的位置和所述第二光源的位置为所述生物特征相对于所述显示屏的位置,且所述第一光源的位置不同于所述第二光源的位置;所述第一阴影光效不同于所述第二阴影光效。Wherein, the position of the first light source and the position of the second light source are the positions of the biological feature relative to the display screen, and the position of the first light source is different from the position of the second light source; the The first shadow light effect is different from the second shadow light effect.
  2. 根据权利要求1所述的方法,其特征在于,所述根据采集的生物特征的第一图像,确定第一光源的位置,包括:The method according to claim 1, wherein the determining the position of the first light source according to the collected first image of the biological feature comprises:
    根据采集的生物特征的第一图像,确定所述生物特征在所述第一图像中的第一图像位置,并估算所述生物特征相对于所述显示屏的距离;According to the collected first image of the biological feature, determine the first image position of the biological feature in the first image, and estimate the distance of the biological feature relative to the display screen;
    根据所述第一图像位置和所述距离,确定第一光源的位置。Based on the first image position and the distance, the position of the first light source is determined.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一图像位置和所述距离,确定第一光源的位置,包括:The method according to claim 2, wherein the determining the position of the first light source according to the first image position and the distance comprises:
    所述显示屏与水平方向的夹角在预设范围内,根据所述第一图像位置和所述距离,确定第一视角;The angle between the display screen and the horizontal direction is within a preset range, and a first viewing angle is determined according to the first image position and the distance;
    根据所述第一视角,确定第一光源的位置。According to the first viewing angle, the position of the first light source is determined.
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述第一图像位置和所述距离,确定第一光源的位置,包括:The method according to claim 2, wherein the determining the position of the first light source according to the first image position and the distance comprises:
    所述显示屏与水平方向的夹角不在预设范围内,根据所述显示屏与水平方向的夹角、所述第一图像位置和所述距离,确定第二视角;The angle between the display screen and the horizontal direction is not within the preset range, and the second viewing angle is determined according to the angle between the display screen and the horizontal direction, the position of the first image and the distance;
    根据所述第二视角,确定第一光源的位置。According to the second viewing angle, the position of the first light source is determined.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一阴影光效包括第一阴影;The method according to any one of claims 1-4, wherein the first shadow light effect comprises a first shadow;
    所述根据所述第一光源的位置,针对所述指定视图控件生成并输出所述第一阴影,包括:The generating and outputting the first shadow for the specified view control according to the position of the first light source includes:
    根据所述第一光源的位置、所述第一光源的强度和所述指定视图控件的材质属性信息,针对所述指定视图控件生成并输出所述第一阴影。The first shadow is generated and output for the specified view control according to the position of the first light source, the intensity of the first light source and the material property information of the specified view control.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述第一光源的位置、所述第一光源的强度和所述指定视图控件的材质属性信息,针对所述指定视图控件生成并输出所述第一阴影,包括:The method according to claim 5, characterized in that, according to the position of the first light source, the intensity of the first light source and the material property information of the specified view control, generating and Outputting the first shadow includes:
    根据所述第一光源的位置和所述第一光源的强度,确定主体模糊半径;determining a subject blur radius according to the position of the first light source and the intensity of the first light source;
    根据所述第一光源的位置和所述指定视图控件的材质属性信息,确定投影模糊信息;Determine the projection blur information according to the position of the first light source and the material property information of the specified view control;
    根据所述主体模糊半径和所述投影模糊信息,针对所述指定视图控件生成并输出所述第一阴影。The first shadow is generated and output for the specified view control according to the subject blur radius and the projection blur information.
  7. 根据权利要求5或6所述的方法,其特征在于,所述指定视图控件的材质属性信息包括折射率、反射率、漫反射率或透明度中的一种或多种。The method according to claim 5 or 6, wherein the material property information of the specified view control comprises one or more of refractive index, reflectance, diffuse reflectance or transparency.
  8. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一阴影光效包括第一光效;The method according to any one of claims 1-4, wherein the first shadow light effect comprises a first light effect;
    所述根据所述第一光源的位置,针对所述指定视图控件生成并输出所述第一光效,包括:The generating and outputting the first light effect for the specified view control according to the position of the first light source includes:
    根据所述第一光源的位置、所述第一光源的强度和所述指定视图控件的原始颜色信息,针对所述指定视图控件生成并输出所述第一光效。The first light effect is generated and output for the specified view control according to the position of the first light source, the intensity of the first light source and the original color information of the specified view control.
  9. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一阴影光效包括第一光效;The method according to any one of claims 1-4, wherein the first shadow light effect comprises a first light effect;
    所述根据所述第一光源的位置,针对所述指定视图控件生成并输出所述第一光效,包括:The generating and outputting the first light effect for the specified view control according to the position of the first light source includes:
    根据所述第一光源的位置,确定径向渐变半径;determining a radial gradient radius according to the position of the first light source;
    根据所述第一光源的强度,确定高斯模糊半径;determining a Gaussian blur radius according to the intensity of the first light source;
    根据所述径向渐变半径和所述高斯模糊半径,针对所述指定视图控件生成并输出所述第一光效。The first light effect is generated and output for the specified view control according to the radial gradient radius and the Gaussian blur radius.
  10. 一种用户图形界面显示方法,其特征在于,所述方法应用于电子设备,所述电子设备包括用于显示用户图形界面的显示屏,所述用户图形界面包括具有深度属性的指定视图控件,所述方法包括:A method for displaying a graphical user interface, characterized in that the method is applied to an electronic device, the electronic device includes a display screen for displaying a graphical user interface, the graphical user interface includes a specified view control with a depth attribute, the The methods described include:
    获取所述电子设备相对于预设光源的第一位置;acquiring a first position of the electronic device relative to a preset light source;
    根据所述第一位置和所述预设光源的位置,针对所述指定视图控件生成并输出第一阴影光效;generating and outputting a first shadow light effect for the specified view control according to the first position and the position of the preset light source;
    获取所述电子设备相对于所述预设光源的第二位置;acquiring a second position of the electronic device relative to the preset light source;
    根据所述第二位置和所述预设光源的位置,针对所述指定视图控件生成并输出第二阴影光效;generating and outputting a second shadow light effect for the specified view control according to the second position and the position of the preset light source;
    其中,所述第一位置不同于所述第二位置,所述第一阴影光效不同于所述第二阴影光效。Wherein, the first position is different from the second position, and the first shadow light effect is different from the second shadow light effect.
  11. 根据权利要求10所述的方法,其特征在于,所述第一阴影光效包括第一阴影;The method of claim 10, wherein the first shadow light effect comprises a first shadow;
    所述根据所述第一位置和所述预设光源的位置,针对所述指定视图控件生成并输出所述第一阴影,包括:The generating and outputting the first shadow for the specified view control according to the first position and the position of the preset light source includes:
    根据所述第一位置、所述预设光源的位置、所述第一光源的强度和所述指定视图控件的材质属性信息,针对所述指定视图控件生成并输出所述第一阴影。The first shadow is generated and output for the specified view control according to the first position, the position of the preset light source, the intensity of the first light source, and the material property information of the specified view control.
  12. 根据权利要求11所述的方法,其特征在于,所述指定视图控件的材质属性信息包括折射率、反射率、漫反射率或透明度中的一种或多种。The method according to claim 11, wherein the material property information of the specified view control comprises one or more of refractive index, reflectance, diffuse reflectance or transparency.
  13. 根据权利要求10所述的方法,其特征在于,所述第一阴影光效包括第一光效;The method of claim 10, wherein the first shadow light effect comprises a first light effect;
    所述根据所述第一位置和所述预设光源的位置,针对所述指定视图控件生成并输出所述第一光效,包括:The generating and outputting the first light effect for the specified view control according to the first position and the position of the preset light source includes:
    根据所述第一位置、所述预设光源的位置、所述第一光源的强度和所述指定视图控件的原始颜色信息,针对所述指定视图控件生成并输出所述第一光效。The first light effect is generated and output for the specified view control according to the first position, the position of the preset light source, the intensity of the first light source, and the original color information of the specified view control.
  14. 根据权利要求10所述的方法,其特征在于,所述第一阴影光效包括第一光效;The method of claim 10, wherein the first shadow light effect comprises a first light effect;
    所述根据所述第一位置和所述预设光源的位置,针对所述指定视图控件生成并输出所述第一光效,包括:The generating and outputting the first light effect for the specified view control according to the first position and the position of the preset light source includes:
    根据所述第一位置和所述预设光源的位置,确定径向渐变半径;determining a radial gradient radius according to the first position and the position of the preset light source;
    根据所述第一位置和所述预设光源的强度,确定高斯模糊半径;determining a Gaussian blur radius according to the first position and the intensity of the preset light source;
    根据所述径向渐变半径和所述高斯模糊半径,针对所述指定视图控件生成并输出所述第一光效。The first light effect is generated and output for the specified view control according to the radial gradient radius and the Gaussian blur radius.
  15. 一种用户图形界面显示装置,包括显示屏,存储器,一个或多个处理器,多个应用程序,以及一个或多个程序;其中所述一个或多个程序被存储在所述存储器中;其特征在于,所述一个或多个处理器在执行所述一个或多个程序时,使得所述用户图形界面显示装置实现如权利要求1至14任一项所述的方法。A user graphical interface display device, comprising a display screen, a memory, one or more processors, a plurality of application programs, and one or more programs; wherein the one or more programs are stored in the memory; which It is characterized in that, when the one or more processors execute the one or more programs, the user graphical interface display device implements the method according to any one of claims 1 to 14.
  16. 一种计算机设备,包括存储器,处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时使得所述计算机设备实现如权利要求1至14任一项所述的方法。A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, when the processor executes the computer program, the computer device realizes A method as claimed in any one of claims 1 to 14.
  17. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1至14任一项所述的方法。A computer program product comprising instructions, characterized in that, when the computer program product is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 14.
  18. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1至14任一项所述的方法。A computer-readable storage medium comprising instructions, characterized in that, when the instructions are executed on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 14.
PCT/CN2021/133215 2020-11-28 2021-11-25 Graphical user interface display method and apparatus WO2022111593A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011363058.4 2020-11-28
CN202011363058.4A CN114584652B (en) 2020-11-28 2020-11-28 User graphical interface display method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022111593A1 true WO2022111593A1 (en) 2022-06-02

Family

ID=81753720

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/133215 WO2022111593A1 (en) 2020-11-28 2021-11-25 Graphical user interface display method and apparatus

Country Status (2)

Country Link
CN (1) CN114584652B (en)
WO (1) WO2022111593A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090179914A1 (en) * 2008-01-10 2009-07-16 Mikael Dahlke System and method for navigating a 3d graphical user interface
EP2090974A1 (en) * 2006-08-02 2009-08-19 Research In Motion Limited System and method for adjusting presentation of text and images on an electronic device according to an orientation of the device
CN105808218A (en) * 2014-12-30 2016-07-27 乐视致新电子科技(天津)有限公司 User interface UI control effect-oriented drawing method and device
CN105827820A (en) * 2015-12-25 2016-08-03 维沃移动通信有限公司 Peeping prevention method for mobile terminal and mobile terminal
CN107436765A (en) * 2017-07-27 2017-12-05 青岛海信电器股份有限公司 The treating method and apparatus of view control
CN108600733A (en) * 2018-05-04 2018-09-28 成都泰和万钟科技有限公司 A kind of bore hole 3D display method based on tracing of human eye
CN111930291A (en) * 2020-10-09 2020-11-13 广州宸祺出行科技有限公司 Method and system for realizing personalized shadow on Android platform

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010120227A1 (en) * 2009-04-17 2010-10-21 Trapcode Ab Method for adding shadows to objects in computer graphics
US8913056B2 (en) * 2010-08-04 2014-12-16 Apple Inc. Three dimensional user interface effects on a display by using properties of motion
CN104123743A (en) * 2014-06-23 2014-10-29 联想(北京)有限公司 Image shadow adding method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2090974A1 (en) * 2006-08-02 2009-08-19 Research In Motion Limited System and method for adjusting presentation of text and images on an electronic device according to an orientation of the device
US20090179914A1 (en) * 2008-01-10 2009-07-16 Mikael Dahlke System and method for navigating a 3d graphical user interface
CN105808218A (en) * 2014-12-30 2016-07-27 乐视致新电子科技(天津)有限公司 User interface UI control effect-oriented drawing method and device
CN105827820A (en) * 2015-12-25 2016-08-03 维沃移动通信有限公司 Peeping prevention method for mobile terminal and mobile terminal
CN107436765A (en) * 2017-07-27 2017-12-05 青岛海信电器股份有限公司 The treating method and apparatus of view control
CN108600733A (en) * 2018-05-04 2018-09-28 成都泰和万钟科技有限公司 A kind of bore hole 3D display method based on tracing of human eye
CN111930291A (en) * 2020-10-09 2020-11-13 广州宸祺出行科技有限公司 Method and system for realizing personalized shadow on Android platform

Also Published As

Publication number Publication date
CN114584652A (en) 2022-06-03
CN114584652B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
WO2021129326A1 (en) Screen display method and electronic device
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
CN113645351B (en) Application interface interaction method, electronic device and computer-readable storage medium
WO2021036770A1 (en) Split-screen processing method and terminal device
WO2020093988A1 (en) Image processing method and electronic device
WO2022127787A1 (en) Image display method and electronic device
WO2022001258A1 (en) Multi-screen display method and apparatus, terminal device, and storage medium
CN114887323B (en) Electronic equipment control method and electronic equipment
WO2020015144A1 (en) Photographing method and electronic device
WO2021082815A1 (en) Display element display method and electronic device
US11889386B2 (en) Device searching method and electronic device
WO2022012418A1 (en) Photographing method and electronic device
WO2022143180A1 (en) Collaborative display method, terminal device, and computer readable storage medium
WO2022105702A1 (en) Method and electronic device for saving image
CN112150499A (en) Image processing method and related device
WO2023179123A1 (en) Bluetooth audio playback method, electronic device, and storage medium
CN113610943B (en) Icon rounded angle processing method and device
WO2022078116A1 (en) Brush effect picture generation method, image editing method and device, and storage medium
WO2022033344A1 (en) Video stabilization method, and terminal device and computer-readable storage medium
WO2022017270A1 (en) Appearance analysis method, and electronic device
WO2020233581A1 (en) Height measuring method and electronic device
WO2022111593A1 (en) Graphical user interface display method and apparatus
CN113970965A (en) Message display method and electronic equipment
CN114089902A (en) Gesture interaction method and device and terminal equipment
WO2024001900A1 (en) Display method for folding screen, and related device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21897093

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21897093

Country of ref document: EP

Kind code of ref document: A1