Background color rendering method and device, electronic equipment and program product

By setting the scroll view and switch in the mobile application to determine whether to carry the skin color value to render the background color, the problem of wasted network resources and interface lag caused by background skin changes in the existing technology is solved, and a flexible and efficient background is achieved. Skin settings.

CN118535818APending Publication Date: 2024-08-23SICHUAN COVER MEDIA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410723738.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-08-23

Smart Images

  • Figure CN118535818A
    Figure CN118535818A
Patent Text Reader

Abstract

The invention discloses a background color rendering method and device, electronic equipment and a program product, and relates to the technical field of image rendering. The method is used for background color rendering of a mobile terminal application, a scroll view used for switching pictures displayed by a home page channel and a switch used for indicating whether information returned by triggering the scroll view is allowed to carry skin color values of all the pictures in the home page channel are arranged in the mobile terminal application, and the method comprises the steps that whether the switch is turned on or not is judged; if so, rendering the color of the channel currently displayed on the home page based on the skin color value of each picture carried in the information returned by triggering the scroll view; and if so, extracting a skin color value corresponding to the currently displayed picture in the home page channel, and rendering the color of the currently displayed channel of the home page based on the extracted skin color value. According to the method, the device, the electronic equipment and the program product disclosed by the invention, flexible setting of the background skin can be realized on the premise of not wasting network resources and time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image rendering, and in particular relates to a background color rendering method, device, electronic equipment and program product. Background Art

[0002] With the development of mobile Internet, various news consulting mobile applications are emerging in the market. When choosing mobile applications, users will consider interface appearance, visual effects, user experience, etc. more.

[0003] In the prior art, the background color of mobile applications is mostly obtained and set through a setting interface when the mobile application is started. When you want to temporarily change the background skin of the mobile application, you can only keep calling the skin acquisition interface. This not only wastes network resources, but also fails to flexibly set the background skin. In some user interface (UI) designs with complex requirements, the interface may be stuck, affecting the user experience. Summary of the invention

[0004] The purpose of the present invention is to provide a background color rendering method, device, electronic equipment and program product to solve the above problems existing in the prior art.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] In a first aspect, the present invention provides a background color rendering method for background color rendering of a mobile application, wherein a scroll view for switching pictures displayed on a home channel and a switch for indicating whether the information returned by triggering the scroll view is allowed to carry the skin color value of each picture in the home channel are set in the mobile application, characterized in that it includes:

[0007] Determining whether the switch is turned on;

[0008] If the switch is turned on, the color of the channel currently displayed on the homepage is rendered based on the skin color value of each picture carried in the information returned by the triggered scroll view, where different skin color values ​​correspond to different colors;

[0009] If the switch is turned off, the skin color value corresponding to the picture currently displayed in the home channel is extracted, and the color of the channel currently displayed on the home channel is rendered based on the skin color value corresponding to the picture currently displayed in the home channel.

[0010] Based on the above disclosed content, the present invention determines whether the switch used to indicate whether the information returned by the triggered scroll view is allowed to carry the skin color value of each picture in the home channel is turned on; if the switch is turned on, the color of the channel currently displayed on the home page is rendered based on the skin color value of each picture carried in the information returned by the triggered scroll view; if the switch is turned off, the skin color value corresponding to the picture currently displayed in the home channel is extracted, and the color of the channel currently displayed on the home page is rendered based on the skin color value corresponding to the picture currently displayed in the home channel. In this way, if you want to temporarily change the background skin of the mobile application, you only need to turn on the switch, and render the color of the channel currently displayed on the home page according to the skin color value carried in the information returned from the background by triggering the scroll view, so that the background skin can be changed. In this process, there is no need to call the skin acquisition interface, and network resources and time will not be wasted. Flexible setting of the background skin can be achieved. At the same time, for some relatively complex UI designs, the interface will not be stuck due to changing the background skin. While improving the visual effect, it can make relatively flexible, efficient and fast interface changes.

[0011] In one possible design, before determining whether the switch is turned on, the method further includes:

[0012] After the mobile application is started, obtaining the interface theme skin color value of the mobile application;

[0013] If the current theme style of the mobile application is not a fixed style, obtaining channel information of the homepage channel;

[0014] If the channel information of the home channel includes a skin color value, rendering the background color of the home channel based on the skin color value included in the channel information of the home channel;

