Interface display method and electronic device

By storing and directly using the blurred background image in the electronic device, the high power consumption problem caused by the blurred background processing of interface controls in the prior art is solved, and the performance and user experience of interface display are improved.

CN117724603BActive Publication Date: 2024-11-15HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310628628.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-11-15
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

When the prior art blurs the background of interface controls, the system needs to obtain and process the background image of each control separately, resulting in large power consumption and affecting performance and user experience.

Method used

After storing the blurred background image, the electronic device directly crops and uses the target drawing node's background area to reduce the number of times the background image is obtained and processed, stored and used by blur parameters.

Benefits of technology

By reducing the number of acquisition and processing of background images, the system power consumption is saved, and the performance and user experience of interface display are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117724603B_ABST
    Figure CN117724603B_ABST
Patent Text Reader

Abstract

The present application proposes an interface display method and an electronic device, which relates to the field of terminal technology, and realizes the purpose of reducing the number of times the background image is obtained and blurred in the process of blurring the background of the drawing node in the target interface to be displayed, thereby saving system power consumption. The interface display method includes: after the electronic device determines that the drawing node is a target drawing node to be blurred based on the blur parameter of the drawing node in the target interface to be displayed, for each target drawing node, if the electronic device determines that the stored background image is an image blurred based on the blur parameter, the electronic device cuts the first background area corresponding to the position of the target drawing node from the background image; then, after the electronic device draws the first background area to the position of the target drawing node, it draws the content of the target drawing node on the upper layer of the first background area to generate a target interface to display the target interface on the display screen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to an interface display method and an electronic device. Background Art

[0002] In order to achieve a better interface display effect, electronic devices blur the background of the interface in scenarios such as the notification bar, status bar, pop-up window, and card, so as to increase the quality of the display interface, highlight the design aesthetics of the interface, and enhance the user experience.

[0003] In the related art, the system usually uses a real-time background blurring method to blur the background of each interface control in the display interface. However, in the process of blurring the background of each interface control in the display interface, the system obtains the background image corresponding to the background of each interface control respectively, and blurs the obtained background image respectively. Obviously, the above background blurring process has the problem of high system power consumption. Summary of the invention

[0004] The embodiment of the present application provides an interface display method and an electronic device. For a target drawing node to be blurred in a target interface to be displayed, the electronic device determines that a stored background image is an image blurred based on a blur parameter, and the electronic device directly crops the background area corresponding to the position of the target drawing node from the stored background image, and uses the target image as the background of the area corresponding to the interface control of the target drawing node. Since the electronic device can store the blurred background image, the background area corresponding to the position of each target drawing node can be directly cropped from the blurred background image, without having to obtain the background image once when drawing the target drawing node, and blurring the obtained background image respectively. By reducing the number of times the background image is obtained and blurred, the purpose of saving system power consumption is achieved.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, an interface display method is provided, which may include: after the electronic device determines that the drawing node is a target drawing node to be blurred based on the blur parameter of the drawing node in the target interface to be displayed, for each target drawing node, if the electronic device determines that the stored background image is an image blurred based on the blur parameter, the electronic device crops the first background area corresponding to the position of the target drawing node from the background image; then, after the electronic device draws the first background area to the position of the target drawing node, it draws the content of the target drawing node on the upper layer of the first background area, generates the target interface, and then displays the target interface.

[0007] The target interface includes an interface control corresponding to the target drawing node, and the background area of ​​the interface control is the first background area after blurring.

[0008] The blur parameters of the drawing node may include blur radius and / or blur filter. The stored background image is obtained based on the blur parameters of the drawing node.

[0009] It can be understood that the electronic device determines that the background image used for the target drawing node has been processed with blur parameters and has been stored. The electronic device can directly crop the background area corresponding to the position of the target drawing node from the background, without having to obtain the background image when drawing the target drawing node and blur the obtained background image. By reducing the number of times the background image is obtained and blurred, the purpose of saving system power consumption is achieved.

[0010] In a possible implementation manner of the first aspect, the interface display method may further include:

[0011] After the electronic device obtains the background image based on the target application corresponding to the target interface, the electronic device stores the image identifier of the background image as a parameter in the attribute information of each drawing node.

[0012] The picture identifier of the background picture may indicate the storage location of the background picture.

[0013] The electronic device determines that the stored background image is an image that has been blurred based on the blur parameter, including:

[0014] The electronic device determines that in the attribute information of the target drawing node, the background image indicated by the stored image identifier is an image that has been fuzzy processed based on the fuzzy parameter.

[0015] It can be understood that the electronic device stores the image identifier of the background image in the attribute information of each drawing node. After the electronic device determines the target drawing node according to the fuzzy parameters stored in the attribute information of each drawing node in the target interface to be displayed, the electronic device can directly obtain the background image used to perform fuzzy processing on the target drawing node according to the image identifier stored in the attribute information of the target drawing node, and the background image is an image that is fuzzy processed based on the fuzzy parameters. As a result, the electronic device does not need to obtain the background image once when drawing the target drawing node and perform fuzzy processing on the obtained background image. By reducing the number of times the background image is obtained and blurred, the purpose of saving system power consumption is achieved.

[0016] In another possible implementation of the first aspect, the interface display method may further include:

[0017] If the electronic device determines that the stored background image has not been blurred based on the blur parameters, the electronic device uses the blur parameters to blur the background image to obtain a blurred background image; then, the electronic device crops a first background area corresponding to the position of the target drawing node from the blurred background image.

[0018] That is to say, in one possible case of an embodiment of the present application, the background image obtained by the electronic device based on the target application corresponding to the target interface may be an image that has been processed with the fuzzy parameters of the drawing node, or may be an image that has not been blurred, or may be an image that has been blurred but has not been blurred with the fuzzy parameters of the drawing node.

[0019] When the electronic device determines that the background image indicated by the image identifier stored in the attribute information of the target drawing node has not been blurred based on the blur parameters of the target drawing node, the electronic device can use the blur parameters to blur the background image, so that when the background of the target drawing node is subsequently blurred, the background area can be directly cropped from the blurred image.

[0020] In another possible implementation manner of the first aspect, the electronic device determines that the stored background image has not been blurred based on the blur parameter, including:

[0021] If the electronic device determines that the background image is obtained from the target application for the first time, the electronic device determines that the background image has not been blurred based on the blur parameters; or, if the electronic device determines that the blur parameters for blurring the background image are different from the blur parameters of the target drawing node, the electronic device determines that the background image has not been blurred based on the blur parameters.

[0022] It can be understood that when the electronic device determines that the target application obtains the background image from the application layout file for the first time, the electronic device determines that the background image is an image that has not been blurred by any blur parameter. In other words, when the electronic device determines that the background image obtained by the target application is a clear image, the electronic device determines that the background image has not been blurred based on the blur parameter.

[0023] In addition, the electronic device determines that the background image obtained based on the target application has been blurred, but the blur parameters determined by the electronic device to blur the background image are different from the blur parameters of the target drawing node. In this case, the electronic device can also determine that the background image has not been blurred based on the blur parameters of the target drawing node.

[0024] As an example, suppose that the electronic device determines that the background image acquired by the target application is an image processed by fuzzy parameter A, and the electronic device determines that the fuzzy parameter in the attribute information of the target drawing node is fuzzy parameter B, and fuzzy parameter B is different from fuzzy parameter A. In this case, the electronic device can determine that the background image has not been fuzzy processed based on the fuzzy parameter of the target drawing node.

[0025] In another possible implementation manner of the first aspect, the blur parameter includes a blur radius, and the electronic device blurs the background image using the blur parameter to obtain a blurred background image, including:

[0026] After the electronic device generates a blur filter according to the blur radius, the electronic device blurs the background image through the blur filter to obtain a blurred background image.

[0027] The blur radius is used to represent the blur degree of the background image. That is, the larger the blur radius, the blurrier the background image; the smaller the blur radius, the clearer the background image.

[0028] In another possible implementation of the first aspect, the interface display method may further include:

[0029] The electronic device displays a first interface, which includes first interface content; in response to a sliding operation on the first interface, the electronic device displays a sliding process interface or a post-sliding interface, which includes the first interface content. The first interface content includes interface controls corresponding to a target drawing node, the interface controls of the sliding process interface or the post-sliding interface are in a compressed state, and the background area of ​​the interface controls corresponding to the target drawing node is blurred.

[0030] In one possible case, during the process of the electronic device displaying the first interface, after the electronic device detects a sliding operation of the user on the first interface, the electronic device displays a sliding process interface in response to the sliding operation.

[0031] That is, when the display screen of the electronic device receives a sliding operation, the electronic device displays an interface showing the change process from the first display page after blurring to the target display page.

