Control background rendering method and device, electronic equipment and storage medium

By obtaining screenshot data of container controls and determining the blurred and mixed color background, the problem of being unable to set background blur and mixed color for different controls in the prior art is solved, and the separation and drawing of the control background and content is realized, the power consumption caused by redrawing is reduced, and the response speed of the UI interface is improved.

CN119902669APending Publication Date: 2025-04-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311403246.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The prior art cannot set background blur and color mixing on different controls in the system, and can only blur the overall or cross-layer background of the control.

Method used

By obtaining the container background screenshot data corresponding to the container control, determine the blurred color background of the control to be rendered, and draw the background on the main canvas according to the control's position in the container, generate the control's background image, and then draw the element content image on the background image.

Benefits of technology

The background blur and color mixing processing of different controls is realized, and the control background drawing and content drawing process is separated, which reduces the redrawing work when background changes, reduces power consumption and improves the response speed of the UI interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902669A_ABST
    Figure CN119902669A_ABST
Patent Text Reader

Abstract

The invention relates to a control background rendering method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining first screenshot data of a container background corresponding to a container control, determining a first fuzzy mixed color background of a to-be-rendered control according to the first screenshot data, the to-be-rendered control is an off-screen control, according to a first preset control position of the to-be-rendered control in the container control, the first fuzzy color mixing background is drawn on the main canvas interface to generate a first control background image of the to-be-rendered control, and the element content image of the to-be-rendered control is drawn on the first control background image. Therefore, in the off-screen control drawing process, the element background drawing process and the element other content drawing process are separated, when the fuzzy mixed color background of the off-screen control changes, an off-screen parent control does not need to be drawn again, and power consumption in the control drawing process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of electronic technology, and in particular to a control background rendering method, device, electronic device and storage medium. Background Art

[0002] In the related technology, the use of blur in the system display only blurs the entire control, and the control background blur only blurs the background across layers, that is, blurring the background of specific areas of other layers under the current layer, but it is not possible to set background blur and color mixing for different controls in the system. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a control background rendering method, device, electronic device and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, a control background rendering method is provided, comprising:

[0005] Acquire first screenshot data of a container background corresponding to a container control, wherein a plurality of sub-controls of the container control include a control to be rendered, and the control to be rendered is an off-screen control;

[0006] Determine a first fuzzy mixed color background of the control to be rendered according to the first screenshot data;

[0007] According to a first preset control position of the control to be rendered in the container control, drawing the first fuzzy mixed color background on the main canvas interface to generate a first control background image of the control to be rendered;

[0008] The element content image of the control to be rendered is drawn on the first control background image.

[0009] Optionally, determining a first fuzzy mixed color background of a control to be rendered according to the first screenshot data includes:

[0010] Acquire second screenshot data of the container control on the preset interface;

[0011] The first screenshot data and the second screenshot data are subjected to fuzzy color mixing processing to generate the first fuzzy color mixing background.

[0012] Optionally, performing fuzzy color mixing processing on the first screenshot data and the second screenshot data to generate the first fuzzy color mixing background includes:

[0013] Performing a weighted average of each pixel in the first screenshot data and surrounding pixels to generate a first blurred background image, and performing a weighted average of each pixel in the second screenshot data and surrounding pixels to generate a second blurred background image;

[0014] A weighted average is performed on each pixel in the first screenshot data and the second screenshot data to generate the first fuzzy mixed color background.

[0015] Optionally, the method further comprises:

[0016] In response to the change of the container background, acquiring second screenshot data of the changed container background;

[0017] Determine a second fuzzy mixed color background of the control to be rendered according to the second screenshot data;

[0018] Based on the first preset control position, drawing the element content image on the second fuzzy mixed color background to generate a second control background image of the control to be rendered;

[0019] The second control background image is drawn on the changed main canvas interface.

[0020] Optionally, obtaining the second screenshot data of the replaced container background includes:

[0021] Obtaining a changed background image of the main canvas interface after the change;

[0022] Acquire the third screenshot data of the container control on the preset interface;

[0023] The changed background image and the third screenshot data are subjected to fuzzy color mixing processing to generate the second screenshot data.

[0024] Optionally, drawing the element content image of the control to be rendered on the first control background image includes:

[0025] Obtaining a preset image size of the control to be rendered on the main canvas interface;