[0015] If the channel information of the home channel does not include a skin color value, the background color of the home channel is rendered based on the interface theme skin color value.

[0016] In a possible design, after obtaining the interface theme skin color value of the mobile terminal application, the method further includes:

[0017] The interface theme skin color value of the mobile terminal application is stored in global data, and the priority of the interface theme skin color value of the mobile terminal application is set to the lowest.

[0018] In one possible design, the method further includes:

[0019] If the channel information of a certain channel includes the skin color value of the certain channel, the priority of the skin color value of the certain channel is set to be higher than the priority of the skin color value of the interface theme of the mobile terminal application.

[0020] In one possible design, the fixed styles include an all gray style, an all red style, a channel gray style, and a home channel gray style.

[0021] In a possible design, if the current theme style of the mobile application is not a fixed style, obtaining the channel information of the homepage channel includes:

[0022] If the current theme style of the mobile terminal application is not a fixed style, after the home channel of the mobile terminal application is loaded, the channel information of the home channel is obtained.

[0023] In a possible design, the pictures in the homepage channel are switched for display at every preset time interval.

[0024] In a second aspect, the present invention provides a background color rendering device for background color rendering of a mobile application, wherein a scroll view for switching pictures displayed on a home channel and a switch for indicating whether the information returned by triggering the scroll view is allowed to carry the skin color value of each picture in the home channel are set in the mobile application, including:

[0025] A judging unit, used to judge whether the switch is turned on;

[0026] a rendering unit, configured to render the color of the channel currently displayed on the homepage based on the skin color value of each picture carried in the information returned by triggering the scroll view if the switch is turned on, wherein different skin color values ​​correspond to different colors;

[0027] An extraction unit, configured to extract the skin color value corresponding to the picture currently displayed in the homepage channel if the switch is turned off;

[0028] The rendering unit is also used to render the color of the channel currently displayed on the homepage based on the skin color value corresponding to the picture currently displayed in the homepage channel after extracting the skin color value corresponding to the picture currently displayed in the homepage channel.

[0029] In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the background color rendering method as described in the first aspect or any possible design of the first aspect.

[0030] In a fourth aspect, the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, executes the background color rendering method described in the first aspect or any possible design of the first aspect.

[0031] In a fifth aspect, the present invention provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the background color rendering method as described in the first aspect or any possible design of the first aspect.

[0032] Beneficial effects:

[0033] The background color rendering method, device, electronic device and program product provided by the present invention, when the background skin of the mobile application needs to be temporarily changed, only the switch needs to be turned on, and the color of the channel currently displayed on the homepage is rendered according to the skin color value carried in the information returned from the background by triggering the scroll view, thereby completing the change of the background skin. In this process, there is no need to call the skin acquisition interface, and network resources and time will not be wasted. Flexible setting of the background skin can be achieved. At the same time, for some interfaces with relatively complex UI designs, the interface will not be stuck due to changing the background skin. While improving the visual effect, the interface changes can be made relatively flexibly, efficiently and quickly, which is convenient for practical application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A flowchart of a background color rendering method provided in an embodiment of the present application;

[0035] Figure 2 A schematic block diagram of a background color rendering device provided in an embodiment of the present application;

[0036] Figure 3 A schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.

[0038] It should be understood that although the terms first, second, etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another unit. For example, a first unit can be referred to as a second unit, and similarly, a second unit can be referred to as a first unit without departing from the scope of the exemplary embodiments of the present invention.

[0039] It should be understood that the term "and / or" that may appear in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" that may appear in this article describes another type of association object relationship, indicating that two relationships may exist. For example, A / and B can represent two situations: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this article generally indicates that the previous and next associated objects are in an "or" relationship.

[0040] In order to facilitate the change of the background skin of mobile applications, the embodiments of the present application provide a background color rendering method, device, electronic device and program product. The background color rendering method, device, electronic device and program product can realize flexible setting of the background skin, and can make interface changes relatively flexibly, efficiently and quickly while improving the visual effect.

[0041] The background color rendering method provided in the embodiment of the present application can be applied to a mobile terminal, which can be, but is not limited to, a tablet computer, a smart phone, a personal digital assistant (PDA), etc. It can be understood that the execution subject does not constitute a limitation on the embodiment of the present application.