[0032] In one possible case, when the electronic device displays the first interface, after the electronic device detects a user sliding operation on the first interface, in response to the sliding operation, the electronic device displays the interface after sliding. Thus, the electronic device displays the blurred interface after sliding, achieving the purpose of ensuring that the background of the target drawing node is still the blurred background when the interface is scaled.

[0033] The sliding operation can be a sliding operation to the left, right, up or down, and the sliding direction of the first interface is not limited in the embodiment of the present application. For example, in response to the user sliding the first interface to the left, the electronic device displays the sliding process interface.

[0034] In another possible implementation of the first aspect, in response to a sliding operation on the first interface, the electronic device displays a sliding process interface or a post-sliding interface, including:

[0035] In response to a sliding operation, the electronic device determines a horizontal compression ratio and a vertical compression ratio of a control corresponding to a target drawing node relative to a canvas of a preset size based on a first coordinate value of the target drawing node in a canvas corresponding to a first interface and a second coordinate value relative to a canvas of a preset size; the electronic device compresses the first display page according to the horizontal compression ratio and the vertical compression ratio, and after obtaining the target display page, the electronic device displays the target display page.

[0036] The first display page includes the interface control corresponding to the target drawing node, and the area corresponding to the interface control is blurred. The interface control in the target display page is in a compressed state, and the background area of ​​the interface control corresponding to the target drawing node is blurred.

[0037] In another possible implementation of the first aspect, after responding to the sliding operation, the interface display method may further include:

[0038] If the electronic device determines that the stored background image is an image blurred based on the blur parameters, the electronic device crops a second background area corresponding to the position of the compressed target drawing node from the background image; the electronic device stretches the second background area according to the horizontal compression ratio and the vertical compression ratio to obtain the target background area; after the electronic device draws the target background area to the position of the target drawing node, it draws the content of the target drawing node on the upper layer of the target background area to obtain the blurred first display page.

[0039] It can be understood that compared with the solution in which the electronic device directly displays the second background area at the compressed target drawing node position, the electronic device stretches the second background area to obtain the target background area and draws it to the position of the target drawing node, and then draws the content of the target drawing node on the upper layer of the target background area to obtain the blurred first display page, thereby avoiding the problem of displaying the unblurred background area at the position of the target drawing node during the sliding of the display page.

[0040] In a possible case, the electronic device compresses the first display page according to the horizontal compression ratio and the vertical compression ratio, including:

[0041] The electronic device compresses the blurred first display page according to a horizontal compression ratio and a vertical compression ratio.

[0042] In another possible implementation manner of the first aspect, before the electronic device displays the target display page, the electronic device displays the sliding process interface, which may also include:

[0043] The electronic device displays an interface showing the change process from the first display page after blurring to the target display page.

[0044] In another possible implementation manner of the first aspect, before the electronic device determines, according to a first coordinate value of the target drawing node in the canvas corresponding to the first interface and a second coordinate value relative to the canvas of a preset size, a horizontal compression ratio and a vertical compression ratio of a control corresponding to the target drawing node relative to the canvas of a preset size, the interface display method may further include:

[0045] The electronic device determines the first coordinate values ​​of the canvas corresponding to all drawing nodes in the first interface in the first interface. Based on the target drawing node, the electronic device traverses upward to determine the first coordinate value of the parent node of the target drawing node, and determines the intermediate coordinate value according to the first coordinate value of the parent node and the first coordinate value of the target drawing node, until the parent node traversed upward is the root node, and determines the second coordinate value of the target drawing node according to the first coordinate value and the intermediate coordinate value of the root node.

[0046] In another possible implementation of the first aspect, the interface display method may further include:

[0047] The electronic device displays a second interface, where the second interface includes second interface content;

[0048] In response to the zooming operation on the second interface, the electronic device displays a third interface, which includes the content of the second interface. The second interface content includes interface controls corresponding to the target drawing node. The interface controls of the third interface are in a compressed state, and the background area of ​​the interface controls corresponding to the target drawing node is blurred.

[0049] In one possible scenario, after the electronic device detects the user's zooming in / out operation on the second interface, the interface controls in the third interface displayed by the electronic device are in a compressed state. During the process of the electronic device displaying the third interface, after the electronic device detects the user's triggering operation on any position in the display screen, the electronic device can display a fourth interface, the fourth interface includes the second interface content, the interface controls of the fourth interface are in an uncompressed state, and the background area of ​​the interface controls corresponding to the target drawing node in the fourth interface is blurred.

[0050] In another possible implementation manner of the first aspect, the electronic device determines, according to a fuzzy parameter of the drawing node in the target interface to be displayed, that the drawing node is a target drawing node, including:

[0051] The electronic device obtains the attribute information of each drawing node in the target interface to be displayed; if the electronic device determines that the attribute information of the drawing node includes a fuzzy parameter, the electronic device determines that the drawing node is a target drawing node.

[0052] It can be understood that when the electronic device determines that the attribute information of the drawing node does not include the blur parameter, the electronic device determines that the drawing node does not need to be blurred. When the attribute information of the drawing node of the electronic device includes the blur parameter, the electronic device determines that the drawing node is a target drawing node for background blur processing.

[0053] In another possible implementation of the first aspect, the electronic device includes an application layer, a framework layer, and a system library, the application layer includes a target application, and before the electronic device determines that the stored background image is an image that is blurred based on a blur parameter, the method further includes:

[0054] After the electronic device obtains the background image based on the target application of the application layer, the target application sends the image identifier of the background image to the drawing node corresponding to each interface control of the framework layer; the drawing node corresponding to each interface control of the framework layer sends the image identifier to the corresponding drawing node in the system library; after receiving the image identifier, the drawing node corresponding to each interface control in the system library stores the image identifier as a parameter in the corresponding attribute information.

[0055] It can be understood that the electronic device obtains the image identifier based on the target application of the application layer and sends it to the drawing node corresponding to each interface control. After storing the icon identifier as a parameter in the attribute information corresponding to the drawing node, the electronic device determines the target drawing node and obtains the background image from the position indicated by the icon identifier stored in the attribute information of the target drawing node. The electronic device directly crops the background area corresponding to the position of the target drawing node from the background image and uses the target image as the background of the area corresponding to the control of the target drawing node. Since the electronic device can store the blurred background image, the background area corresponding to the position of each target drawing node can be directly cropped from the blurred background image without having to obtain the background image once when drawing the target drawing node and blur the obtained background image. By reducing the number of times the background image is obtained and blurred, the purpose of saving system power consumption is achieved.

[0056] In a second aspect, the present application provides an electronic device comprising: a display screen; one or more processors; and a memory; wherein the memory stores one or more computer programs, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute an interface display method as described in any one of the first aspects above.

[0057] In a third aspect, the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the interface display method as described in any one of the first aspects.

[0058] In a fourth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the interface display method as described in any one of the first aspects.

[0059] It can be understood that the electronic device described in the second aspect, the computer storage medium described in the third aspect, and the computer program product described in the fourth aspect are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0061] Figure 2 A software structure diagram of an electronic device provided in an embodiment of the present application;

[0062] Figure 3 A schematic diagram of the structure of a rendering tree provided in an embodiment of the present application;

[0063] Figure 4 An example of an interface display provided in the embodiment of the present application Figure 1 ;

[0064] Figure 5 An example diagram of coordinates of a drawing node provided in an embodiment of the present application;

[0065] Figure 6 An example of background blur provided in the embodiment of the present application Figure 1 ;

[0066] Figure 7 An example of an interface display provided in the embodiment of the present application Figure 2 ;

[0067] Figure 8 An example of an interface display provided in the embodiment of the present application Figure 3 ;

[0068] Fig. 9 An example of an interface display provided in an embodiment of the present application Figure 4 ;

[0069] Fig.10 An example of an interface display provided in an embodiment of the present application Figure 5 ;

[0070] Fig.11 An example of an interface display provided in an embodiment of the present application Figure 6 ;

[0071] Fig.12 An example of an interface display provided in an embodiment of the present application Figure 7 ;

[0072] Fig.13 An example of an interface display provided in an embodiment of the present application Figure 8 ;

[0073] Fig.14 An example of an interface display provided in an embodiment of the present application Figure 9 ;

[0074] Fig.15 Another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0075] The technical solution in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. In the description of the embodiment of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0076] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0077] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0078] In the related art, in order to achieve a better interface display effect, in some scenarios, the electronic device will blur the background area of ​​the interface control displayed in the interface. The interface control and the drawing node correspond to each other. In the process of the electronic device blurring the background area of ​​the drawing node, the electronic device usually obtains the background image corresponding to the drawing node, blurs the obtained background image, and then blurs the background area of ​​the drawing node according to the blurred background image.