[0026] Scaling the element content image according to the preset image size to generate a target content image;

[0027] The target content image is drawn on the first control background image.

[0028] According to a second aspect of an embodiment of the present disclosure, a control background rendering device is provided, comprising:

[0029] An acquisition module is configured to acquire first screenshot data of a container background corresponding to a container control, wherein a plurality of sub-controls of the container control include a control to be rendered, and the control to be rendered is an off-screen control;

[0030] A determination module, configured to determine a first fuzzy mixed color background of the control to be rendered according to the first screenshot data;

[0031] A generating module, configured to draw the first fuzzy mixed color background on the main canvas interface according to a first preset control position of the control to be rendered in the container control, so as to generate a first control background image of the control to be rendered;

[0032] The execution module is configured to draw the element content image of the control to be rendered on the first control background image.

[0033] Optionally, the determining module includes:

[0034] An acquisition submodule, configured to acquire second screenshot data of the container control on a preset interface;

[0035] The generating submodule is configured to perform fuzzy color mixing processing on the first screenshot data and the second screenshot data to generate the first fuzzy color mixing background.

[0036] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0037] processor;

[0038] a memory for storing processor-executable instructions;

[0039] Among them, the processor is configured to execute the executable instructions to implement the steps of any one of the control background rendering methods in the first aspect of the present disclosure.

[0040] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the control background rendering method provided in the first aspect of the present disclosure are implemented.

[0041] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0042] Through the above method, the first screenshot data of the container background corresponding to the container control is obtained, and the first fuzzy mixed color background of the control to be rendered is determined according to the first screenshot data. The multiple sub-controls of the container control include the control to be rendered, and the control to be rendered is an off-screen control. According to the first preset control position of the control to be rendered in the container control, the first fuzzy mixed color background is drawn on the main canvas interface to generate the first control background image of the control to be rendered, and the element content image of the control to be rendered is drawn on the first control background image. In this way, the process of drawing the element background and drawing other content of the element is separated during the drawing process of the off-screen control. When the fuzzy mixed color background of the off-screen control changes, the off-screen parent control does not need to be redrawn, thereby reducing power consumption during the control drawing process.

[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0045] Figure 1 The present invention is a flowchart of a control background rendering method according to an exemplary embodiment.

[0046] Figure 2 It is a schematic diagram of a container control according to an exemplary embodiment.

[0047] Figure 3 The figure is a schematic diagram of a control background rendering method according to an exemplary embodiment.

[0048] Figure 4 The figure is a flow chart of a method for determining a fuzzy mixed color background according to an exemplary embodiment.

[0049] Figure 5 The present invention is a block diagram of a control background rendering device according to an exemplary embodiment.

[0050] Figure 6 is a block diagram of an electronic device 600 according to an exemplary embodiment. DETAILED DESCRIPTION

[0051] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0052] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0053] In the related art, when the parent control of the control to be rendered that needs a fuzzy mixed color background includes an off-screen control, each time the background of the control to be rendered is refreshed, the entire off-screen parent control must be refreshed first, that is, the background of each off-screen control must be re-rendered. The present invention solves the problem that when the off-screen parent control does not change and only the fuzzy mixed color background changes, the off-screen parent control does not need to be redrawn, thereby reducing power consumption.

[0054] Figure 1 is a flowchart of a control background rendering method according to an exemplary embodiment. Figure 1 As shown, the method is used in a terminal and includes the following steps.

[0055] In step S11, first screenshot data of a container background corresponding to a container control is obtained, wherein a plurality of sub-controls of the container control include a control to be rendered, and the control to be rendered is an off-screen control.

[0056] For example, this embodiment is applicable to the scenario of editing the terminal UI interface, where there will be multiple sub-controls, and the sub-controls include the parent control of the control to be rendered as a container control. The control to be rendered is an off-screen control that requires blurred background rendering. An off-screen control is an invisible control on the screen. Usually, an off-screen control is outside the screen or hidden somewhere on the screen, and the user cannot directly see or interact with the control. For example, the off-screen control is used for data preloading, background calculations, and demonstration of animation effects. The container control includes multiple sub-controls, and the multiple sub-controls include non-off-screen sub-controls and off-screen controls to be rendered.