[0042] The background color rendering method provided in the embodiment of the present application will be described in detail below.

[0043] like Figure 1 As shown, it is a flowchart of the background color rendering method provided by the first aspect of the embodiment of the present application. The background color rendering method can be used for background color rendering of mobile applications. In the mobile application, a scrolling view for switching the pictures displayed in the home channel and a switch for indicating whether the information returned by triggering the scrolling view is allowed to carry the skin color values ​​of each picture in the home channel are set. The background color rendering method can include but is not limited to the following steps S101-S103.

[0044] Step S101: Determine whether the switch is turned on.

[0045] Step S102: If the switch is turned on, the color of the channel currently displayed on the homepage is rendered based on the skin color value of each picture carried in the information returned by the triggered scroll view.

[0046] Among them, different skin color values ​​correspond to different colors.

[0047] A scroll view banner for switching pictures displayed on the home channel is provided in the mobile application. By triggering the scroll view banner, the picture displayed on the home channel can be switched from one picture to another.

[0048] In the embodiment of the present application, a switch is also provided for indicating whether the information returned by triggering the scroll view banner is allowed to carry the skin color value of each picture in the home channel, that is, after turning on the switch, if the scroll view banner is triggered, the message fed back to the mobile terminal by the background server of the mobile terminal application due to triggering the scroll view banner will carry the skin color value of each picture in the home channel. After turning off the switch, if the scroll view banner is triggered, the message fed back to the mobile terminal by the background server of the mobile terminal application due to triggering the scroll view banner will not carry the skin color value of each picture in the home channel.

[0049] Therefore, if the switch is turned on and the scroll view banner is triggered, the skin color value of each picture (in the home channel) will be carried in the information returned by the scroll view. At this time, the color of the channel currently displayed on the home page can be rendered based on the skin color value of each picture carried in the information returned by the scroll view, thereby achieving the background color rendering of the channel currently displayed on the home page. In this process, there is no need to call the skin acquisition interface.

[0050] Step S103: If the switch is off, extract the skin color value corresponding to the picture currently displayed in the homepage channel, and render the color of the channel currently displayed on the homepage based on the skin color value corresponding to the picture currently displayed in the homepage channel.

[0051] If the switch is turned off, the message fed back to the mobile terminal due to triggering the scroll view banner will not carry the skin color values ​​of the pictures in the home channel. At this time, the mobile terminal can extract the skin color value corresponding to the picture currently displayed in the home channel, and then render the color of the channel currently displayed on the home channel based on the skin color value corresponding to the picture currently displayed in the home channel, thereby realizing the background color rendering of the channel currently displayed on the home page.

[0052] In one or more embodiments, the pictures in the home channel may be switched and displayed at every preset time interval, and the preset time interval may be set according to actual conditions, for example, 3 seconds, 5 seconds or 10 seconds, etc. In this way, the pictures displayed in the home channel may be automatically switched.

[0053] Therefore, through the aforementioned steps S101-S103, if you want to temporarily change the background skin of the mobile application, you only need to turn on the switch and render the color of the channel currently displayed on the homepage according to the skin color value carried in the information returned from the background by triggering the scroll view banner, so as to complete the change of the background skin. In this process, there is no need to call the skin acquisition interface, and network resources and time will not be wasted. The background skin can be flexibly set. At the same time, for some interfaces with relatively complex UI designs, the interface will not be stuck due to changing the background skin. While improving the visual effect, the interface changes can be made relatively flexibly, efficiently and quickly.

[0054] Based on the technical solution of the first aspect mentioned above, this embodiment further specifically proposes a possible design for rendering the background skin of the home channel of the mobile application when the mobile application is just started, which may include but is not limited to the following steps S201-S204.

[0055] Step S201. After the mobile application is started, the interface theme skin color value of the mobile application is obtained.

[0056] Among them, the interface theme skin color value can be pre-set in the background.

[0057] In one or more embodiments, after obtaining the interface theme skin color value of the mobile application, the interface theme skin color value of the mobile application can be stored in global data, and the priority of the interface theme skin color value of the mobile application can be set to the lowest.

[0058] Step S202: If the current theme style of the mobile application is not a fixed style, the channel information of the homepage channel is obtained.