[0079] The background area of ​​a drawing node whose background does not change frequently is usually a fixed background image, such as a notification bar or card displayed in a desktop application, which is a control whose background does not change frequently. However, in the process of an electronic device blurring the background area of ​​a drawing node whose background does not change frequently, the rendering thread of the electronic device needs to obtain the background image corresponding to each drawing node from the application layer and blur the obtained background image. It can be seen that when the electronic device draws each drawing node whose background is to be blurred, it obtains a background image once and blurs the obtained background image, which results in a high power consumption problem, thereby affecting the performance of the electronic device and the user experience.

[0080] To this end, an embodiment of the present application provides an interface display method, for each target drawing node to be blurred in the target interface to be displayed, the electronic device determines that the stored background image is an image blurred based on the blur parameter, and the electronic device directly cuts the first background area corresponding to the position of the target drawing node from the background image, and draws the first background area to the position of the target drawing node. As a result, the electronic device does not need to obtain a background image once when drawing each target drawing node, and blur the background image, and the purpose of saving system power consumption is achieved by reducing the number of times the background image is obtained and the number of times the blur is processed.

[0081] Exemplarily, the interface display method provided in the embodiments of the present application can be applied to mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart cars, smart speakers and other electronic devices with display screens, and the embodiments of the present application do not impose any restrictions on this.

[0082] like Figure 1 As shown, Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0083] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. 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, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0084] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0085] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0086] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0087] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0088] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0089] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0090] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0091] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to implement the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0092] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and 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 an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0093] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0094] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0095] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. 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, etc.

[0096] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0097] The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.

[0098] The power management module 141 is used to connect 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 charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.

[0099] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0100] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0101] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. 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 convert it into electromagnetic waves for radiation through the antenna 1.

[0102] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0103] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0104] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to 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 technology may include 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, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0105] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0106] The display screen 194 is used to display images, videos, etc. The 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 (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0107] In the embodiment of the present application, the display screen 194 is also used to display the target interface, which includes the interface control corresponding to the target drawing node, and the background area of ​​the interface control is the first background area after blurring.

[0108] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0109] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and 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 ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0110] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can 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 passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0111] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0112] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0113] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0114] 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 implement a data storage function, such as storing music, video and other files in the external memory card.

[0115] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0116] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0117] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0118] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0119] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0120] 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 speak by approaching the microphone 170C with his mouth to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C.

[0121] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0122] The pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals.

[0123] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .

[0124] 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 positioning and navigation.

[0125] The magnetic sensor 180D includes a Hall sensor, and the electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.

[0126] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0127] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by 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.

[0128] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode.

[0129] The ambient light sensor 180L is used to sense the 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 to prevent accidental touches.

[0130] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0131] The temperature sensor 180J is used to detect the temperature.

[0132] The touch sensor 180K is also called a “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.”

[0133] Bone conduction sensor 180M can obtain vibration signals.

[0134] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0135] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0136] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0137] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can 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 cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can 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 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0138] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes a system with a layered architecture as an example to exemplify the software structure of the electronic device.

[0139] Figure 2 A software structure diagram of an electronic device provided in an embodiment of the present application.

[0140] It is understandable that the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system may include an application layer (abbreviated as application layer), an application framework layer (Framework), a system library (Native Libs), and a hardware abstraction layer.

[0141] The above-mentioned application layer may include a series of application packages.

[0142] like Figure 2 As shown, the application package may include system applications. System applications refer to applications that are set in the electronic device before leaving the factory. For example, the system applications may include programs such as desktop, drop-down search, camera, gallery, calendar, music, short message, and weather.

[0143] The application package may also include third-party applications, which are applications that users install after downloading the installation package from an application store (or application market), such as map applications, food delivery applications, reading applications (such as e-books), social applications, and travel applications.

[0144] The above application framework layer (abbreviated as framework layer) provides an application programming interface (API) and a programming framework for the application programs in the application layer. The application framework layer includes some predefined functions.

[0145] like Figure 2 As shown, the framework layer may include a view system and a rendering node (RenderNode).

[0146] The view system includes visual controls, such as controls for displaying text and controls for displaying pictures. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying pictures.

[0147] The system library may include drawing nodes, rendering pipelines, and image rendering engines (Skia).

[0148] Among them, the drawing node is used to represent each element in the interface.

[0149] In the embodiment of the present application, the interface displayed by the electronic device can be implemented by a rendering tree (RenderTree), and the tree structure includes a number of drawing nodes, each of which includes corresponding control image drawing logic. Each drawing node can be set with various attributes, for example, the drawing node can be set with background effect attributes to add background effects to the background content contained in the control image corresponding to the node.

[0150] For example, Figure 3 A schematic diagram of a rendering tree structure provided in an embodiment of the present application. Figure 3 As shown, it is assumed that interface A can be implemented by drawing nodes 1 to 5.

[0151] The rendering pipeline is a channel for transmitting data.

[0152] The graphics rendering engine provides the ability to draw pictures and shapes.

[0153] In an embodiment of the present application, the hardware abstraction layer may include a graphics processor and a display screen.

[0154] In an embodiment of the present application, after the application layer obtains the background image and sets the blur parameters of each drawing node in the interface to be displayed by calling the background blur capability, the blur parameters of each drawing node and the picture identifier of the corresponding background image are sent to the framework layer. Among them, the blur parameters include but are not limited to blur radius and shape features (for example, rounded rectangle, circle or diamond, etc.). The blur radius is used to characterize the blur degree of the image, and the value of the blur radius is the value of the outward expansion of a certain pixel point. The background image refers to a picture used to blur the background of the drawing node. The picture identifier of the background image carries the storage address of the background image.

[0155] In the embodiment of the present application, the background image obtained by the application layer can be a clear image or a blurred image, which is not limited here. The above shape feature refers to the shape of the background image after processing.

[0156] After receiving the blur parameters and background image sent by the application layer, the framework layer sends the blur parameters and background image to the system library through the Java native interface (JNI).

[0157] After receiving the fuzzy parameters of each drawing node and the picture identifier of the background picture sent by the framework layer, the system library stores the fuzzy parameters and the picture identifier as parameters in the attribute information of the drawing node, wherein the picture identifier is used to indicate the storage location of the background picture.

[0158] In one possible case of an embodiment of the present application, the system library determines that the background image indicated by the image identifier stored in the attribute information of the drawing node is an image processed based on blur parameters, and the system library can blur the background area of ​​the drawing node according to the background image.

[0159] For ease of understanding, the following embodiments of the present application will take a mobile phone with the above-mentioned hardware structure and software architecture as an example, and combine the accompanying drawings to exemplarily illustrate the interface display method provided in the embodiments of the present application.

[0160] In an embodiment of the present application, when the mobile phone displays the target interface to be displayed, the mobile phone determines that the drawing node is the target drawing node whose background is to be blurred according to the blur parameters of each drawing node in the target interface. For each target drawing node in the target interface, the mobile phone cuts out the first background area corresponding to the position of the target drawing node from the stored background image; then, after the mobile phone draws the first background area to the position of the target drawing node, it draws the content of the target drawing node on the upper layer of the first background area to generate the target interface. Then, the display screen of the mobile phone displays the target interface, and the target interface includes the interface control corresponding to the target drawing node, and the background area of ​​the interface control is the first background area after blurring.

[0161] In one possible case of the present application, if the mobile phone determines that the stored background image is an image that has been blurred based on the blur parameter, the mobile phone cuts out the first background area corresponding to the position of the target drawing node from the background image. Then, after the mobile phone draws the first background area to the position of the target drawing node and draws the content of the target drawing node on the upper layer of the first background area, the target interface is displayed on the display screen of the mobile phone, and the target interface includes the interface control corresponding to the target drawing node, and the background area of ​​the interface control is the first background area after the blur processing.

[0162] In another possible case of the present application, if the mobile phone determines that the stored background image has not been blurred based on the blur parameter, the mobile phone uses the blur parameter of the target drawing node to blur the background image to obtain a blurred background image. Then, the mobile phone crops the first background area corresponding to the position of the target drawing node from the blurred background image.

[0163] The method for displaying the target interface on the display screen of the mobile phone can be applied to the scene where the target interface is displayed when the application is first started after the mobile phone is turned on, the scene where the target interface is displayed when the application is updated, and the scene where the target interface is displayed when the interface in the application is refreshed. The applicable scene of the above scheme is not limited in the embodiment of the present application. In addition, the application corresponding to the target interface displayed by the electronic device can be a desktop application, a negative one screen application, or other applications with infrequent background switching, which is not limited in the embodiment of the present application.