[0057] Figure 2 FIG. 1 is a schematic diagram of a container control according to an exemplary embodiment. Figure 2 As shown, there are 6 off-screen parent controls in the container control, and each of the 6 off-screen parent controls has a to-be-rendered control that requires blurred background rendering, and the to-be-rendered control is an off-screen control.

[0058] For example, in this embodiment, when editing the UI interface, it is determined whether the current terminal is in the blurred background mode. It should be noted that in the process of editing the UI interface, the terminal must be in the blurred background mode to render the blurred background for the control to be rendered, and the rendering method of the off-screen control in the blurred background mode is different from the rendering method of the off-screen control in the non-blurred background mode. In the blurred background mode, it is necessary to obtain all the background contents of all parent controls corresponding to the off-screen control, determine the background image of the off-screen control based on the entire background content, and then render the background of the off-screen control based on the background image, and then draw the screenshot on the main canvas interface; in the non-blurred background mode, it is only necessary to draw the content of the control to be rendered on the preset interface corresponding to the off-screen parent control, and then draw the screenshot of the preset interface on the main canvas interface. Therefore, in the process of drawing the UI interface, the current mode of the terminal is first determined. When it is determined that the terminal is currently in the blurred background mode, it is determined whether the control to be rendered is an off-screen control. When it is determined that the currently drawn control to be rendered is an off-screen control, a screenshot of the container background of the container control where the control to be rendered is located is obtained to generate the first screenshot data.

[0059] In step S12, a first fuzzy mixed color background of the control to be rendered is determined according to the first screenshot data.

[0060] In this embodiment, the first fuzzy mixed color background of the control to be rendered is determined based on the first screenshot data of the container background corresponding to the container control. For example, an interface screenshot of the off-screen parent control binding interface corresponding to the control to be rendered is obtained, and the interface screenshot and the first screenshot data are fuzzy mixed to generate the first fuzzy mixed background of the control to be rendered. The first screenshot data is the background image presented after the preset background of the container control on the main canvas interface is mixed with the initial background image of the underlying window, that is, the first screenshot data is the screenshot data of the background effect presented after the container control background and the initial background are mixed and superimposed, which includes the background of the container control and the underlying initial image background.

[0061] In step S13, according to the first preset control position of the control to be rendered in the container control, a first fuzzy mixed color background is drawn on the main canvas interface to generate a first control background image of the control to be rendered.

[0062] For example, in this embodiment, according to the first preset control position of the control to be rendered in the container control, the first fuzzy mixed color background is drawn on the main canvas interface to generate the first control background image of the control to be rendered. In this way, the background drawing of the control to be rendered and the drawing of the corresponding element of the control to be rendered are separated. In the rendering process of the control to be rendered, the element background is first drawn on the corresponding position of the main canvas interface based on the first fuzzy mixed color background of the control to be rendered, and then the element content of the control to be rendered is drawn on the fuzzy mixed color background.

[0063] It should be noted that the rendering method of the control to be rendered in this embodiment realizes the separate drawing of the element background and the element content, so that when the element background of the control to be rendered changes, it is only necessary to redraw the fuzzy mixed color background based on the changed background, without changing the element content on the background, thereby avoiding the overall redrawing of the off-screen control, improving the response speed of the UI interface during the background change, avoiding the overhead caused by the redrawing of the off-screen control, and improving the performance of the terminal. For example, when the desktop background image of the terminal is transformed, according to the position of the control to be rendered in the main canvas interface, the fuzzy mixed color background corresponding to the element mixed color mode is drawn to the position, and when the element content of the control to be rendered does not change, there is no need to redraw the element content, thereby completing the drawing of the control to be rendered.

[0064] In step S14, the element content image of the control to be rendered is drawn on the first control background image.

[0065] For example, in this embodiment, after the first control background image of the control to be rendered is drawn to the corresponding position of the main canvas interface through the above steps, the element content of the control to be rendered is drawn on the first control background image to achieve the drawing of the control to be rendered.

[0066] Optionally, in some implementations, the above step S14 includes:

[0067] Get the preset image size of the control to be rendered on the main canvas interface;

[0068] scaling the element content image according to a preset image size to generate a target content image;

[0069] Draw the target content image over the first control background image.

[0070] It should be understood that the element content in the control to be rendered needs to be scaled and changed based on the preset control position and preset image size of the control to be rendered on the main canvas interface. After scaling the element content image according to the preset image size, a target content image is generated, and then the target content image is drawn on the first control background image, thereby achieving the drawing of the element content in the control to be rendered.