[0059] Specifically, if the current theme style of the mobile application is not a fixed style, the channel information of the home channel can be obtained after the home channel of the mobile application is loaded.

[0060] The fixed style may include, but is not limited to, an all gray style, an all red style, a channel gray style, and a home channel gray style. In a fixed style, the background color of some or all channels of the mobile application remains fixed, for example, in an all gray style, the background color of all channels of the mobile application is set to a fixed gray, in an all red style, the background color of all channels of the mobile application is set to a fixed red, in a channel gray style, the background color of some channels is set to a fixed gray, and in a home channel gray style, the background color of the home channel is set to a fixed gray.

[0061] For example, out of mourning or a moment of silence, you can set the current theme style of the mobile application to all gray style, channel gray style, or home channel gray style. For some major festive occasions, you can set the current theme style of the mobile application to all red style.

[0062] After the mobile application is started, the mobile application can pull the channel information of the home channel and the channel information of other channels.

[0063] Step S203: If the channel information of the home channel includes a skin color value, the background color of the home channel is rendered based on the skin color value included in the channel information of the home channel.

[0064] In an embodiment of the present application, the background can set a corresponding skin color value for each channel. If the background has pre-set a corresponding skin color value for each channel, when the background returns the channel information, the channel information will carry the skin color value corresponding to each channel. If the background has not pre-set a corresponding skin color value for each channel, when the background returns the channel information, the channel information will not carry the skin color value corresponding to each channel.

[0065] If the channel information of the home channel includes a skin color value, the background color of the home channel can be rendered based on the skin color value included in the channel information of the home channel, so that the background skin setting of the home channel can be achieved.

[0066] In one or more embodiments, if the channel information of a certain channel includes the skin color value of the certain channel, the priority of the skin color value of the certain channel can be set higher than the priority of the interface theme skin color value of the mobile terminal application. That is, when rendering the background color of the channel, the skin color value included in the channel information will be used for rendering first. If the channel information does not include the skin color value, the interface theme skin color value of the mobile terminal application will be considered for rendering.

[0067] Step S204: If the channel information of the home channel does not include a skin color value, the background color of the home channel is rendered based on the skin color value of the interface theme.

[0068] Therefore, through the aforementioned possible design one, when the mobile application is just started, the background skin of the home channel and other channels of the mobile application can be automatically rendered.

[0069] See also Figure 2In a second aspect, an embodiment of the present application provides a background color rendering device for background color rendering of a mobile terminal application, wherein the mobile terminal application is provided with a scroll view for switching pictures displayed on a home channel and a switch for indicating whether the information returned by triggering the scroll view is allowed to carry the skin color value of each picture in the home channel, and the background color rendering device includes:

[0070] A judging unit, used to judge whether the switch is turned on;

[0071] a rendering unit, configured to render the color of the channel currently displayed on the homepage based on the skin color value of each picture carried in the information returned by triggering the scroll view if the switch is turned on, wherein different skin color values ​​correspond to different colors;

[0072] An extraction unit, configured to extract the skin color value corresponding to the picture currently displayed in the homepage channel if the switch is turned off;

[0073] The rendering unit is also used to render the color of the channel currently displayed on the homepage based on the skin color value corresponding to the picture currently displayed in the homepage channel after extracting the skin color value corresponding to the picture currently displayed in the homepage channel.

[0074] The working process, working details and technical effects of the background color rendering device provided in the second aspect of this embodiment can be found in the first aspect of the embodiment and will not be described in detail here.

[0075] like Figure 3 As shown, the third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor and a transceiver that are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the background color rendering method as described in the first aspect of the embodiment.

[0076] For specific examples, the memory may include but is not limited to random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out memory (FIFO) and / or first-in-last-out memory (FILO), etc.; the processor may be but is not limited to a microprocessor of the STM32F105 series, an ARM (Advanced RISC-Machines), an X86 or other architecture processor, or a processor with an integrated NPU (neural-network processing units); the transceiver may be but is not limited to a WiFi (Wireless Fidelity) wireless transceiver, a Bluetooth wireless transceiver, a General Packet Radio Service (GPRS) wireless transceiver, a ZigBee protocol (a low-power local area network protocol based on the IEEE802.15.4 standard, ZigBee) wireless transceiver, a 3G transceiver, a 4G transceiver and / or a 5G transceiver, etc.