[0164] The following takes the above application as a desktop application and the scenario of displaying the target interface during the process of starting the desktop application when the mobile phone is turned on as an example to exemplarily describe the interface display method of the embodiment of the present application.

[0165] In the embodiment of the present application, when the mobile phone starts the desktop application, when the desktop application lays out the target interface to be displayed of the desktop application according to the application layout file, the desktop application can generate blur parameters corresponding to the target interface controls according to the display effect design of each interface control in the target interface in the application layout file. Among them, the target interface control refers to the control whose background is to be blurred and whose background image resources do not change frequently.

[0166] For example, Figure 4 As shown, the target interface controls can be some controls in the notification bar, for example, Figure 4 The control 401 shown in (a) may also be a control displayed on the desktop, for example, Figure 4 The control 402 and the control 403 shown in (b) may also be other controls displayed on the desktop, such as: Figure 4 Control 404 shown in (c) in FIG.

[0167] The application layout file of the above desktop application records the code logic of the drawing nodes corresponding to each control, the association relationship between the drawing nodes corresponding to each control (for example, parent-child relationship), the target control to be blurred and the timing of blurring the background of the target control, etc.

[0168] The timing for blurring the background of the target interface control may be when the target interface control is displayed on the desktop, or when the mobile phone detects that the target interface control is sliding on the desktop. The timing for blurring the background of the target control is not limited here.

[0169] It should be explained that, in the embodiment of the present application, when the desktop application lays out the target interface of the desktop, it is not limited to a specific application layout file and can also be set according to actual application requirements.

[0170] In an embodiment of the present application, the desktop application can set the horizontal blur radius and the vertical blur radius according to the design of the display effect of each interface control in the application layout file to generate blur parameters corresponding to the target interface control. After the desktop application generates the blur parameters corresponding to the target interface control, the desktop application can call the interface to send the blur parameters to the drawing node corresponding to the target interface control located in the framework layer. For example, the desktop application can send the blur parameters as the input parameters of the setHnBlurParameters interface to the drawing node corresponding to the target interface control in the framework layer. After receiving the blur parameters, the drawing node corresponding to the target interface control in the framework layer sends the blur parameters to the drawing node corresponding to the same target control in the system library through the JNI interface. Then, the drawing node of the system library stores the blur parameters as the attribute information of the drawing node corresponding to the target interface control in the structure of the drawing node.

[0171] The drawing nodes of the system library and the drawing nodes of the framework layer corresponding to the above target interface controls are different manifestations of the drawing nodes at different levels of the system software architecture. That is, the drawing nodes of the system library and the drawing nodes of the framework layer point to the content of the same target control.

[0172] In an embodiment of the present application, after the mobile phone obtains the background image used to blur the background area of ​​the target interface control based on the desktop application, the mobile phone can store the image identifier of the background image as a parameter in the attribute information of each drawing node. Among them, the image identifier is used to indicate the storage address of the background image. For example, the image identifier can carry the storage address of the background image. Therefore, when blurring the background area of ​​the target drawing node in the target interface of the desktop application, the background image can be directly obtained from the storage location indicated by the image identifier in the attribute information of the target drawing node, without the need to re-acquire the background image from the application layer, thereby saving part of the system's power consumption.

[0173] Exemplarily, when the desktop application first draws the target interface of the application, after the desktop application determines the background image of each interface control in the target interface according to the application layout file, the image identifier of the background image can be passed as a parameter to the system library. For example, the desktop application can send the image identifier as the input parameter of the setHnBlurParameters interface to the drawing node corresponding to the interface control. After the drawing node of the interface control receives the image identifier, the drawing node of the interface control can send the image identifier to the drawing node of the framework layer. After the drawing node of the framework layer receives the image identifier, it sends the image identifier to the drawing node of the system library through JNI. The drawing node of the system library stores the image identifier as the attribute information of the drawing node corresponding to the interface control in the structure of the drawing node of the system library. As a result, the system library can obtain the background image from the storage address of the background image indicated by the image identifier stored in the attribute information of each drawing node, without obtaining the background image from the application layer, saving part of the power consumption of the system.

[0174] For the convenience of subsequent introduction, in the embodiment of the present application, the image used to blur the background of the target interface control is named as the background image. Of course, naming the image used as the background as the background image here is only an exemplary description and is not limited here. The background image obtained by the above desktop application can be a blurred image or a clear image, which is not limited here.

[0175] In the embodiment of the present application, after the drawing node of the system library receives the blur parameter, the image rendering engine of the system library can generate a blur filter according to the blur radius in the blur parameter, and store the generated blur filter and blur parameter as parameters in the attribute information of the drawing node. The blur filter is used to blur the background image in the storage address carried by the image identifier in the attribute information of the drawing node.

[0176] Optionally, the image rendering engine can use an image blur algorithm (such as a Gaussian blur algorithm, a Kawase blur algorithm, or a radial blur algorithm, etc.) to generate a blur filter based on the horizontal blur radius and the vertical blur radius. For example, the image rendering engine uses a Gaussian blur algorithm to generate a Gaussian blur filter based on the blur radius. The working principle of the Gaussian blur filter is: for each pixel on an image, with this pixel as the center, the RGB components of the surrounding pixels are weighted averaged to replace the RGB components of this pixel, and the pixel is redrawn to obtain a Gaussian blur effect.

[0177] In an embodiment of the present application, when the desktop application is started, the main thread of the desktop application will be started together with the desktop application, and the main thread can call the rendering thread (Render Thread) to draw and render the background image corresponding to the target interface control to achieve blurring of the background of the target interface control. Among them, the Render Thread is a rendering thread used to share the drawing task of the main thread to reduce the burden of the main thread. Here, the main thread can call the Render Thread to draw and render the background image corresponding to the target interface control, so that when the main thread has time-consuming operations, it avoids the situation of rendering jams, thereby improving the smoothness of rendering.

[0178] In an embodiment of the present application, the main thread and the Render Thread each maintain a copy of the application window view information. The purpose of the main thread and the Render Thread each maintaining a copy of the application window view information is to avoid interfering with each other, thereby achieving maximum parallelism and saving the startup time of the desktop application. Among them, the view information of the application window maintained by the Render Thread comes from the main thread. Therefore, when the view information of the application window maintained by the main thread changes, it is necessary to synchronize the changed view information of the application window to the Render Thread. Among them, the view information of the application window may include the display list (DisplayList) of each drawing node, property information (Property) and the background image referenced in the display list (i.e., the Bitmap referenced by the Display List).

[0179] Exemplarily, the main thread can call the synFrameState function to synchronize the application window information to the Render Thread. For example, the main thread can call the synFrameState function to synchronize the attribute information of the drawing node of the frame layer to the attribute information of the drawing node of the system library.

[0180] The above main thread synchronizes the Display List maintained by the Render Thread to the Display List maintained by the Render Thread, so that the main thread and the Render Thread can be executed in parallel. This means that while the Render Thread is rendering the Display List of the current frame of the application window, the main program can prepare the Display List of the next frame of the application window, which makes the interface display of the application window smoother.

[0181] In an embodiment of the present application, each drawing node may include two properties. For example, a drawing node may include a Stagingproperty attribute and a property attribute. Among them, the parameters in the Stagingproperty attribute are parameters synchronized from the attribute information of the drawing node in the framework layer. For example, the main thread calls the synFrameState function to synchronize the attribute information of each drawing node in the framework layer to the attribute information of the Stagingproperty attribute of the corresponding drawing node in the system library. The attribute information of the Stagingproperty attribute includes but is not limited to the blur radius of the drawing node, the position information of the drawing node, the size of the drawing node, and the shape of the drawing node.

[0182] Among them, the position information of the drawing node may refer to the position information of the drawing node in the screen coordinate system. In an embodiment of the present application, the position information of the drawing node may be the first coordinate value of the drawing node relative to the screen. The screen coordinate system is a two-dimensional coordinate system established on the screen, and the coordinate origin of the screen coordinate system may be in the upper left corner of the entire screen. The position information of the drawing node in the screen coordinate system may be expressed as (StartX, StartY, EndX, EndY), where StartX is calculated from the leftmost side of the screen, 0 represents the leftmost edge, StartY is calculated from the top of the screen, 0 represents the topmost edge, EndX is calculated from the leftmost side of the screen, 0 represents the leftmost edge, and EndY is calculated from the top of the screen, 0 represents the topmost edge. Figure 5 An example diagram showing coordinate information of a drawing node in the screen coordinate system is shown in FIG. Figure 5 The left side of the drawing node is 10, the top side is 10, the right side is 60, and the bottom side is 60. The coordinate information of the drawing node is (10, 10, 60, 60).