[0071] Optionally, in one implementation, after the above step S14, the method further includes:

[0072] In response to the change of the container background, obtaining second screenshot data of the changed container background;

[0073] Determine a second fuzzy mixed color background of the control to be rendered according to the second screenshot data;

[0074] Based on the first preset control position, the element content image is drawn on the second fuzzy mixed color background to generate a second control background image of the control to be rendered;

[0075] Draw the background image of the second control on the changed main canvas interface.

[0076] For example, when the user uses the UI interface, the background pattern of the underlying background in the UI interface will be adjusted based on personal preferences. When the underlying background changes, the corresponding container background will also change. When the container background changes, the second screenshot data of the changed container background is obtained. It should be noted that the second screenshot data of the container background at this time is generated after fuzzy color mixing between the changed underlying background and the screenshot data on the preset interface corresponding to the container control. Based on the second screenshot data of the container background after the change, the second fuzzy mixed color background of the control to be rendered is determined. At this time, the method for determining the fuzzy mixed color background based on the screenshot data is the same as in the above step S12, and can refer to the above step S12, which will not be repeated here.

[0077] Optionally, in one implementation, the above step of “obtaining second screenshot data of the replaced container background” includes:

[0078] Get the changed background image of the main canvas interface after the change;

[0079] Get the third screenshot data of the container control on the preset interface;

[0080] A fuzzy color mixing process is performed on the changed background image and the third screenshot data to generate the second screenshot data.

[0081] For example, in this embodiment, when the background image of the main canvas interface changes, the changed background image on the window layer of the main canvas interface after the change is obtained. Then, the third screenshot data of the container control on the preset interface is determined, and the third screenshot data and the changed background image are fuzzy mixed to generate the second screenshot data.

[0082] For example, in this embodiment, the element background of the control to be rendered changes, but the corresponding element content does not send changes. Based on the above drawing logic, when the element background changes, only the element background image of the control to be rendered needs to be changed, while the element content remains unchanged, avoiding repeated drawing of off-screen controls and improving terminal performance during UI interface drawing. According to the first preset control position determined in the main canvas interface of the control to be rendered, the element content image is drawn on the second fuzzy mixed color background to generate the second control background image of the control to be rendered, and then the second control background image is drawn on the changed main canvas interface, thereby achieving redrawing of the control to be rendered.

[0083] For example, Figure 3 is a schematic diagram of a control background rendering method according to an exemplary embodiment. Figure 3 As shown. After detecting that the underlying background of the main canvas interface has changed, the container background is redrawn first. After the container background is redrawn, the fuzzy mixed color background of the control to be rendered is determined based on the screenshot of the changed container background. According to the position of the control to be rendered in the main canvas interface, the fuzzy mixed color background corresponding to the element's mixed color mode is drawn to the corresponding position of the main canvas, thereby separating the drawing of the element background from the drawing of the element content. When the element content remains unchanged, the element content in the fuzzy mixed color background is retained, thereby avoiding the overall redrawing of the off-screen control when the background changes, improving the terminal performance. In this way, when the off-screen content remains unchanged and only the fuzzy background changes, it is only necessary to redraw the element background without redrawing the entire off-screen parent control.

[0084] Through the above method, the first screenshot data of the container background corresponding to the container control is obtained, and the first fuzzy mixed color background of the control to be rendered is determined according to the first screenshot data. The multiple sub-controls of the container control include the control to be rendered, and the control to be rendered is an off-screen control. According to the first preset control position of the control to be rendered in the container control, the first fuzzy mixed color background is drawn on the main canvas interface to generate the first control background image of the control to be rendered, and the element content image of the control to be rendered is drawn on the first control background image. In this way, the process of drawing the element background and drawing other content of the element is separated during the drawing process of the off-screen control. When the fuzzy mixed color background of the off-screen control changes, the off-screen parent control does not need to be redrawn, thereby reducing power consumption during the control drawing process.

[0085] Figure 4 is a flow chart of a method for determining a fuzzy mixed color background according to an exemplary embodiment. Figure 4 As shown, the above step S12 includes the following steps.

[0086] In step S121, second screenshot data of the container control on the preset interface is obtained.