[0077] In a fourth aspect of the present embodiment, there is provided a computer-readable storage medium storing instructions including the background color rendering method described in the first aspect of the embodiment, that is, the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the background color rendering method described in the first aspect is executed. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash drive, and / or a memory stick, etc., and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0078] A fifth aspect of this embodiment provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the background color rendering method as described in the first aspect of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0079] It should be understood that certain details are provided in the following description to facilitate a complete understanding of the example embodiments. However, it should be understood by those of ordinary skill in the art that the example embodiments can be implemented without these certain details. For example, the system can be shown in a block diagram to avoid obscuring the example with unnecessary details. In other examples, well-known processes, structures, and techniques may not be shown in unnecessary detail to avoid obscuring the example embodiments.

[0080] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A background color rendering method for background color rendering of a mobile application, wherein a scroll view for switching the pictures displayed on the home channel and a switch for indicating whether the information returned by triggering the scroll view is allowed to carry the skin color value of each picture in the home channel are set in the mobile application, characterized in that: include: Determining whether the switch is turned on; If the switch is turned on, the color of the channel currently displayed on the homepage is rendered based on the skin color value of each picture carried in the information returned by the triggered scroll view, where different skin color values ​​correspond to different colors; If the switch is turned off, the skin color value corresponding to the picture currently displayed in the home channel is extracted, and the color of the channel currently displayed on the home channel is rendered based on the skin color value corresponding to the picture currently displayed in the home channel.

2. The background color rendering method according to claim 1, characterized in that: Before determining whether the switch is turned on, the method further includes: After the mobile application is started, obtaining the interface theme skin color value of the mobile application; If the current theme style of the mobile application is not a fixed style, obtaining channel information of the homepage channel; If the channel information of the home channel includes a skin color value, rendering the background color of the home channel based on the skin color value included in the channel information of the home channel; If the channel information of the home channel does not include a skin color value, the background color of the home channel is rendered based on the interface theme skin color value.

3. The background color rendering method according to claim 2, characterized in that: After obtaining the interface theme skin color value of the mobile terminal application, the method further includes: The interface theme skin color value of the mobile terminal application is stored in global data, and the priority of the interface theme skin color value of the mobile terminal application is set to the lowest.

4. The background color rendering method according to claim 3, characterized in that: The method further comprises: If the channel information of a certain channel includes the skin color value of the certain channel, the priority of the skin color value of the certain channel is set to be higher than the priority of the skin color value of the interface theme of the mobile terminal application.

5. The background color rendering method according to claim 2, characterized in that: The fixed styles include all gray styles, all red styles, channel gray styles and home page channel gray styles.

6. The background color rendering method according to claim 2, characterized in that: If the current theme style of the mobile application is not a fixed style, obtaining channel information of the homepage channel includes: If the current theme style of the mobile terminal application is not a fixed style, after the home channel of the mobile terminal application is loaded, the channel information of the home channel is obtained.

7. The background color rendering method according to claim 1, characterized in that: The pictures in the homepage channel are switched and displayed at every preset time interval.

8. A background color rendering device, used for background color rendering of a mobile application, wherein the mobile application is provided with a scroll view for switching the pictures displayed on the home channel and a switch for indicating whether the information returned by triggering the scroll view is allowed to carry the skin color value of each picture in the home channel, characterized in that: include: A judging unit, used to judge whether the switch is turned on; a rendering unit, configured to render the color of the channel currently displayed on the homepage based on the skin color value of each picture carried in the information returned by triggering the scroll view if the switch is turned on, wherein different skin color values ​​correspond to different colors; An extraction unit, configured to extract the skin color value corresponding to the picture currently displayed in the homepage channel if the switch is turned off; The rendering unit is also used to render the color of the channel currently displayed on the homepage based on the skin color value corresponding to the picture currently displayed in the homepage channel after extracting the skin color value corresponding to the picture currently displayed in the homepage channel.

9. An electronic device, characterized in that: It comprises a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the background color rendering method as described in any one of claims 1 to 7.

10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or the instruction is executed by a computer, the background color rendering method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method, system and device for updating e-mail web page background

    CN101136089A

  • Method and device for loading pictures in application

    CN106294339A

  • Method and system for automatically determining background color of carousel areas according to carousel images

    CN107102863A