[0183] To ensure thread safety and prevent two threads from operating the same property of a drawing node at the same time, before RenderThread renders each frame of the background image, Render Thread can synchronize the property information in the Stagingproperty attribute of each drawing node with the property attribute. When RenderThread subsequently blurs the background image according to the blur parameter, Render Thread directly calls the blur parameter included in the property information in the property attribute.

[0184] In the process in which the Render Thread synchronizes the attribute information in the Stagingproperty attribute of each drawing node to the attribute information of the property attribute, the Render Thread also synchronizes the blur filter generated in the above process to the corresponding drawing node, so that when the Render Thread blurs the background image subsequently, the Render Thread can call the blur filter to blur the background image to achieve a blur effect.

[0185] In addition, the Render Thread can calculate the coordinate value of the drawing node relative to the canvas based on the position information of the drawing node contained in the property of the drawing node, so as to obtain the correct area content on the transmitted background image as the background area of ​​the drawing node in the subsequent drawing process.

[0186] It should be explained that the position information in the property of the drawing node is the coordinate value of the drawing node relative to the root node. The coordinate value of the drawing node relative to the canvas refers to the coordinate value of the canvas when the drawing node is relative to the interface control in the drawing target interface. Since the canvas may not be full screen, that is, the size of the canvas and the display screen may not be exactly the same, when drawing the drawing node, it is necessary to consider converting the screen coordinate value of the drawing node to the coordinate value of the canvas.

[0187] As a possible implementation method, if the Render Thread determines that the parent node of the current drawing node is not empty, it adds the current offsetTop to the original offsetTop, and then continues to traverse the drawing nodes upward, obtains the offsetTop of the parent node of the parent node, and then adds it, and finally recursively obtains the vertical coordinate of the drawing node relative to the entire canvas, thereby converting the vertical coordinate value of the drawing node's screen coordinates to the vertical coordinate value relative to the canvas. Among them, offsetTop refers to the height of the drawing node relative to the parent coordinate specified by the offsetParent attribute from the top.

[0188] As another possible implementation manner, the Render Thread may call the canvas.getBoundingclientRect() function to convert the coordinates of the drawing node from the first coordinate value in the screen coordinate system to the coordinate value in the canvas.

[0189] Here, the horizontal coordinate of the coordinate value of the drawing node relative to the canvas also adopts this method, which will not be repeated here.

[0190] In the embodiment of the present application, after the Display List of the desktop application window is constructed, the main thread sends a rendering instruction to the Render Thread. After receiving the rendering instruction from the main thread, when the Render Thread draws each interface control in the target interface to be displayed of the desktop application on the canvas of the display screen, when the Render Thread executes the drawing node corresponding to each interface control, the Render Thread first determines whether to perform background blur processing on the drawing node. That is, the Render Thread first determines whether the drawing node is the target drawing node to determine whether to perform background blur processing on the drawing node.

[0191] If the Render Thread determines that the drawing node is not the target drawing node, that is, the Render Thread determines that the background blurring process does not need to be performed on the drawing node, then the Render Thread draws the background image on the canvas of the display screen, and then directly draws the content of the drawing node (for example, the application icon, the application name, or other text content, etc.) on the upper layer of the background image. If the Render Thread determines that the drawing node is the target drawing node to be subjected to background blurring process, that is, the Render Thread determines that the background blurring process is to be performed on the drawing node, then the Render Thread draws the background image on the canvas of the display screen, draws the content of the first background area subjected to background blurring process on the drawing node at the position corresponding to the drawing node, and then draws the content corresponding to the drawing node onto the canvas of the display screen.

[0192] The following takes the drawing node drawn by the Render Thread as the first drawing node as an example to describe the above process in detail.

[0193] Optionally, the Render Thread may determine whether the first drawing node is a target drawing node for background blurring based on the attribute information of the first drawing node. After the Render Thread obtains the attribute information of each first drawing node in the target interface to be displayed of the desktop application, the Render Thread may determine whether the attribute information of each first drawing node includes a blur filter and blur parameters to determine whether each first drawing node is a target drawing node.

[0194] In one possible case, if the Render Thread determines that the attribute information of the first drawing node does not include a blur filter and / or blur parameters, the Render Thread determines that the background blurring process does not need to be performed on the first drawing node. In this case, the Render Thread normally draws the first drawing node on the canvas of the display screen, and then the Render Thread continues to determine whether the next drawing node is a target drawing node for which the background blurring process is to be performed.

[0195] It can be understood that when the desktop application does not set the blur parameter of the first drawing node, after the desktop application passes the attribute information of the first drawing node to the system library through the framework layer, the attribute information of the first drawing node received by the system library does not include the blur parameter, and the system library will not generate a blur filter based on the blur parameter. In this case, RenderThread determines to draw the first drawing node normally on the canvas of the display screen.

[0196] In another possible case, if the Render Thread determines that the attribute information of the first drawing node includes a blur filter and / or blur parameter, the Render Thread determines that the first drawing node is a target drawing node, that is, the Render Thread determines to perform background blur processing on the target drawing node before drawing the target drawing node on the canvas of the display screen.

[0197] It can be understood that when the desktop application sets the blur parameters of the target drawing node, the desktop application passes the attribute information of the target drawing node to the system library through the framework layer. The attribute information of the target drawing node received by the system library includes the blur parameters. After the system library generates a blur filter according to the blur parameters of the target drawing node, the Render Thread determines that the attribute information of the target drawing node includes a blur filter and / or blur parameters.

[0198] In the embodiment of the present application, when the Render Thread uses the background image to blur the background of the target drawing node, it first determines whether to use the blur parameter included in the attribute information of the target drawing node to blur the background image.

[0199] Optionally, the Render Thread may determine whether to perform blur processing on the background image according to whether the background image received by the system library is an image delivered by the desktop application for the first time.

[0200] In the embodiment of the present application, after the desktop application sends the picture identifier of the background picture to the framework layer, the framework layer sends the picture identifier of the background picture to the system library through the JNI interface. If the Render Thread determines that the system library receives the picture identifier of the background picture through the JNI interface for the first time, the Render Thread sets the flag to the first preset value. After the Render Thread performs blur processing on the background picture, the flag is set to the second preset value.

[0201] For example, when the Render Thread determines that the system library receives the picture ID of the background picture for the first time through the JNI interface, the Render Thread can set the flag bit to 0. After the Render Thread performs blur processing on the background picture, the flag bit is set to 1. The value of the flag bit is used to indicate whether the picture ID of the background picture is received by the system library for the first time.

[0202] It should be explained that the above Render Thread sets the flag bit to 0 or 1 only as an exemplary description, and is not limited in the embodiments of the present application. For example, when the Render Thread determines that the system library receives the image identifier of the background image through the JNI interface for the first time, the Render Thread can also set the flag bit to TRUE; after the Render Thread blurs the background image, the Render Thread can set the flag bit to FALSE.

[0203] In one possible case, if the Render Thread determines that the value of the flag is the first preset value, the Render Thread determines that the JNI interface receives the image identifier of the background image for the first time. In other words, the Render Thread determines that the background image has not been used to perform background blur processing on the target drawing node. In this case, the Render Thread determines to use the blur parameter included in the attribute information of the target drawing node to blur the background image.

[0204] In another possible case, if the Render Thread determines that the value of the flag is the second preset value, the Render Thread determines that the image identifier of the background image is not the first one passed down by the desktop application, that is, the Render Thread has used the background image to perform background blur processing on the target drawing node. In other words, the background image is a blurred image.

[0205] In an embodiment of the present application, when the Render Thread determines that the background image is a blurred image, the Render Thread can determine whether the background image is an image processed based on the fuzzy parameters of the target drawing node, so as to determine whether to use the fuzzy parameters of the target drawing node to blur the background image according to the judgment result.

[0206] As a possible implementation method, the Render Thread can obtain blur parameters from the attribute information of the target drawing node, determine whether the blur parameters used to blur the background image are the same as the blur parameters of the target drawing node, and determine whether to blur the background image again.

[0207] In an embodiment of the present application, after the Render Thread determines that the background image is a blurred image, the Render Thread obtains the blur parameters included in the attribute information of the target drawing node. If the Render Thread determines that the blur parameters corresponding to the target drawing node are the same as the blur parameters for blurring the background image, the Render Thread determines that there is no need to use the blur parameters of the target drawing node to blur the background image. If the Render Thread determines that the blur parameters corresponding to the target drawing node are different from the blur parameters for blurring the background image, that is, the Render Thread determines that the blur parameters of the target drawing node have changed. In this case, the Render Thread determines to use the blur parameters corresponding to the target drawing node to blur the background image.

[0208] In an embodiment of the present application, when the Render Thread uses the blur parameters corresponding to the target drawing node to blur the background image, the Render Thread sends the rendering instruction to the graphics processor, and the graphics processor blurs the background image through the blur filter in the attribute information of the target drawing node to obtain a blurred background image, and stores the blurred background image.