[0087] In step S122, fuzzy color mixing processing is performed on the first screenshot data and the second screenshot data to generate a first fuzzy color mixing background.

[0088] For example, a container control is bound to a preset interface, and a sub-control corresponding to the container control is drawn on the preset interface. In this embodiment, the second screenshot data of the container control on the preset interface is obtained, so that the second screenshot data and the first screenshot data are fuzzy mixed color processed to generate a first fuzzy mixed color background. The fuzzy mixed color processing is used to perform fuzzy processing and mixed color processing on the background image of the off-bottle control, so that the processed background image can blur the background of the off-screen control.

[0089] Optionally, the above step S122 includes:

[0090] Performing a weighted average of each pixel in the first screenshot data and surrounding pixels to generate a first blurred background image, and performing a weighted average of each pixel in the second screenshot data and surrounding pixels to generate a second blurred background image;

[0091] A weighted average is performed on each pixel in the first blurred background image and the second blurred background image to generate a first blurred mixed color background.

[0092] For example, in this embodiment, the first screenshot data and the second screenshot data are subjected to fuzzy color mixing processing based on the pixel values ​​and color values ​​of the pixels in the first screenshot data and the second screenshot data. For example, for the first screenshot data and the second screenshot data, a weighted average is performed between each pixel in the screenshot data and the surrounding pixels to generate a first blurred background image and a second blurred background image. Then, a weighted average is performed on the color values ​​of the pixels at the same position in the first blurred background image and the second blurred background image to generate a first blurred color mixing background.

[0093] Through the above method, after the fuzzy mixed color processing is performed on multiple frames of screenshot data, the fuzzy mixed color background generated after the processing has the corresponding color of the screenshot data and will not be affected by obvious interference colors. When the user uses off-screen controls for interactive control, the type of upper-level controls can be determined based on the fuzzy mixed color background, but at the same time it will not affect the selection and use of controls on this layer.

[0094] Figure 5 is a block diagram of a control background rendering device according to an exemplary embodiment. Figure 5 The device 100 includes: an acquisition module 110, a determination module 120, a generation module 130 and an execution module 140.

[0095] The acquisition module 110 is configured to acquire first screenshot data of a container background corresponding to a container control, wherein a plurality of sub-controls of the container control include a control to be rendered, and the control to be rendered is an off-screen control;

[0096] A determination module 120 is configured to determine a first fuzzy mixed color background of the control to be rendered according to the first screenshot data;

[0097] The generating module 130 is configured to draw the first fuzzy mixed color background on the main canvas interface according to the first preset control position of the control to be rendered in the container control, so as to generate a first control background image of the control to be rendered;

[0098] The execution module 140 is configured to draw the element content image of the control to be rendered on the first control background image.

[0099] Optionally, the determination module 120 includes:

[0100] An acquisition submodule, configured to acquire second screenshot data of the container control on a preset interface;

[0101] The generating submodule is configured to perform fuzzy color mixing processing on the first screenshot data and the second screenshot data to generate the first fuzzy color mixing background.

[0102] Optionally, generate submodules, configured as:

[0103] Performing a weighted average of each pixel in the first screenshot data and surrounding pixels to generate a first blurred background image, and performing a weighted average of each pixel in the second screenshot data and surrounding pixels to generate a second blurred background image;

[0104] The first blurred mixed-color background is generated by performing weighted averaging on each pixel in the first blurred background image and the second blurred background image.

[0105] Optionally, the device 100 further includes a drawing module, and the drawing module includes:

[0106] A screenshot submodule is configured to obtain second screenshot data of the replaced container background in response to the replacement of the container background;

[0107] a determination submodule, configured to determine a second fuzzy mixed color background of the control to be rendered according to the second screenshot data;

[0108] A drawing submodule is configured to draw the element content image on the second fuzzy mixed color background based on the first preset control position to generate a second control background image of the control to be rendered;

[0109] The execution submodule is configured to draw the second control background image on the changed main canvas interface.

[0110] Optionally, the screenshot submodule is configured as follows:

[0111] Obtaining a changed background image of the main canvas interface after the change;

[0112] Acquire the third screenshot data of the container control on the preset interface;

[0113] The changed background image and the third screenshot data are subjected to fuzzy color mixing processing to generate the second screenshot data.

[0114] Optionally, the execution module is configured to:

[0115] Obtaining a preset image size of the control to be rendered on the main canvas interface;

[0116] Scaling the element content image according to the preset image size to generate a target content image;

[0117] The target content image is drawn on the first control background image.

[0118] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0119] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and when the program instructions are executed by a processor, the steps of the control background rendering method provided by the present disclosure are implemented.

[0120] Figure 6 is a block diagram of an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0121] Reference Figure 6 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 606 , an audio component 610 , an input / output interface 612 , a sensor component 614 , and a communication component 616 .

[0122] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned control background rendering method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 606 and the processing component 602.

[0123] The memory 604 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0124] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.

[0125] The multimedia component 606 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 606 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0126] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0127] The input / output interface 612 provides an interface between the processing component 602 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0128] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0129] The communication component 616 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0130] In an exemplary embodiment, the electronic device 600 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned control background rendering method.

[0131] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to complete the above-mentioned control background rendering method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0132] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned control background rendering method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip including a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned control background rendering method is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned control background rendering method.

[0133] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned control background rendering method when executed by the programmable device.

[0134] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0135] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A control background rendering method, characterized in that: include: Acquire first screenshot data of a container background corresponding to a container control, wherein a plurality of sub-controls of the container control include a control to be rendered, and the control to be rendered is an off-screen control; Determine a first fuzzy mixed color background of the control to be rendered according to the first screenshot data; According to a first preset control position of the control to be rendered in the container control, drawing the first fuzzy mixed color background on the main canvas interface to generate a first control background image of the control to be rendered; The element content image of the control to be rendered is drawn on the first control background image.

2. The method according to claim 1, characterized in that The step of determining a first fuzzy mixed color background of the control to be rendered according to the first screenshot data includes: Acquire second screenshot data of the container control on the preset interface; The first screenshot data and the second screenshot data are subjected to fuzzy color mixing processing to generate the first fuzzy color mixing background.

3. The method according to claim 2, characterized in that The performing fuzzy color mixing processing on the first screenshot data and the second screenshot data to generate the first fuzzy color mixing background includes: Performing a weighted average of each pixel in the first screenshot data and surrounding pixels to generate a first blurred background image, and performing a weighted average of each pixel in the second screenshot data and surrounding pixels to generate a second blurred background image; The first blurred mixed-color background is generated by performing weighted averaging on each pixel in the first blurred background image and the second blurred background image.

4. The method according to claim 1, characterized in that The method further comprises: In response to the change of the container background, acquiring second screenshot data of the changed container background; Determine a second fuzzy mixed color background of the control to be rendered according to the second screenshot data; Based on the first preset control position, drawing the element content image on the second fuzzy mixed color background to generate a second control background image of the control to be rendered; The second control background image is drawn on the changed main canvas interface.

5. The method according to claim 4, characterized in that The step of obtaining the second screenshot data of the replaced container background includes: Obtaining a changed background image of the main canvas interface after the change; Acquire the third screenshot data of the container control on the preset interface; The changed background image and the third screenshot data are subjected to fuzzy color mixing processing to generate the second screenshot data.

6. The method according to claim 1, characterized in that The step of drawing the element content image of the control to be rendered on the first control background image includes: Obtaining a preset image size of the control to be rendered on the main canvas interface; Scaling the element content image according to the preset image size to generate a target content image; The target content image is drawn on the first control background image.

7. A control background rendering device, characterized in that: include: An acquisition module is configured to acquire first screenshot data of a container background corresponding to a container control, wherein a plurality of sub-controls of the container control include a control to be rendered, and the control to be rendered is an off-screen control; A determination module, configured to determine a first fuzzy mixed color background of the control to be rendered according to the first screenshot data; A generating module, configured to draw the first fuzzy mixed color background on the main canvas interface according to a first preset control position of the control to be rendered in the container control, so as to generate a first control background image of the control to be rendered; The execution module is configured to draw the element content image of the control to be rendered on the first control background image.

8. The device according to claim 7, characterized in that The determining module comprises: An acquisition submodule, configured to acquire second screenshot data of the container control on a preset interface; The generating submodule is configured to perform fuzzy color mixing processing on the first screenshot data and the second screenshot data to generate the first fuzzy color mixing background.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the executable instructions to implement the steps of the control background rendering method described in any one of claims 1-6.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.