Display method, device, electronic device, storage medium and program product of a card
By displaying the background color associated with the target picture in the video card, the display method of the video card is enriched, the problem of single display method in the prior art is solved, and the personalized display of media content cards is achieved and the display effect is higher.
Patent Information
- Application Number
- CN202210323885.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-03-29
AI Technical Summary
The display method of existing video cards is relatively single and cannot meet the diverse needs of users.
By receiving a display operation for the target media content card, the media content card includes a first area for displaying the target picture and a second area for displaying the media content information, and the background color of the second area is associated with the picture color of the first area.
It enriches the display method of video cards, realizes personalized display of media content cards, and improves the integration of pictures in the first area and the overall display effect of media content cards.
Smart Images

Figure CN114817630B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular, to a card display method, device, electronic device, storage medium, and program product. Background Art
[0002] Currently, users can quickly learn relevant information about a video through a video card. However, in the prior art, the display mode of the video card is relatively single and cannot meet the needs of users. Summary of the invention
[0003] The embodiments of the present disclosure provide a card display method, device, electronic device, storage medium and program product to enrich the display mode of video cards.
[0004] In a first aspect, an embodiment of the present disclosure provides a card display method, comprising:
[0005] Receiving a display operation for a media content card corresponding to the target media content;
[0006] In response to the display operation, the media content card is displayed, wherein the media content card includes a first area and a second area, the first area is used to display a target picture corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the picture color of the target picture.
[0007] In a second aspect, an embodiment of the present disclosure further provides a card display device, including:
[0008] An operation receiving module, used to receive a display operation for a media content card corresponding to a target media content;
[0009] A card display module is used to display the media content card in response to the display operation, wherein the media content card includes a first area and a second area, the first area is used to display a target image corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the image color of the target image.
[0010] In a third aspect, an embodiment of the present disclosure further provides an electronic device, including:
[0011] one or more processors;
[0012] a memory for storing one or more programs,
[0013] When the one or more programs are executed by the one or more processors, the one or more processors implement the card display method as described in the embodiment of the present disclosure.
[0014] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the card display method as described in the embodiment of the present disclosure.
[0015] In a fifth aspect, the embodiments of the present disclosure further provide a computer program product. When the computer program product is executed by a computer, the computer implements the card display method as described in the embodiments of the present disclosure.
[0016] The card display method, device, electronic device, storage medium and program product provided in the embodiments of the present disclosure receive a display operation for a media content card corresponding to target media content; in response to the display operation, display the media content card of the target media content, wherein the media content card includes a first area and a second area, the first area is used to display a target picture corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the picture color of the target picture. The embodiments of the present disclosure adopt the above-mentioned technical solution, and adopt the color associated with the picture displayed in the first area of the media content card as the background color of the second area of the media content card, which can not only enrich the display method of the media content card and realize the personalized display of the media content card; it can also improve the integration of the picture displayed in the first area and improve the display effect of the media content card. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0018] Figure 1 A schematic diagram of a flow chart of a card display method provided in an embodiment of the present disclosure;
[0019] Figure 2 A schematic diagram of displaying a media content card provided by an embodiment of the present disclosure;
[0020] Figure 3 A schematic diagram of a flow chart of another card display method provided in an embodiment of the present disclosure;
[0021] Figure 4 A structural block diagram of a card display device provided in an embodiment of the present disclosure;
[0022] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0025] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0026] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0027] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0029] Figure 1 The present invention provides a flowchart of a card display method according to an embodiment of the present invention. The method can be executed by a card display device, wherein the device can be implemented by software and / or hardware and can be configured in an electronic device, typically a mobile phone or a tablet computer. The card display method provided by the present invention is suitable for the scene of personalized display of media content cards. Figure 1As shown, the card display method provided in this embodiment may include:
[0030] S101: Receive a display operation for a media content card corresponding to target media content.
[0031] The display operation may be any operation of instructing the client to display one or more media content cards of target media content, such as an operation of switching from other pages to a page displaying a media content card (such as a video list page for displaying a video list in the form of a video card), or an operation of instructing the electronic device to display a media content card in a setting page, etc. The target media content may be understood as the media content corresponding to the currently displayed media content card, which may be video or audio, etc. Correspondingly, the media content card may be a video card or an audio card, etc. corresponding to the target media content.
[0032] Specifically, the user can perform a display operation on the media content card as needed. Accordingly, the client can receive the user's display operation and use the media content corresponding to the media content card corresponding to the display operation as the target media content.
[0033] S102. In response to the display operation, display the media content card, wherein the media content card includes a first area and a second area, the first area is used to display a target image corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the image color of the target image.
[0034] In this embodiment, if Figure 2 As shown, a first area 20 and a second area 21 are provided in the media content card. The first area 20 can be used to display a target image corresponding to the target media content to which the media content card belongs. The target image can be understood as an image associated with the target media content, such as an image included in the target media content, a cover of the target media content, or an image generated based on the target media content, etc. The second area 21 can be used to display media content information of the target media content, such as the name of the target media content, the user name of the publisher of the target media content, etc.; it can also be further used to display interactive controls ( Figure 2 (not shown), such as a like control, a comment control, and / or a favorite control for the target media content.
[0035] Specifically, when a display operation for a media content card of target media content is received, the media content card of the target media content can be displayed in response to the display operation, a target image corresponding to the target media content can be displayed in a first area of the media content card, and a color associated with the target image can be used as the background color of a second area in the media content card, and media content information of the target media content can be displayed in the second area.
[0036] In this embodiment, the background color of the second area of the media content card can be set to a color associated with the color of the target image displayed in the first area. This not only enables the target image to be better integrated into the media content card, but also avoids the situation where the color change between the first area and the second area is too abrupt, thereby improving the display effect of the media content card; it is also possible to display the second area in different colors when different video images are displayed in the first area, and / or display different media content cards in different colors, instead of setting each media content card to a fixed color. For example, when a page displays media content cards with multiple media contents, if the target images displayed in each media content card are different, the background color of the second area of each media content card is different, so that each media content card will be displayed in a different color, thereby enriching the display method of the media content card and realizing the personalized display of the media content card.
[0037] The card display method provided in this embodiment receives a display operation for a media content card corresponding to target media content; in response to the display operation, displays the media content card of the target media content, wherein the media content card includes a first area and a second area, the first area is used to display a target image corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the image color of the target image. This embodiment adopts the above-mentioned technical solution and adopts the color associated with the image displayed in the first area of the media content card as the background color of the second area of the media content card, which can not only enrich the display method of the media content card and realize the personalized display of the media content card, but also improve the integration of the image displayed in the first area and improve the display effect of the media content card.
[0038] Figure 3 A flowchart of another card display method provided for an embodiment of the present disclosure. The solution in this embodiment can be combined with one or more optional solutions in the above embodiments. Optionally, before displaying the media content card, it also includes: determining the first color and the second color in the target image; determining the background color of the second area based on the first color and the second color.
[0039] Optionally, the card display method provided in this embodiment further includes: using a third color associated with the target image as a background color, and displaying a target identifier of the target media content in the third area of the media content card.
[0040] Optionally, the card display method provided in this embodiment also includes: when a preset switching condition is met, switching the target image displayed in the first area, and updating the background color of the second area and the background color of the third area according to the switched target image.
[0041] Correspondingly, such as Figure 3 As shown, the card display method provided in this embodiment may include:
[0042] S201: Receive a display operation for a media content card corresponding to target media content.
[0043] S202: In response to the display operation, determine a first color, a second color, and a third color in the target image.
[0044] The first color and the second color are different colors in the target image. The third color and the first color / the second color can be the same color or different colors in the target image, preferably different colors in the target image, so as to further improve the personalization of the media content image.
[0045] Exemplarily, the first color, the second color, and the third color in the target image can be determined according to the color proportion of each color in the target image; or, the color information of the first color, the color information of the second color, and the color information of the third color sent by the server are received, and the first color, the second color, and the third color are determined according to the received color information. Among them, the color information of a certain color (such as the first color, the second color, or the third color) can be the RGB value of the color; the color proportion of a certain color can be understood as the proportion of pixels displayed as the color in the target image to all pixels in the target image.
[0046] In one embodiment, before determining the first color and the second color in the media content cover, it also includes: according to the color proportion of each color in the target image, obtaining a color whose color proportion meets a first preset condition from the target image as the first color, and obtaining a color whose color proportion meets a second preset condition from the target image as the second color.
[0047] In the above implementation, the first color may be a color whose color proportion in the target image satisfies the first preset condition, and the second color may be a color whose color proportion in the target image satisfies the second preset condition. Exemplarily, the first color may be a color in the target image whose color proportion is greater than a set threshold; the second color may be a color in the target image whose color proportion is less than another set threshold. Alternatively, when the colors in the target image are sorted in descending order according to the color proportion, the first color may be a color in the first m (m is a positive integer) colors in the sorting result, such as the color with the largest color proportion, etc.; the second color may be a color in the last n (n is a positive integer) colors in the sorting result, such as the color with the smallest color proportion, etc. This case is used as an example for explanation below.
[0048] Exemplarily, after receiving the target image sent by the server, or before the server sends the target image to the client, the client can determine the first color and the second color based on the target image, such as sorting the colors in the target image in order of color proportion from large to small or from small to large, and based on the sorting result, obtain a color whose color proportion meets the first preset condition as the first color, and obtain a color whose color proportion meets the second preset condition as the second color.
[0049] In one embodiment, the third color may be a color whose color proportion in the target image satisfies a third preset condition, such as a color whose color proportion is greater than / less than a certain set threshold, or a color whose ranking in the color proportion sorting satisfies a certain preset condition. At this time, before displaying the category identifier of the target media content in the media content card, the method may further include: according to the color proportion of each color in the target image, obtaining a color whose color proportion satisfies the third preset condition from the target image as the third color.
[0050] Exemplarily, after receiving the target image sent by the server, or before the server sends the target image to the client, the client can determine the third color based on the target image, for example, by sorting the colors in the target image in order of color proportion from large to small or from small to large, and based on the sorting result, obtaining a color whose color proportion satisfies a third preset condition as the third color, such as obtaining a color whose color proportion is greater than / less than the color proportion of the first color, and a color adjacent to the first color in the sorting result as the third color, or obtaining the qth (q is a positive integer) color in the sorting result as the third color, etc.
[0051] In this embodiment, the client or the server can determine the first color / second color / third color in the target image according to the color proportion of each color in the target image. Preferably, the server can determine the first color / second color / third color in the target image according to the color proportion of each color in the target image, and when sending the target image to the client, the server sends the color information of the determined first color / second color / third color to the client to reduce the amount of calculation on the client and avoid affecting the performance of the client.
[0052] S203: Determine a background color of a second area according to the first color and the second color.
[0053] In this embodiment, the background color of the second area can be determined based on the first color and the second color in the target image displayed in the first area. For example, the first color and the second color can be neutralized according to a preset weight, and the neutralized color can be used as the background color of the second area; or, the first color can be used as the background color of a part of the sub-area in the second area, and the second color can be used as the background color of another part of the sub-area in the second area, etc.
[0054] In order to further improve the display effect of the second area, preferably, the background color to be displayed for each pixel in the second area can be determined based on the first color and the second color in the form of a two-color gradient. For example, one of the first color and the second color can be used as the background color to be displayed for pixels at a certain vertex (such as the upper left vertex, etc.) or a certain boundary (such as the left boundary or the upper boundary, etc.) of the second area, and the other of the first color and the second color can be used as the background color to be displayed for pixels at another vertex (such as the lower right vertex, etc.) or another boundary (such as the right boundary or the lower boundary, etc.) of the second area, and the background color at the location of each pixel in the second area is determined in a manner of gradient from one color to another color. At this time, optionally, determining the background color of the second area based on the first color and the second color includes: performing a two-color gradient based on the first color and the second color to obtain the background color of the second area.
[0055] S204, displaying the media content card, and using a third color associated with the target image as a background color, and displaying a target identifier of the target media content in a third area of the media content card, wherein the media content card includes a first area and a second area, the first area is used to display a target image corresponding to the target media content, and the second area is used to display media content information of the target media content.
[0056] In this embodiment, if Figure 2As shown, a third area 22 may be provided in the media content card. The third area 22 may be used to display the target identifier of the target media content, that is, the third area 22 may be the area where the target identifier of the target media content is located. The third area 22 may be located inside or outside the first area 20 / second area 21. The target identifier may be used to identify the corresponding information of the target media content, such as the target identifier may be a category identifier of the media content category to which the target media content belongs. The media content category may include, for example, games, life, knowledge, finance, or entertainment.
[0057] Specifically, after the background color of the second area is determined, the media content card of the target media content can be displayed, the target card is displayed in the first area 20 of the media content card, the determined background color of the second area 21 is used as the background color, the media content information of the target media content is displayed in the second area 21 of the media content card, and the third color associated with the target image is used as the background color, and the target identifier of the target media content is displayed in the third area 22 of the media content card, such as Figure 2 shown.
[0058] S205: When a preset switching condition is met, switch the target image displayed in the first area, and update the background color of the second area and the background color of the third area according to the switched target image.
[0059] In this embodiment, when the target image displayed in the first area of the media content card changes, the background colors of the second area and the third area of the media content card can be automatically updated according to the changed target image to further enrich the presentation of the media content card.
[0060] Exemplarily, when the current condition satisfies the preset switching condition, the target image displayed in the first area can be switched, and the first color, second color and third color in the target image after switching are determined according to the color proportion of each color in the target image after switching, and the background color of the second area is updated based on the first color and the second color, and the background color of the third area is updated to the third color. Among them, the preset switching condition can be set flexibly, such as the preset switching condition can be set to receive a trigger operation to switch the target image displayed in the first area, or the display time of the currently displayed target image in the first area reaches a preset time (such as 10s or 30s, etc.), and so on.
[0061] It should be noted that, in the present embodiment, after determining the background color of the second area / the third area, it is possible to further determine whether the color of the media content information displayed in the second area / the target logo displayed in the third area is close to the background color of the corresponding area. If so, a transparent mask having a color that is significantly different from the color of the media content information / target logo can be added between the media content information / target logo and the background of the corresponding area, or the color of the media content information / target logo can be updated to a color that is significantly different from the background color of the corresponding area to ensure the readability of the media content information / target logo.
[0062] The card display method provided in this embodiment determines the background color of the second area of the media content card based on the first color and the second color in the target image, and uses the third color in the target image as the background color of the third area of the media content card, which can further enrich the display form of the media content card and improve the user experience.
[0063] Figure 4 This is a structural block diagram of a card display device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware, and can be configured in an electronic device, typically a mobile phone or a tablet computer, and can display media content cards by executing a card display method. Figure 4 As shown, the card display method provided in this embodiment may include: an operation receiving module 401 and a card display module 402, wherein:
[0064] An operation receiving module 401 is used to receive a display operation for a media content card corresponding to a target media content;
[0065] The card display module 402 is used to display the media content card in response to the display operation, wherein the media content card includes a first area and a second area, the first area is used to display a target image corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the image color of the target image.
[0066] The card display device provided in this embodiment receives a display operation for a media content card corresponding to the target media content through an operation receiving module; and displays the media content card of the target media content in response to the display operation through a card display module, wherein the media content card includes a first area and a second area, the first area is used to display a target picture corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the picture color of the target picture. This embodiment adopts the above-mentioned technical solution and adopts the color associated with the picture displayed in the first area of the media content card as the background color of the second area of the media content card, which can not only enrich the display method of the media content card and realize the personalized display of the media content card, but also improve the integration of the picture displayed in the first area and improve the display effect of the media content card.
[0067] Furthermore, the card display method provided in this embodiment may also include: a color determination module, used to determine the first color and the second color in the target image before displaying the media content card; a background color determination module, used to determine the background color of the second area based on the first color and the second color.
[0068] In the above solution, the background color determination module may be used to: perform a two-color gradient based on the first color and the second color to obtain the background color of the second area.
[0069] Furthermore, the card display method provided in this embodiment may also include: a first color acquisition module, which is used to obtain a color whose color proportion meets a first preset condition from the target image according to the color proportion of each color in the target image before determining the first color and the second color in the media content cover, as the first color, and obtain a color whose color proportion meets a second preset condition from the target image as the second color.
[0070] Furthermore, the card display module 402 may also be configured to: use a third color associated with the target image as a background color to display a target identifier of the target media content in a third area of the media content card.
[0071] Furthermore, the card display method provided in this embodiment may also include: a second color acquisition module, which is used to obtain a color whose color proportion meets a third preset condition from the target image according to the color proportion of each color in the target image before displaying the category identifier of the target media content in the media content card, as a third color.
[0072] Furthermore, the card display method provided in this embodiment may also include: a background color update module, which is used to switch the target image displayed in the first area when a preset switching condition is met, and update the background color of the second area and the background color of the third area according to the switched target image.
[0073] The card display device provided in the embodiment of the present disclosure can execute the card display method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of executing the card display method. For technical details not described in detail in this embodiment, please refer to the card display method provided in any embodiment of the present disclosure.
[0074] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device (e.g., terminal device) 500 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0075] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0076] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0077] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0078] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0079] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0080] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0081] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives a display operation for a media content card corresponding to target media content; and displays the media content card in response to the display operation, wherein the media content card includes a first area and a second area, the first area is used to display a target picture corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the picture color of the target picture.
[0082] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0083] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0084] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, constitute a limitation on the unit itself.
[0085] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0086] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0087] According to one or more embodiments of the present disclosure, Example 1 provides a card display method, including:
[0088] Receiving a display operation for a media content card corresponding to the target media content;
[0089] In response to the display operation, the media content card is displayed, wherein the media content card includes a first area and a second area, the first area is used to display a target picture corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the picture color of the target picture.
[0090] According to one or more embodiments of the present disclosure, Example 2 is a method according to Example 1, and before displaying the media content card, further includes:
[0091] Determine a first color and a second color in the target image;
[0092] A background color of the second area is determined according to the first color and the second color.
[0093] According to one or more embodiments of the present disclosure, Example 3 is the method according to Example 2, wherein determining the background color of the second area according to the first color and the second color includes:
[0094] A two-color gradient is performed based on the first color and the second color to obtain a background color of the second area.
[0095] According to one or more embodiments of the present disclosure, Example 4 is the method according to Example 2, and before determining the first color and the second color in the media content cover, further includes:
[0096] According to the color proportion of each color in the target image, a color whose color proportion meets a first preset condition is obtained from the target image as the first color, and a color whose color proportion meets a second preset condition is obtained from the target image as the second color.
[0097] According to one or more embodiments of the present disclosure, Example 5 is a method according to any one of Examples 1-4, further comprising:
[0098] The target identifier of the target media content is displayed in the third area of the media content card by using a third color associated with the target image as the background color.
[0099] According to one or more embodiments of the present disclosure, Example 6 is the method according to Example 5, and before displaying the category identifier of the target media content in the media content card, further includes:
[0100] According to the color proportion of each color in the target image, a color whose color proportion meets a third preset condition is obtained from the target image as the third color.
[0101] According to one or more embodiments of the present disclosure, Example 7 is the method according to Example 5, further comprising:
[0102] When a preset switching condition is met, the target image displayed in the first area is switched, and the background color of the second area and the background color of the third area are updated according to the switched target image.
[0103] According to one or more embodiments of the present disclosure, Example 8 provides a card display device, including:
[0104] An operation receiving module, used to receive a display operation for a media content card corresponding to a target media content;
[0105] A card display module is used to display the media content card in response to the display operation, wherein the media content card includes a first area and a second area, the first area is used to display a target image corresponding to the target media content, the second area is used to display media content information of the target media content, and the background color of the second area is associated with the image color of the target image.
[0106] According to one or more embodiments of the present disclosure, Example 9 provides an electronic device, including:
[0107] one or more processors;
[0108] a memory for storing one or more programs,
[0109] When the one or more programs are executed by the one or more processors, the one or more processors implement the card display method as described in any one of Examples 1-7.
[0110] According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the card display method as described in any one of Examples 1-7.
[0111] According to one or more embodiments of the present disclosure, Example 11 provides a computer program product. When the computer program product is executed by a computer, the computer implements the card display method described in any one of Examples 1-7.
[0112] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0113] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0114] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for displaying a card, characterized in that, it includes: Receiving a display operation for a media content card corresponding to target media content; In response to the display operation, determining a first color and a second color in a target picture corresponding to the target media content, wherein the first color and the second color are different colors in the target picture, the color proportion of the first color in the target picture is greater than a first set threshold, and the color proportion of the second color in the target picture is less than a second set threshold; or, in the sorting result obtained by sorting each color in the target picture in descending order of color proportion, the first color is located in the first m positions of the sorting result, and the second color is located in the last n positions of the sorting result, where m and n are positive integers; Determining the background color of a second area according to the first color and the second color; Displaying the media content card, and using a third color associated with the target picture as the background color, and displaying a target identifier of the target media content in a third area of the media content card, wherein the third color is a color in the target picture; the media content card includes a first area and the second area, the first area is used to display the target picture, and the second area is used to display media content information of the target media content; wherein, when there are multiple media content cards displayed on a page and the target pictures displayed in each media content card are different, the background colors of the second areas of each media content card are different; When a preset switching condition is satisfied, switching the target picture displayed in the first area, and updating the background color of the second area and the background color of the third area according to the switched target picture; The method further includes at least one of the following: In response to the color of the media content information displayed in the second area satisfying a preset color proximity condition with the background color of the second area, adding a first transparent mask between the media content information and the background of the second area, and the color of the first transparent mask satisfies a preset color difference condition with the color of the media content information; In response to the color of the target identifier displayed in the third area satisfying a preset color proximity condition with the background color of the third area, adding a second transparent mask between the target identifier and the background of the third area, and the color of the second transparent mask satisfies a preset color difference condition with the color of the target identifier.
2. The method according to claim 1, characterized in that, the determining the background color of the second area according to the first color and the second color includes: Performing a two-color gradient based on the first color and the second color to obtain the background color of the second area.
3. The method according to claim 1, characterized in that, before determining the first color and the second color in the target picture corresponding to the target media content, it further includes: According to the color proportion of each color in the target picture, obtain the color whose color proportion meets the first preset condition from the target picture as the first color, and obtain the color whose color proportion meets the second preset condition from the target picture as the second color.
4. The method according to claim 1, wherein, before displaying the target identifier of the target media content in the media content card, it further includes: According to the color proportion of each color in the target picture, obtain the color whose color proportion meets the third preset condition from the target picture as the third color.
5. A display device for a card, wherein, it includes: An operation receiving module, configured to receive a display operation for a media content card corresponding to target media content; A color determination module, configured to, in response to the display operation, determine a first color and a second color in a target picture corresponding to the target media content, wherein the first color and the second color are different colors in the target picture, the color proportion of the first color in the target picture is greater than a first set threshold, and the color proportion of the second color in the target picture is less than a second set threshold; or, in the sorting result obtained by sorting each color in the target picture in descending order of color proportion, the first color is located in the first m positions of the sorting result, and the second color is located in the last n positions of the sorting result, where m and n are positive integers; A background color determination module, configured to determine the background color of the second area according to the first color and the second color; A card display module, configured to display the media content card, and use a third color associated with the target picture as the background color, and display the target identifier of the target media content in a third area of the media content card, wherein the third color is a color in the target picture; the media content card includes a first area and the second area, the first area is used to display the target picture, and the second area is used to display media content information of the target media content; wherein, when there are multiple media content cards displayed on the page and the target pictures displayed in each media content card are different, the background colors of the second areas of each media content card are different; A background color update module, configured to, when a preset switching condition is met, switch the target picture displayed in the first area, and update the background color of the second area and the background color of the third area according to the switched target picture; The device further includes at least one of the following: A first adding module, configured to, in response to the fact that the color of the media content information displayed in the second area meets a preset color proximity condition with the background color of the second area, add a first transparent mask between the media content information and the background of the second area, and the color of the first transparent mask meets a preset color difference condition with the color of the media content information; A second adding module, configured to add a second transparent mask between the target identifier and the background of the third region in response to a preset color proximity condition being satisfied between the color of the target identifier displayed in the third region and the background color of the third region, wherein the color of the second transparent mask satisfies a preset color difference condition with the color of the target identifier.
6. An electronic device, characterized in that it comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the display method of the card according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions for causing a processor to implement the display method of the card according to any one of claims 1-4 when executed.
8. A computer program product, characterized in that the computer program product includes a computer program that implements the display method of the card according to any one of claims 1-4 when executed by a processor.
Citation Information
Patent Citations
Background picture generation and search result display method and device, equipment and medium
CN112069341A
Page generation method and device, equipment and storage medium
CN113742025A