[0209] Here, the graphics processor may send the blurred background image to the storage location of the background image for storage, or may use the blurred background image to replace the background image stored in the storage location to save storage memory, which is not limited here.

[0210] In one possible case of an embodiment of the present application, when the Render Thread determines that there is no need to blur the background image, the Render Thread can clip the first background area corresponding to the position of the target drawing node from the background image. That is, the Render Thread can obtain the coordinate value of the target drawing node relative to the canvas according to the above calculation, and clip the first background area corresponding to the position of the coordinate value of the canvas of the drawing node from the background image. Then, the Render Thread draws the first background area as the background to the position of the corresponding coordinate value on the canvas, so as to use the first background area as the background of the target drawing node, so as to achieve the effect of blurring the background of the target drawing node.

[0211] For example, Figure 6 As shown, assuming Figure 6 (a) in FIG. 6 shows a canvas 601 of a display screen. Figure 6 (b) in FIG. 6 is the background image 603. The Render Thread determines the position of a drawing node on the canvas. Figure 6 In area 602 in (a), the Render Thread starts Figure 6 The background image 603 in (b) is cropped and Figure 6 Then, the Render Thread uses the background area 604 to perform background blur processing on the drawing node, that is, the Render Thread cuts out the background area 604 from the background image 603, and uses the background area 604 as the background of the drawing node to draw it on the canvas 601 of the display screen. After the Render Thread performs background blur processing on the drawing node, the display effect on the canvas of the display screen is as follows: Figure 6 As shown in (c) in .

[0212] In another possible case of the embodiment of the present application, when the Render Thread determines to use the blur parameters of the target drawing node to blur the background image, the Render Thread uses the blur parameters of the target drawing node to blur the background image. After obtaining the blurred background image, the Render Thread can obtain the coordinate value of the target drawing node relative to the canvas according to the above calculation, and cut the first background area corresponding to the position of the coordinate value of the canvas from the blurred background image. Then, the Render Thread draws the first background area as the background to the position of the coordinate value of the canvas, so as to use the first background area as the background of the target drawing node, thereby achieving the effect of blurring the background of the target drawing node.

[0213] In the embodiment of the present application, the Render Thread uses the first background area as the background of the target drawing node, and after drawing it to the corresponding coordinate position on the canvas, the Render Thread draws the content corresponding to the target drawing node (for example, the icon or text of the application) on the layer above the first background area. Then, the Render Thread continues to draw other drawing nodes of the desktop application on the canvas until all drawing nodes are completed on the canvas.

[0214] For example, Figure 7 As shown, the Render Thread uses the first background area as the background of the drawing node, and after drawing it to the area 701 corresponding to the drawing node on the canvas, the Render Thread draws the content corresponding to the drawing node on the upper layer of the first background area. Figure 7 The icons of application A, application B, application C, and application D are drawn on the upper layer of the first background area.

[0215] When actually drawing the target interface of the desktop application, the Render Thread first draws the entire background image of the target interface on the canvas. Then, the Render Thread uses the first background area as the background of the target drawing node, draws it to the position corresponding to the target drawing node on the canvas, and then draws the target drawing node content to the layer above the first background area. Figure 7 The entire background image of the target interface is not shown in the drawing on the canvas.

[0216] In an embodiment of the present application, after Render Thread determines that all drawing nodes in the target interface to be displayed of the desktop application are drawn in the canvas of the display screen, Render Thread sends a Vsync signal to the SurfaceFlinger function. After receiving the Vsync signal, the Surface Flinger function synthesizes the background image of the target interface, each drawing node and the corresponding layer of the first background area, and sends the synthesized image to the display screen for display, so as to display the target interface of the desktop application.

[0217] Exemplarily, the Surface Flinger function may call the message processing function handleMessageRefresh to implement the process of synthesizing an image and displaying the synthesized image on a display screen.

[0218] In a possible situation of an embodiment of the present application, when the areas of two controls in the target interface to be displayed of the desktop application overlap, for example, one control is the control corresponding to the target drawing node, and the other control is the control corresponding to the second drawing node. When the Render Thread determines that the control corresponding to the target drawing node overlaps with the control corresponding to the second drawing node in the target interface, and the size of the control corresponding to the target drawing node is larger than the size of the control corresponding to the second drawing node, the Render Thread will use the background area clipped from the background image as the background of the target drawing node, and after drawing it to the corresponding position on the canvas, when the Render Thread draws the second drawing node on the canvas, if the Render Thread determines to blur the background of the second drawing node, the Render Thread can clip the background area with the same position as the second drawing node from the above background image according to the position of the coordinate value of the second drawing node relative to the canvas. Then, the Render Thread draws the background area corresponding to the second drawing node to the layer above the background area corresponding to the target drawing node, and then, the Render Thread draws the content corresponding to the second drawing node. Therefore, when the backgrounds corresponding to different drawing nodes are the same, there is no need to repeatedly blur the background image. The background area corresponding to the position of the drawing node can be directly cropped from the cached background image. By reducing the number of times the background image is blurred, the purpose of reducing device power consumption is achieved.

[0219] For example, Figure 8 As shown in (a) in FIG. 1 , the backgrounds corresponding to the interface controls 801 and 802 are the same. The Render Thread uses the background area as the background of the drawing node corresponding to the interface control 801 and draws it to the corresponding position on the canvas of the display screen. Figure 8 The background blurred area 803 shown in (b) in the figure. When the Render Thread draws the drawing node corresponding to the interface control 802 on the canvas, if the Render Thread determines to blur the background of the drawing node corresponding to the interface control 802, and the drawing node corresponding to the interface control 801 is the same as the background of the drawing node corresponding to the interface control 802, then the Render Thread can cut out the background area that is the same as the position of the drawing node corresponding to the interface control 802 from the above background image according to the position of the coordinate value of the drawing node corresponding to the interface control 802 relative to the canvas. Then, the Render Thread draws the background area corresponding to the drawing node corresponding to the interface control 802 onto the background area corresponding to the drawing node corresponding to the interface control 801.

[0220] In an embodiment of the present application, after the desktop application is started, while the mobile phone is displaying the display interface of the desktop application, the mobile phone detects a sliding operation of the display interface by the user. In response to the sliding operation of the display interface, the display interface of the mobile phone can display a sliding process interface or a post-sliding interface.

[0221] In one possible scenario, after the desktop application is started, while the mobile phone displays the first interface, the electronic device detects a user sliding operation on the first interface, and in response to the sliding operation on the first interface, the mobile phone displays a sliding process interface.

[0222] The first interface may display the first interface content, the sliding process interface also includes the first interface content, and the first interface content includes the interface controls corresponding to the target drawing node, the interface controls of the sliding process interface are in a compressed state, and the background area of ​​the interface controls corresponding to the target drawing node in the sliding process interface is blurred.

[0223] It can be understood that, in response to the user's sliding operation on the first interface, the mobile phone displays an interface of the change process from the first display page to the target display page after the background blurring process is performed on the target drawing node.

[0224] For example, Fig. 9 An example of an interface display provided in an embodiment of the present application Figure 4 . Fig. 9 In (a), the mobile phone displays a first interface 901, wherein the first interface 901 includes an interface control 902 that has not been blurred. After the mobile phone detects that the user slides the first interface 901 to the left, in response to the sliding operation, the mobile phone displays an interface 903 in which the interface control 902 in the first interface 901 is blurred, as shown in FIG. Fig. 9 As shown in (b) of FIG. 9 , the interface 903 includes a blurred interface control 904. In response to the sliding operation, the mobile phone continues to display the sliding process interface. Fig. 9 The interface 905 shown in (c) and Fig. 9 In (d), interface 907 is shown, wherein interface 905 and interface 907 are the above sliding process interfaces, interface 905 and interface 907 have interface controls in a compressed state, and interface 905 includes a compressed interface control 906. Interface control 906 is an interface control obtained by compressing interface control 904. Interface controls in interface 907 are also in a compressed state, and interface 907 includes a compressed interface control 908.

[0225] It should be explained that in the above example Fig. 9 The interface control 902 displayed in the first interface 901 shown in (a) is an example of an interface control that has not been subjected to background blur processing. Fig. 9The interface control 902 displayed in the first interface 901 in (a) may also be an interface control after background blurring. Fig.10 The sliding process shown in FIG. 1 is used as an example for description.

[0226] For example, Fig.10 An example of an interface display provided in an embodiment of the present application Figure 5 . Fig.10 In (a), the mobile phone displays the first interface 1001, wherein the first interface 1001 includes a blurred interface control 1002. After the mobile phone detects that the user slides the first interface 1001 to the left, the mobile phone displays the sliding process interface in response to the sliding operation. Fig.10 The interface 1003 shown in (b) and Fig.10 Interface 1005 shown in (c) of FIG. 1 , wherein interface 1003 and interface 1005 are the above-mentioned sliding process interfaces, the interface controls in interface 1003 are in a compressed state, and interface 1003 includes compressed interface controls 1004. Interface controls 1004 are interface controls that are obtained by compressing interface controls 1002. Interface 1005 is also the above-mentioned sliding process interface, and the interface controls in interface 1005 are also in a compressed state, and interface 1005 includes compressed interface controls 1006.

[0227] In another possible scenario, after the desktop application is started, while the mobile phone displays the first interface, the electronic device detects a sliding operation of the user on the first interface, and in response to the sliding operation on the first interface, the mobile phone displays the post-sliding interface.

[0228] The above-mentioned interface after sliding also includes the first interface content. The interface controls of the interface after sliding are in a compressed state, and the background area of ​​the interface controls corresponding to the target drawing node in the interface after sliding is blurred.

[0229] It can be understood that, in response to the user's sliding operation on the first interface, the mobile phone directly displays the interface after sliding, and does not display the change process of the interface during the sliding process.

[0230] For example, Fig.11 An example of an interface display provided in an embodiment of the present application Figure 6 .like Fig.11 As shown, Fig.11 In (a), the mobile phone displays the first interface 1101, wherein the first interface 1101 includes a blurred interface control 1102. After the mobile phone detects that the user slides the first interface 1101 to the left, in response to the sliding operation, the mobile phone displays the interface after the sliding, i.e. Fig.11In the interface 1103 shown in (b), the interface 1103 displays the interface control 1104 after compressing the interface control 1102.

[0231] It should be explained that in the above example Fig.11 The interface control 1102 displayed in the first interface 1101 shown in (a) is an example of an interface control after background blur processing. Fig.11 The interface control 1102 displayed in the first interface 1101 in (a) may also be an interface control after background blurring. Fig.12 The sliding process shown in FIG. 1 is used as an example for description.

[0232] For example, Fig.12 An example of an interface display provided in an embodiment of the present application Figure 7 .like Fig.12 As shown, Fig.12 In (a), the mobile phone displays the first interface 1201, wherein the first interface 1201 includes an interface control 1202 that has not been blurred. After the mobile phone detects that the user slides the first interface 1201 to the left, in response to the sliding operation, the mobile phone directly displays the interface after the sliding, that is, Fig.12 In the interface 1203 shown in (b), the interface 1203 displays the interface control 1204 after the background of the interface control 1202 is blurred and compressed.

[0233] In an embodiment of the present application, after the desktop application is started, during the process of the mobile phone displaying the first interface, the mobile phone detects a user's sliding operation on the first interface. In response to the sliding operation, the mobile phone can determine the horizontal compression ratio and vertical compression ratio of the control corresponding to the target drawing node relative to the preset size canvas based on the first coordinate value of the target drawing node in the first interface in the canvas corresponding to the first interface and the second coordinate value relative to the preset size canvas. Then, the mobile phone electronic device compresses the first display page according to the horizontal compression ratio and the vertical compression ratio, and after obtaining the target display page, the mobile phone displays the target display page. Among them, the first display page includes the interface control corresponding to the target drawing node, and the area corresponding to the interface control is blurred. The interface control in the target display page is in a compressed state, and the background area of ​​the interface control corresponding to the target drawing node is blurred.

[0234] In one possible case, after responding to the sliding operation, if the mobile phone determines that the background image indicated by the image identifier in the attribute information of the target drawing node is an image blurred based on the blur parameter, the mobile phone cuts out the second background area corresponding to the compressed position of the target drawing node from the background image. Then, the mobile phone stretches the second background area according to the horizontal compression ratio and the vertical compression ratio to obtain the target background area. After the mobile phone draws the target background area to the position of the target drawing node, it draws the content of the target drawing node on the upper layer of the target background area to obtain the blurred first display page. The mobile phone compresses the blurred first display page according to the horizontal compression ratio and the vertical compression ratio to obtain the target display page.

[0235] Optionally, the Render Thread may determine the horizontal scaling ratio according to the ratio of the horizontal coordinate value of the second coordinate value of the target drawing node relative to the preset size canvas to the horizontal coordinate value of the first coordinate value of the target drawing node. The Render Thread may determine the vertical scaling ratio according to the ratio of the vertical coordinate value of the second coordinate value of the target drawing node relative to the preset size canvas to the vertical coordinate value of the first coordinate value of the target drawing node.

[0236] In an embodiment of the present application, if the Render Thread determines that the background image stored in the attribute information of the target drawing node is an image blurred based on blur parameters, the Render Thread cuts out the second background area corresponding to the position of the compressed target drawing node from the background image. That is, the Render Thread determines the second background area corresponding to the position of the target drawing node in a preset size canvas. Then, the Render Thread stretches the second background area according to the horizontal compression ratio and the vertical compression ratio to obtain the target background area. After the Render Thread draws the target background area to the position of the target drawing node, it draws the content of the target drawing node on the upper layer of the target background area to obtain a first display page. Among them, the first display page includes an interface control corresponding to the target drawing node, and the background area of ​​the interface control is blurred.

[0237] Render Thread compresses the first display page according to the horizontal compression ratio and the vertical compression ratio to obtain the target display page. Then, the target display page is displayed on the display screen of the mobile phone. Among them, the target display page includes the interface control corresponding to the compressed target drawing node, and the background area of ​​the interface control is also blurred. Therefore, after Render Thread cuts the second background area corresponding to the compressed target drawing node from the background image, it stretches the second background area according to the horizontal scaling ratio and the vertical scaling ratio, and draws the stretched target background area onto a canvas of a preset size, which not only realizes the blurred background of the target drawing node during the interface sliding process, but also can adapt to the compression animation of the canvas in real time.

[0238] For example, Fig.13 An example of an interface display provided in an embodiment of the present application Figure 8 , Fig.13 (a) in the figure shows the display effect of the target drawing node in the interface after sliding. The Render Thread obtains the horizontal scaling ratio and the vertical scaling ratio according to the ratio of the horizontal coordinate of the second coordinate value of the target drawing node to the horizontal coordinate of the first coordinate value of the target drawing node, and the ratio of the vertical coordinate of the second coordinate value of the target drawing node to the vertical coordinate of the first coordinate value of the target drawing node. The Render Thread can calculate the coordinate value of the compressed target drawing node in the compressed canvas 1 of the display screen. The Render Thread crops the first background area 1301 corresponding to the position of the target drawing node in the canvas 1 from the background image or the background blurred image after blurring the background image. Then, the Render Thread stretches the first background area according to the horizontal scaling ratio and the vertical scaling ratio, and draws the stretched target background area 1302 onto the canvas 2, as shown in FIG. Fig.13 As shown in (b) in .

[0239] In a possible scenario of an embodiment of the present application, after the desktop application is started and the second interface is displayed, in response to the user's zooming in / out operation on the second interface, the mobile phone displays a third interface. The third interface includes the second interface content, the second interface content includes the interface controls corresponding to the target drawing node, the interface controls of the third interface are in a compressed state, and the background area of ​​the interface controls corresponding to the target drawing node is blurred.

[0240] It can be understood that, when the display screen of the mobile phone displays the second interface, after the mobile phone detects a compression operation of the second interface by the user, the mobile phone displays the compressed third interface.

[0241] For example, Fig.14(a) in FIG. 1 shows an interface 1401, in which an interface control 1402 corresponding to a target drawing node is displayed. The mobile phone detects a user's compression operation (eg, sliding up) on the interface 1401, and in response to the compression operation, the mobile phone displays Fig.14 The interface 1403 in (b) is shown. The interface 1403 displays a compressed interface control 1404. The mobile phone detects a user trigger operation (eg, a click operation) at any position in the interface 1403, and the mobile phone continues to display Fig.14 Interface 1401 in (a).

[0242] To sum up, in an embodiment of the present application, for an interface control whose background switches infrequently, the Render Thread can directly crop the background area from the background image stored in the attribute information of the drawing node corresponding to the control as the background of the drawing node. There is no need to obtain a background image once when drawing each drawing node and blur the obtained background image. This not only reduces the number of times the background image is obtained, but also reduces the number of times the background image is blurred, thereby effectively reducing the power consumption of the device.

[0243] Alternatively, if the Render Thread determines that the background image stored in the attribute information of the drawing node has not been blurred by the blur parameters of the drawing node, the Render Thread may blur the background image stored in the attribute information of the drawing node according to the blur parameters in the attribute information of the drawing node, and cut the background area from the blurred background image after blurring as the background of the drawing node. It can be seen that the Render Thread does not need to obtain the background image from the application layer again, which saves the time of obtaining the background image and achieves the purpose of reducing the power consumption of the device.

[0244] like Fig.15 As shown, an embodiment of the present application discloses an electronic device, which may be the mobile phone mentioned above. The electronic device may specifically include: a touch screen 1501, wherein the touch screen 1501 includes a touch sensor 1506 and a display screen 1507; one or more processors 1502; a memory 1503; one or more application programs (not shown); and one or more computer programs 1504, and the above-mentioned components may be connected via one or more communication buses 1505. Among them, the above-mentioned one or more computer programs 1504 are stored in the above-mentioned memory 1503 and are configured to be executed by the one or more processors 1502, and the one or more computer programs 1504 include instructions, which may be used to execute the relevant steps in the above-mentioned embodiments.

[0245] It is understandable that, in order to realize the above functions, the above-mentioned electronic devices, etc. include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present invention.

[0246] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device etc. according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0247] In the case of dividing each functional module according to each function, a possible composition diagram of the electronic device involved in the above embodiment, the electronic device may include: a display unit, a transmission unit and a processing unit, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0248] The embodiment of the present application also provides an electronic device, including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the above-mentioned related method steps to implement the interface display method in the above-mentioned embodiment.

[0249] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the interface display method in the above-mentioned embodiment.

[0250] An embodiment of the present application further provides a computer program product, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the interface display method in the above-mentioned embodiment.

[0251] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the device executes the interface display method executed by the electronic device in the above-mentioned method embodiments.

[0252] Among them, the electronic device, computer-readable storage medium, computer program product or device provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0253] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0254] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0255] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.

[0256] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An interface display method, characterized in that: The method comprises: The electronic device determines, according to the blur parameter of the drawing node in the target interface to be displayed, that the drawing node is a target drawing node, wherein the target drawing node refers to a drawing node whose background is to be blurred; For each of the target drawing nodes, if the electronic device determines that the stored background image is an image that has been blurred based on the blur parameter, the electronic device cuts out a first background area corresponding to the position of the target drawing node from the background image; After the electronic device draws the first background area to the position of the target drawing node, the electronic device draws the content of the target drawing node on the upper layer of the first background area to generate the target interface; The electronic device displays the target interface, where the target interface includes an interface control corresponding to the target drawing node, and a background area of ​​the interface control is the first background area after the blurring process.

2. The method according to claim 1, characterized in that The method further comprises: The electronic device obtains the background image based on the target application corresponding to the target interface; The electronic device stores the picture identifier of the background picture as a parameter in the attribute information of each drawing node; The electronic device determines that the stored background image is an image that is fuzzy processed based on the fuzzy parameter, including: The electronic device determines that the background image indicated by the stored image identifier in the attribute information of the target drawing node is an image that has been fuzzy processed based on the fuzzy parameter.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: If the electronic device determines that the stored background image has not been blurred based on the blur parameter, the electronic device uses the blur parameter to blur the background image to obtain a blurred background image; The electronic device crops the first background area corresponding to the position of the target drawing node from the blurred background image.

4. The method according to claim 3, characterized in that The electronic device determines that the stored background image has not been blurred based on the blur parameter, including: If the electronic device determines that the background image is obtained from the target application for the first time, the electronic device determines that the background image has not been blurred based on the blur parameter; or, If the electronic device determines that the blur parameter for blurring the background image is different from the blur parameter of the target drawing node, the electronic device determines that the background image has not been blurred based on the blur parameter.

5. The method according to claim 3, characterized in that: The blur parameter includes a blur radius, and the electronic device uses the blur parameter to blur the background image to obtain a blurred background image, including: The electronic device generates a blur filter according to the blur radius, where the blur radius is used to represent the blur degree of the background image; The electronic device blurs the background image through the blur filter to obtain the blurred background image.

6. The method according to any one of claims 1, 2, 4 or 5, characterized in that The method further comprises: The electronic device displays a first interface, where the first interface includes first interface content; In response to a sliding operation on the first interface, the electronic device displays a sliding process interface or a post-sliding interface, and the sliding process interface or the post-sliding interface both include the first interface content, and the first interface content includes the interface controls corresponding to the target drawing node. The interface controls of the sliding process interface or the post-sliding interface are in a compressed state, and the background area of ​​the interface controls corresponding to the target drawing node is blurred.

7. The method according to claim 6, characterized in that In response to the sliding operation on the first interface, the electronic device displays a sliding process interface or a post-sliding interface, including: In response to the sliding operation, the electronic device determines, according to a first coordinate value of the target drawing node in the canvas corresponding to the first interface and a second coordinate value relative to the canvas of a preset size, a horizontal compression ratio and a vertical compression ratio of the control corresponding to the target drawing node relative to the canvas of a preset size; The electronic device compresses the first display page according to the horizontal compression ratio and the vertical compression ratio to obtain a target display page, wherein the first display page includes an interface control corresponding to the target drawing node, and an area corresponding to the interface control is blurred; The electronic device displays the target display page, the interface controls in the target display page are in a compressed state, and the background area of ​​the interface controls corresponding to the target drawing node is blurred.

8. The method according to claim 7, characterized in that After responding to the sliding operation, the method further includes: If the electronic device determines that the stored background image is an image that has been blurred based on the blur parameter, the electronic device cuts out a second background area corresponding to the compressed position of the target drawing node from the background image; The electronic device stretches the second background area according to the transverse compression ratio and the longitudinal compression ratio to obtain a target background area; After the electronic device draws the target background area to the position of the target drawing node, the electronic device draws the content of the target drawing node on the upper layer of the target background area to obtain the first display page after blurring; The electronic device compresses the first display page according to the horizontal compression ratio and the vertical compression ratio, including: The electronic device compresses the blurred first display page according to the horizontal compression ratio and the vertical compression ratio.

9. The method according to claim 7, characterized in that: Before the electronic device displays the target display page, the electronic device displays a sliding process interface, further comprising: The electronic device displays an interface of a change process from the first display page after the blurring process to the target display page.

10. The method according to any one of claims 7 to 9, characterized in that: Before the electronic device determines, based on the first coordinate value of the target drawing node in the canvas corresponding to the first interface and the second coordinate value relative to the canvas of a preset size, a horizontal compression ratio and a vertical compression ratio of the control corresponding to the target drawing node relative to the canvas of a preset size, the method further includes: The electronic device determines first coordinate values ​​of a canvas corresponding to all drawing nodes in the first interface on the first interface; The electronic device traverses upward based on the target drawing node to determine a first coordinate value of a parent node of the target drawing node; An intermediate coordinate value is determined according to the first coordinate value of the parent node and the first coordinate value of the target drawing node, until the parent node traversed upward is a root node, and the second coordinate value of the target drawing node is determined according to the first coordinate value of the root node and the intermediate coordinate value.

11. The method according to any one of claims 1, 2, 4, 5 or 7-9, characterized in that: The method further comprises: The electronic device displays a second interface, where the second interface includes second interface content; In response to a zoom operation on the second interface, the electronic device displays a third interface, wherein the third interface includes the second interface content, the second interface content includes the interface controls corresponding to the target drawing node, the interface controls of the third interface are in a compressed state, and the background area of ​​the interface controls corresponding to the target drawing node is blurred.

12. The method according to any one of claims 1, 2, 4, 5 or 7-9, characterized in that: The electronic device determines, according to the fuzzy parameter of the drawing node in the target interface to be displayed, that the drawing node is a target drawing node, including: The electronic device obtains attribute information of each drawing node in the target interface to be displayed; If the electronic device determines that the attribute information of the drawing node includes the fuzzy parameter, the electronic device determines that the drawing node is the target drawing node.

13. The method according to any one of claims 1, 2, 4, 5 or 7-9, characterized in that: The electronic device includes an application layer, a framework layer and a system library, the application layer includes a target application, and before the electronic device determines that the stored background image is a image that is blurred by the blur parameter, the method further includes: After the electronic device obtains the background image based on the target application of the application layer, the target application sends the image identifier of the background image to the drawing node corresponding to each interface control of the framework layer; The drawing node corresponding to each interface control of the framework layer sends the image identifier to the corresponding drawing node in the system library; After receiving the picture identifier, the drawing node corresponding to each interface control in the system library stores the picture identifier as a parameter in the corresponding attribute information.

14. An electronic device, characterized in that: include: Display screen; one or more processors; Memory; Wherein, one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device executes the interface display method as described in any one of claims 1-13.

15. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, characterized in that: When the instruction is executed on an electronic device, the electronic device executes the interface display method as described in any one of claims 1 to 13.