Background image processing and search result display method, device, equipment and medium

Through color-tuning and blurring of the target image, a background image that is fused with the page is generated, which solves the visual monotony problem caused by single background color in the prior art, and improves the effect of search results display and user experience.

CN112069340BActive Publication Date: 2024-12-27DOUYIN VISION CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010923456.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-04
Publication Date
2024-12-27
Estimated Expiration
2040-12-27

AI Technical Summary

Technical Problem

The background of the pictures and search results display in the existing picture and text display pages is separated, making it difficult for users to feel immersive and reduces the user experience and search results display effect.

Method used

By determining the color feature statistics of the target image, dividing the color feature value interval, determining parameter adjustment information based on the occupancy rate, color matching of the target image, generating a content display background image, and visually integrating the background color with the target image on the page. .

Benefits of technology

It improves the background image display effect and quality of the search results display, and enhances the user's visual immersion and experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112069340B_ABST
    Figure CN112069340B_ABST
Patent Text Reader

Abstract

The present disclosure provides a background image processing and search result display method, device, equipment and medium, wherein the method includes: determining color feature statistical information corresponding to a target image; according to pre-divided color feature value intervals, counting the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals; determining parameter adjustment information of the target image according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals; performing color adjustment processing on the target image according to the determined parameter adjustment information; generating a content display background image according to the target image after color adjustment processing. The embodiment of the present disclosure generates a content display background image through a target image, so that the background color and the target image in the page produce a visual fusion effect, thereby improving the display effect and display quality of the search result display background image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a background image processing and search result display method, device, equipment and medium. Background Art

[0002] At present, many social and information apps (applications) use text and picture display pages to provide information to users. Text and picture display pages are generally displayed with pictures to enrich the page content and make the combination style more diverse. In some text and picture display pages, summary text plus picture introduction is the main form, usually with large pictures and summary text to attract users to click to enter the page to view.

[0003] However, in current graphic and text display pages, the images and search results display background are separated, making it difficult for users to feel immersed in the displayed content, affecting the search result display effect and reducing the user experience. Summary of the invention

[0004] The embodiments of the present disclosure at least provide a background image processing and search result display method, device, equipment and medium, which can visually integrate the background color with the target image color in the page, thereby improving the background search result display effect and display quality.

[0005] In a first aspect, an embodiment of the present disclosure provides a background image processing method, characterized by comprising:

[0006] Determine the color feature statistics corresponding to the target image;

[0007] According to the pre-divided color feature value intervals, counting the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals;

[0008] Determining parameter adjustment information of the target image according to occupancy rates of color feature values ​​included in the color feature statistical information in different color feature value intervals;

[0009] Performing color adjustment processing on the target image according to the determined parameter adjustment information;

[0010] Generate a content display background image based on the target image after color adjustment.

[0011] In an optional implementation manner, the parameter adjustment information of the target image is determined according to the occupancy rate of the color feature value included in the color feature statistical information in different color feature value intervals, specifically including at least one of the following:

[0012] Determining the color scale parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals and the color scale adjustment intervals corresponding to the different occupancy rates;

[0013] Determine the color scale midpoint parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals and the color scale center point adjustment intervals corresponding to the different occupancy rates;

[0014] Determine the saturation parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals and the saturation adjustment intervals corresponding to the different occupancy rates;

[0015] The brightness parameter adjustment information of the target image is determined according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals and the brightness adjustment intervals corresponding to the different occupancy rates.

[0016] In an optional implementation, the color feature value intervals are divided according to the following steps:

[0017] According to the preset N color feature values, the color feature values ​​included in the color feature statistical information are divided into N+1 color feature value intervals, where N is an integer greater than or equal to 1, and the color feature value included in the N+1th interval is greater than the color feature value included in the Nth interval.

[0018] In an optional implementation, if the occupancy rate of any interval range in the N+1 interval ranges is greater than a first preset threshold, the parameter adjustment information of the target image is determined according to the occupancy rates of the color feature values ​​included in the color feature statistical information corresponding to different color feature value intervals, specifically including at least one of the following:

[0019] Determine the color scale parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the first color scale adjustment intervals corresponding to the different occupancy rates and the intervals to which the color feature values ​​of the target image belong;

[0020] Determining saturation parameter adjustment information of the target image according to a preset first saturation adjustment interval;

[0021] The brightness parameter adjustment information of the target image is determined according to a preset first brightness adjustment interval.

[0022] In an optional implementation, if The parameter adjustment information of the target image is determined according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, specifically including:

[0023] Determining the grayscale value of the target image according to preset grayscale value parameter adjustment information;

[0024] Determine the color scale parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the second color scale adjustment intervals corresponding to the different occupancy rates and the intervals to which the color feature values ​​of the target image belong;

[0025] Determining saturation parameter adjustment information of the target image according to a preset second saturation adjustment interval;

[0026] The brightness parameter adjustment information of the target image is determined according to a preset second brightness adjustment interval.

[0027] In an optional implementation manner, the parameter adjustment information includes at least one of the following: color scale parameter adjustment information, saturation parameter adjustment information, brightness parameter adjustment information, and color scale midpoint parameter adjustment information; and

[0028] According to the determined parameter adjustment information, the target image is subjected to color adjustment processing, including:

[0029] According to the determined color scale parameter adjustment information, mapping the color scale parameter of the target image to a first preset interval; and / or

[0030] According to the determined saturation parameter adjustment information, mapping the saturation parameter of the target image to a second preset interval; and / or

[0031] According to the determined brightness parameter adjustment information, mapping the brightness parameter of the target image to a third preset interval; and / or

[0032] According to the determined color scale midpoint parameter adjustment information, the color scale midpoint parameter of the target image is adjusted.

[0033] In an optional implementation, the target image is represented by any one of the following: red, green, blue RGB, hue, saturation, brightness HSV, and hue, saturation, brightness HSL; and if the target image is represented by HSL, then

[0034] Generate a content display background image based on the target image after color adjustment, including:

[0035] Convert the color-adjusted target image from the HSL space to the RGB space;

[0036] According to the filter kernel of the preset size, the pixels in the neighborhood are blurred to generate a background image for content display.

[0037] In an optional implementation, determining color feature statistical information corresponding to the target image includes:

[0038] Convert the color feature values ​​contained in the target image into grayscale values ​​to obtain a grayscale image corresponding to the target image;

[0039] According to the number of occurrences of each grayscale value in the grayscale image, color feature statistical information corresponding to the target image is determined.

[0040] In a second aspect, the present disclosure also provides a search result display method, including:

[0041] Initiate a search request based on the obtained search keywords;

[0042] Acquire at least one target resource matching the search keyword, wherein the target resource includes a target image;

[0043] A search result card generated according to the at least one target resource is displayed on the search result page, wherein a content display background image of the search result card is generated based on the target image.

[0044] In an optional implementation, the color of the content display background image is a streaming gradient color, the streaming gradient color is generated according to the main color of the target image, and the color of the content display background image gradually becomes transparent in a predetermined direction.

[0045] In a third aspect, the present disclosure also provides a background image processing device, including:

[0046] A first determining unit, used to determine color feature statistical information corresponding to a target image;

[0047] A statistical unit, used for counting the occupancy rates of the color feature values ​​included in the color feature statistical information corresponding to different color feature value intervals according to the pre-divided color feature value intervals;

[0048] A second determining unit, configured to determine parameter adjustment information of the target image according to occupancy rates of color feature values ​​included in the color feature statistical information in different color feature value intervals;

[0049] A processing unit, configured to perform color adjustment on the target image according to the determined parameter adjustment information;

[0050] A creation unit is used to generate a content display background image according to a target image after color adjustment.

[0051] In an optional embodiment, the second determination unit is specifically used to determine the color scale parameter adjustment information of the target image according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the color scale adjustment intervals corresponding to different occupancy rates; determine the color scale midpoint parameter adjustment information of the target image according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the color scale center point adjustment intervals corresponding to different occupancy rates; determine the saturation parameter adjustment information of the target image according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the saturation adjustment intervals corresponding to different occupancy rates; determine the brightness parameter adjustment information of the target image according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the brightness adjustment intervals corresponding to different occupancy rates.

[0052] In an optional implementation manner, the color feature value intervals are divided according to the following steps:

[0053] According to the preset N color feature values, the color feature values ​​included in the color feature statistical information are divided into N+1 color feature value intervals, where N is an integer greater than or equal to 1, and the color feature value included in the N+1th interval is greater than the color feature value included in the Nth interval.

[0054] In an optional embodiment, the second determination unit is specifically used to determine the parameter adjustment information of the target image according to the occupancy of the color feature values ​​included in the color feature statistical information in different color feature value intervals if the occupancy of any interval range in the N+1 interval ranges is greater than the first preset threshold value: determine the color scale parameter adjustment information of the target image according to the occupancy of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the first color scale adjustment interval corresponding to different occupancies and the interval to which the color feature value of the target image belongs; determine the saturation parameter adjustment information of the target image according to the preset first saturation adjustment interval; determine the brightness parameter adjustment information of the target image according to the preset first brightness adjustment interval.

[0055] In an optional implementation manner, the second determining unit is specifically configured to: The occupancy rate of each interval is less than a second preset threshold value, and the parameter adjustment information of the target image is determined according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals: the grayscale value of the target image is determined according to the preset grayscale value parameter adjustment information; the color scale parameter adjustment information of the target image is determined according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the second color scale adjustment intervals corresponding to the different occupancies and the interval to which the color feature values ​​of the target image belong; the saturation parameter adjustment information of the target image is determined according to the preset second saturation adjustment interval; the brightness parameter adjustment information of the target image is determined according to the preset second brightness adjustment interval.

[0056] In an optional embodiment, the parameter adjustment information includes at least one of the following: color scale parameter adjustment information, saturation parameter adjustment information, brightness parameter adjustment information and color scale midpoint parameter adjustment information; and the processing unit is specifically used to map the color scale parameter of the target image to a first preset interval according to the determined color scale parameter adjustment information; and / or map the saturation parameter of the target image to a second preset interval according to the determined saturation parameter adjustment information; and / or map the brightness parameter of the target image to a third preset interval according to the determined brightness parameter adjustment information; and / or adjust the color scale midpoint parameter of the target image according to the determined color scale midpoint parameter adjustment information.

[0057] In an optional embodiment, the target image is represented by any one of the following: red, green and blue RGB, hue saturation lightness HSV and hue saturation brightness HSL; and if the target image is represented by HSL, the creation unit is specifically used to convert the target image after color processing from HSL space to RGB space; according to a filter kernel of a preset size, the pixels in the neighborhood are blurred to generate a content display background image.

[0058] In an optional embodiment, the first determination unit is specifically used to convert the color feature values ​​contained in the target image into grayscale values ​​to obtain a grayscale image corresponding to the target image; and determine the color feature statistical information corresponding to the target image based on the number of occurrences of each grayscale value in the grayscale image.

[0059] In a fourth aspect, the present disclosure also provides a search result display device, including:

[0060] A search unit, used to initiate a search request based on the acquired search keyword;

[0061] An acquisition unit, configured to acquire at least one target resource matching the search keyword, wherein the target resource includes a target image;

[0062] A display unit is used to display a search result card generated according to the at least one target resource on a search result page, wherein a content display background image of the search result card is generated based on the target image.

[0063] In an optional implementation, the color of the content display background image is a streaming gradient color, the streaming gradient color is generated according to the main color of the target image, and the color of the content display background image gradually becomes transparent in a predetermined direction.

[0064] In a fifth aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps in any possible implementation of the first aspect or the second aspect are performed.

[0065] In a sixth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in any possible implementation of the first aspect or the second aspect are executed.

[0066] For a description of the effects of the above-mentioned background image processing and search result display devices, equipment and media, please refer to the description of the above-mentioned background image processing and search result display method, which will not be repeated here.

[0067] The background image processing and search result display method, device, equipment and medium provided by the embodiments of the present disclosure count the occupancy rate of the color feature values ​​contained in the color feature statistical information corresponding to the target image corresponding to different color feature value intervals according to the pre-divided color feature value intervals, and determine the parameter adjustment information of the target image accordingly, and use the determined parameter adjustment information to perform color adjustment and blur processing on the target image, and finally generate a content display background image. In the above process, the content display background image is generated based on the target image, so that the background color and the target image in the page have a visual fusion effect. Compared with the prior art in which the search result display background color is single, resulting in a monotonous visual effect, the display effect and display quality of the search result display background image are improved.

[0068] Furthermore, according to the background image processing and search result display method, device, equipment and medium provided by the embodiments of the present disclosure, it is also possible to obtain a content display background image by blurring the target image after color processing, and the blurred texture produced by the blurring can further improve the search result display quality and display effect.

[0069] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0071] Figure 1a A flow chart of a background image processing method provided by an embodiment of the present disclosure is shown;

[0072] Figure 1b A schematic diagram showing the blur effect when the blur kernel radius provided by the embodiment of the present disclosure is set to 180 is shown;

[0073] Figure 1c A schematic diagram of a grayscale image in which the occupancy rate of color feature values ​​contained in the first interval provided by an embodiment of the present disclosure is greater than 60% is shown;

[0074] Figure 1d A schematic diagram of adjusting the parameters of the color scale and the color scale center point in which the occupation rate of the color feature values ​​included in the first interval is greater than 60% provided by an embodiment of the present disclosure is shown;

[0075] Figure 1e A schematic diagram of saturation parameter adjustment information provided by an embodiment of the present disclosure when the occupancy rate of color feature values ​​included in the first interval is greater than 60% is shown;

[0076] Figure 1f A schematic diagram of a grayscale image in which the occupancy rate of the color feature values ​​included in the second interval provided by the embodiment of the present disclosure is greater than 60% is shown;

[0077] Figure 1g A schematic diagram of color scale parameter adjustment information in which the occupancy rate of color feature values ​​included in the second interval provided by the embodiment of the present disclosure is greater than 60% is shown;

[0078] Figure 1h A schematic diagram of saturation and brightness parameter adjustment information when the occupancy rate of color feature values ​​included in the second interval provided by an embodiment of the present disclosure is greater than 60% is shown;

[0079] Figure 1iA schematic diagram of a grayscale image in which the occupancy rate of color feature values ​​contained in the third interval provided by an embodiment of the present disclosure is greater than 60% is shown;

[0080] Figure 1j A schematic diagram of adjusting the parameters of the color scale and the color scale center point in which the occupancy rate of the color feature values ​​included in the third interval provided by the embodiment of the present disclosure is greater than 60% is shown;

[0081] Figure 1k A schematic diagram of saturation and brightness parameter adjustment information for a color feature value contained in a third interval provided by an embodiment of the present disclosure having an occupancy rate greater than 60% is shown;

[0082] Figure 1l A schematic diagram of a grayscale image in which the occupancy rate of the color feature values ​​included in the second interval provided by the embodiment of the present disclosure is less than 20% is shown;

[0083] Figure 1m A schematic diagram of color scale parameter adjustment information in which the occupancy rate of color feature values ​​included in the second interval provided by an embodiment of the present disclosure is less than 20% is shown;

[0084] Figure 1n A schematic diagram of saturation parameter adjustment information is shown in which the occupancy rate of the color feature values ​​included in the second interval provided by the embodiment of the present disclosure is less than 20%;

[0085] Figure 1o A schematic diagram of gray value parameter curve adjustment information of a target image in which the occupancy rate of color feature values ​​included in the second interval provided by the embodiment of the present disclosure is less than 20% is shown;

[0086] Figure 2 The implementation process of the occupancy rate of the second interval reaching different preset thresholds provided by the embodiment of the present disclosure is shown;

[0087] Figure 3a A flowchart of a search result display method provided by an embodiment of the present disclosure is shown;

[0088] Figure 3b A schematic diagram of a search page displayed for a client according to an embodiment of the present disclosure is shown;

[0089] Figure 3c A schematic diagram showing a possible effect after a search result page is processed by a background image processing method provided by an embodiment of the present disclosure;

[0090] Figure 4 A schematic diagram of a background image processing device provided by an embodiment of the present disclosure is shown;

[0091] Figure 5A schematic diagram of a search result display device provided by an embodiment of the present disclosure is shown;

[0092] Figure 6 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0093] First, some terms involved in the embodiments of the present invention are explained to facilitate understanding by those skilled in the art.

[0094] RGB, color mode (also translated as "red, green, and blue", less used) is a color standard in the industry. It obtains various colors by changing the three color channels of red, green, and blue and superimposing them on each other. RGB represents the colors of the three channels of red, green, and blue.

[0095] HSV (Hue, Saturation, Value) is a color space created based on the intuitive characteristics of color, also known as the Hexcone Model. The color parameters in the model are: hue (Hue), saturation (Saturation), and brightness (Value).

[0096] HSL is a method of representing points in the RGB color model in a cylindrical coordinate system. These two representations attempt to be more intuitive than the geometric structure RGB based on the Cartesian coordinate system. HSL stands for Hue, Saturation, and Lightness. Hue (H) is the basic attribute of color, which is the name of the color we usually say, such as red, yellow, etc.; Saturation (S) refers to the purity of the color, the higher the color, the purer it is, and the lower it is, the grayer it becomes, and the value is 0-100%; Lightness (L) is 0-100%.

[0097] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0098] In addition, the terms "first", "second", etc. in the description and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.

[0099] The "multiple or several" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0100] Research has found that pages with pictures and text are usually displayed with pictures to enrich the page content and attract users to click to view the page. However, due to the single background color of the page, the visual effect is monotonous, making it difficult for users to immerse themselves in the displayed content, affecting the display effect of search results and reducing user experience.

[0101] Based on the above research, the present disclosure provides a background image processing and search result display method, device, equipment and medium, whose background color is visually integrated with the target image in the page, and the blurred texture generated can enhance the quality of page design.

[0102] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0103] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0104] To facilitate understanding of the present embodiment, a background image processing method disclosed in the present embodiment is first introduced in detail. The execution subject of the background image processing method provided in the present embodiment is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the background image processing method can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0105] The background image processing method provided by the embodiment of the present disclosure is described below by taking a computer device as an example of an execution subject.

[0106] Embodiment 1

[0107] See also Figure 1a As shown, a flowchart of a background image processing method is provided, the method includes steps S101 to S105, wherein:

[0108] S101: Determine color feature statistics corresponding to a target image.

[0109] In this step, the target image can be an image displayed with text on the page. If the page contains multiple images, the first image on the page can be selected as the target image, or the image with the highest click rate can be selected as the target image according to the click rate of each image. The target image can be a grayscale image or a color image.

[0110] Generally speaking, both grayscale and color images can be represented by a two-dimensional numerical matrix. Among them, color images can be represented by a two-dimensional matrix of RGB (red, green, and blue) triplets. Usually, each value of the triplet is between 0 and 255, 0 means that the corresponding primary color does not exist in the pixel, and 255 means that the corresponding primary color has the maximum value in the pixel. In this case, each pixel can be represented by three bytes.

[0111] In image processing, HSV space and HSL space can also be used. The way HSV expresses color images consists of three parts: Hue (hue); Saturation (saturation, color purity); Value (brightness). HSL is similar to HSV. HSL also has three components: hue (hue), saturation (saturation), and lightness (brightness). The three different color models can be converted at will.

[0112] Based on the above description, in specific implementation, the color feature can be represented by any one of RGB (red, green, blue), HSV (hue, saturation, brightness) and HSL (hue, saturation, brightness). When HSV or HSL is used to represent the color feature, the main color of the target image can be converted from the RGB space to the HSV space or the HSL space to obtain the corresponding HSV or HSL.

[0113] According to the above description, the color feature can be represented by any one of RGB, HSV or HSL.

[0114] According to the embodiments of the present disclosure, the color feature values ​​contained in the target image can be converted into grayscale values ​​to obtain a grayscale image corresponding to the target image; according to the number of occurrences of each grayscale value in the grayscale image, the color feature statistical information corresponding to the target image is determined, wherein the color feature statistical information can be a grayscale histogram corresponding to the grayscale image. The grayscale histogram counts the frequency of occurrence of pixels contained in the target image according to the size of the pixel value, with the horizontal axis being the pixel value and the vertical axis being the number of pixels corresponding to each pixel value, such as Figure 1c shown.

[0115] Based on the above description, in specific implementation, the RGB space of the target image can be converted to the grayscale space. By splitting the RGB three channels of the target image, according to the formula Gray=R*α+G*β+B*γ, the RGB three-channel color feature values ​​of the target image are converted to the grayscale space of the grayscale image to generate a single-channel color feature value, wherein α, β and γ are preset values, α+β+γ=1 and are all non-negative numbers.

[0116] In one embodiment, the color feature values ​​contained in the target image may be converted from the RGB space to the grayscale space according to the following formula: Gray=R*0.299+G*0.587B*0.114.

[0117] In the specific implementation, according to the single-channel color eigenvalue of the grayscale space of the grayscale image, the color eigenvalue size statistics and the frequency of occurrence are taken as the horizontal axis and the number of pixels as the vertical axis to generate color feature statistical information, wherein in the grayscale image, the color eigenvalue ranges from 0 to 255.

[0118] S102: According to the pre-divided color feature value intervals, counting the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals.

[0119] In this step, the color feature value interval division method can be to divide the color feature values ​​included in the color feature statistical information into N+1 color feature value intervals according to the pre-set N color feature values, where N is an integer greater than or equal to 1, and the color feature value included in the N+1th interval is greater than the color feature value included in the Nth interval. In specific implementation, the N value can be set according to actual needs or empirical values, and the embodiment of the present disclosure is not limited to this.

[0120] In specific implementation, the intervals can be divided according to the preset N color feature values ​​in any of the following ways:

[0121] The first interval division method,

[0122] For example, taking N=2 as an example, when the number of color feature values ​​N is preset to 2, the color feature values ​​contained in the color feature statistical information can be divided into 3 color feature value intervals. In one embodiment, the color feature values ​​in the interval of 0 to 255 can be evenly divided into three intervals with the same interval range. In this implementation, the preset color feature values ​​can be 85 and 170, and the color feature values ​​contained in the grayscale image are divided into the following three intervals: 0 to 85 color feature values ​​as the first interval; 85 to 170 color feature values ​​as the second interval; 170 to 255 color feature values ​​as the third interval.

[0123] The second interval division method,

[0124] In another embodiment, the range of the divided intervals may be different. Taking the two pre-set color feature values ​​of 76 and 178 as an example, the color feature values ​​contained in the grayscale image can be divided into the following three intervals: 0 to 76 color feature values ​​as the first interval; 76 to 178 color feature values ​​as the second interval; 178 to 255 color feature values ​​as the third interval.

[0125] The third interval division method,

[0126] In specific implementation, the color feature values ​​of the grayscale image can also be divided according to the ratio of the color feature values ​​contained in the pre-set color feature value interval to the total color feature values, wherein the ratio of the color feature values ​​contained in each interval can be delineated according to actual needs, and the disclosed embodiment does not limit this. For example, in one embodiment, the color feature values ​​contained in the grayscale image are divided into three intervals according to the color feature values ​​contained in the first interval accounting for less than 30% of the total color feature values, the color feature values ​​contained in the second interval accounting for 30% to 70% of the total color feature values, and the color feature values ​​contained in the third interval accounting for more than 70% of the total color feature values.

[0127] After dividing the color feature values ​​contained in the grayscale image into three intervals according to any of the above methods, further count the occupancy rates of the color feature values ​​contained in the color feature statistical information corresponding to different color feature value intervals. That is, count the ratio of the number of color feature values ​​contained in each interval to the total number of color feature values ​​contained in the grayscale image, and use the obtained ratio as the occupancy rate of different color feature value intervals. For example, according to the statistical results, the first interval contains 100 color feature values, the second interval contains 150 color feature values, and the third interval contains 200 color feature values. Then, it can be determined that the occupancy rate corresponding to the first interval is 100 / (100+150+200), the occupancy rate corresponding to the second interval is 150 / (100+150+200), and the occupancy rate corresponding to the third interval is 200 / (100+150+200).

[0128] S103: Determine parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals.

[0129] In specific implementation, since the HSV color model is more suitable for image processing, in the embodiment of the present disclosure, the target image can be converted from the RGB space to the HSV space. Accordingly, the parameter adjustment information may include at least one of the following: color scale parameter adjustment information, color scale midpoint parameter adjustment information, saturation parameter adjustment information, brightness parameter adjustment information and gray value parameter adjustment information.

[0130] S104: Performing color adjustment processing on the target image according to the determined parameter adjustment information.

[0131] In this step, the target image is subjected to color adjustment according to the parameter adjustment information obtained in the above step S103.

[0132] It should be noted that in the embodiment of the present disclosure, when determining the parameter adjustment information of the target image, one of the items may be adjusted according to actual needs, or several items of parameter adjustment information or all of the parameter adjustment information may be adjusted, and the embodiment of the present invention is not limited to this.

[0133] In specific implementation, the color scale parameter of the target image can be mapped to the first preset interval according to the determined color scale parameter adjustment information; and / or the saturation parameter of the target image can be mapped to the second preset interval according to the determined saturation parameter adjustment information; and / or the brightness parameter of the target image can be mapped to the third preset interval according to the determined brightness parameter adjustment information; and / or the color scale midpoint parameter of the target image can be adjusted according to the determined color scale midpoint parameter adjustment information. The preset interval can be defined by the inventor according to actual needs or experience, and the embodiments of the present invention are not limited to this.

[0134] S105: Generate a content display background image based on the target image after color adjustment.

[0135] In this step, the color-processed target image is blurred to generate a content display background image. In specific implementation, the HSV space of the color-processed target image can be converted into RGB space, and Gaussian blur can be used for blurring. The blur kernel radius can be set according to actual needs or empirical values, such as Figure 1b As shown, it is a schematic diagram of the blur effect when the blur kernel radius is set to 180.

[0136] During specific implementation, in step S103, according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, at least one parameter adjustment information of the target image can be determined in the following manner: according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the color scale adjustment intervals corresponding to different occupancy rates, the color scale parameter adjustment information of the target image is determined; according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the color scale center point adjustment intervals corresponding to different occupancy rates, the color scale midpoint parameter adjustment information of the target image is determined; according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the saturation adjustment intervals corresponding to different occupancy rates, the saturation parameter adjustment information of the target image is determined; according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the saturation adjustment intervals corresponding to different occupancy rates, the brightness parameter adjustment information of the target image is determined.

[0137] For the convenience of description, the specific implementation process of the present disclosure is described below by taking the example of dividing the color feature values ​​included in the color feature statistical information into three intervals according to two preset color feature values, that is, N=2.

[0138] In one embodiment, if the occupancy rate of any interval range in the N+1 interval ranges is greater than the first preset threshold, the parameter adjustment information of the target image is determined according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals. In the case of N=2, if the occupancy rate of any interval range in the three interval ranges is greater than the first preset threshold, the interval of the first preset threshold can be but is not limited to being set to 50% to 70%, specifically including at least one of the following:

[0139] According to the occupancy rate of the color feature value in different color feature value intervals included in the color feature statistical information, and the first color scale adjustment interval corresponding to the different occupancy rates and the interval to which the color feature value of the target image belongs, the color scale parameter adjustment information of the target image is determined. In a specific implementation, the color scale parameter adjustment information of the target image can be determined according to the following formula: V_target = (Vmax'-Vmin') / (Vmax-Vmin)×Value+Vmin', where: Vmin' and Vmax' are the lower limit value and the upper limit value of the color scale adjustment interval, Vmax and Vmin are the upper limit value and the lower limit value of the interval to which the color feature value of the target image belongs, and Value is the color feature value of the target image.

[0140] According to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals and the color scale center point adjustment intervals corresponding to the different occupancy rates, the color scale midpoint parameter adjustment information of the target image is determined.

[0141] According to the occupancy rate of the color feature values ​​in different color feature value intervals included in the color feature statistical information, and the saturation adjustment intervals corresponding to the different occupancy rates, the saturation parameter adjustment information of the target image is determined. In a specific implementation, the saturation parameter adjustment information of the target image can be determined according to the following formula: s'=s+s1, where s' represents the saturation parameter after adjustment, s represents the saturation parameter before adjustment, and s1 represents the saturation adjustment interval.

[0142] According to the occupancy rate of the color feature value in different color feature value intervals included in the color feature statistical information, and the brightness adjustment intervals corresponding to the different occupancy rates, the brightness parameter adjustment information of the target image is determined. In a specific implementation, the brightness parameter adjustment information of the target image can be determined according to the following formula: v'=v+v1, where v' represents the brightness parameter after adjustment, v represents the brightness parameter before adjustment, and v1 represents the brightness adjustment interval.

[0143] For ease of understanding, the color feature values ​​contained in the target image are divided into the following three intervals according to the third interval division method, taking the first preset threshold of 60% as an example: the color feature values ​​contained in the first interval account for less than 30% of all color feature values, the color feature values ​​contained in the second interval account for 30% to 70% of all color feature values, and the color feature values ​​contained in the third interval account for more than 70% of all color feature values.

[0144] If the first interval contains more than 60% of the color feature value, its grayscale image is as follows: Figure 1cAs shown, in this case, the color scale adjustment range can be set to [220, 255] to brighten the overall image. At the same time, the color scale center point parameter can be adjusted to any parameter within 2.6 to 3.0 to improve the color of the dark part. In addition, the overall color purity can be improved by increasing the saturation parameter.

[0145] Taking the target image color feature value Value=58 as an example, the adjusted color scale parameter is calculated using the above formula: V_target=(Vmax'-Vmin') / (Vmax-Vmin)×Value+Vmin'=(255-220) / (255-0)×58+220=227.961, that is, the color scale parameter of the first interval color feature value can be adjusted to the range of 220 to 255; the color scale center point can be adjusted to any parameter within the range of 2.6 to 3.0. During specific implementation, it can be set according to actual needs or empirical values. For example, the color scale center point can be adjusted to 2.8; taking the saturation parameter value s=20, s1=95 as an example, wherein the s1 interval range can be within the range of 90 to 100. During specific implementation, it can be set according to actual needs or empirical values. The adjusted saturation parameter is calculated using the above formula: s'=s+s1=20+95=115.

[0146] like Figure 1d As shown in , it is the adjustment information of the color scale and the color scale center point parameters; Figure 1e As shown, it is the saturation parameter adjustment information.

[0147] If the occupancy rate of the color feature values ​​contained in the second interval is greater than 60%, its grayscale image is as follows Figure 1f As shown, in this case, the color level adjustment interval can be set to [190, 255]. At the same time, the overall color purity can be improved by increasing the saturation parameter, and the visual effect can be balanced by increasing the brightness parameter.

[0148] Taking the target image color feature value Value=110 as an example, the adjusted color scale parameter is calculated using the above formula: V_target=(Vmax'-Vmin') / (Vmax-Vmin)×Value+Vmin'=(255-190) / (255-0)×110+190=218.039, that is, the color scale parameter of the first interval color feature value can be adjusted to the range of 190 to 255; taking the saturation parameter value s=20, s1=70 as an example, Among them, the interval range of s1 can be within 65 to 75. During specific implementation, it can be set according to actual needs or empirical values. The adjusted saturation parameter calculated using the above formula is: s'=s+s1=20+70=90; taking the brightness parameter value v=20, v1=10 as an example, wherein the interval range of v1 can be within 5 to 15. During specific implementation, it can be set according to actual needs or empirical values. The adjusted brightness parameter calculated using the above formula is: v'=v+v1=20+10=30.

[0149] like Figure 1g As shown in , it is the color scale parameter adjustment information; Figure 1h As shown, it is the saturation and brightness parameter adjustment information.

[0150] If the occupancy rate of the color feature values ​​contained in the third interval is greater than 60%, its grayscale image is as follows Figure 1i As shown, in this case, the color scale adjustment interval can be set to [220, 255]. At the same time, the color scale center point parameter can be adjusted to any parameter within 0.2 to 0.6 to reduce the color of the bright part. During specific implementation, it can be set according to actual needs or empirical values. In addition, the purity of the overall color can be improved by increasing the saturation parameter, and the visual effect can be balanced by increasing the brightness parameter.

[0151] Taking the target image color feature value Value = 200 as an example, the adjusted color scale parameter is calculated using the above formula: V_target = (Vmax'-Vmin') / (Vmax-Vmin)×Value+Vmin'=(255-220) / (255-0)×200+220=247.451, that is, the color scale parameter of the color feature value of the first interval can be adjusted to the range of 220 to 255; the color scale center point is adjusted to 0.4; with the saturation parameter value s=20, s1 =80 as an example, where the interval range of s1 can be between 75 and 85. During specific implementation, it can be set according to actual needs or empirical values. The adjusted saturation parameter is calculated using the above formula: s'=s+s1=20+80=100; taking the brightness parameter value v=20, v1=10 as an example, where the interval range of v1 can be between 5 and 15. During specific implementation, it can be set according to actual needs or empirical values. The adjusted brightness parameter is calculated using the above formula: v'=v+v1=20+10=30.

[0152] like Figure 1j As shown in , it is the adjustment information of the color scale and the color scale center point parameters; Figure 1k As shown, it is the saturation and brightness parameter adjustment information.

[0153] In one embodiment, if The occupancy rate of each interval is less than a second preset threshold, and the parameter adjustment information of the target image is determined according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, wherein: In the case of N=2, if the second interval occupancy rate is less than the second preset threshold, the interval of the second preset threshold can be but not limited to 10% to 30%, specifically including:

[0154] The grayscale value of the target image is determined according to the preset grayscale value parameter adjustment information. In a specific implementation, the grayscale value of the target image can be determined according to the following formula: Y = 7.38964445190504 (E-13) + 3.30816859616442x - 0.0236981739031359x 2 +5.74373817629407(E-5)x 3 , where x is the grayscale color feature value of the grayscale image corresponding to the target image, and E is the exponential power of 10;

[0155] According to the occupancy rate of the color feature value in different color feature value intervals included in the color feature statistical information, and the second color scale adjustment interval corresponding to the different occupancy rates and the interval to which the color feature value of the target image belongs, the color scale parameter adjustment information of the target image is determined. In a specific implementation, the color scale parameter adjustment information of the target image can be determined according to the following formula: V_target = (Vmax'-Vmin') / (Vmax-Vmin)×Value+Vmin', wherein Vmin' and Vmax' are the lower limit value and the upper limit value of the color scale adjustment interval, respectively, Vmax and Vmin are the upper limit value and the lower limit value of the interval to which the color feature value of the target image belongs, respectively, and Value is the color feature value of the target image;

[0156] The saturation parameter adjustment information of the target image is determined according to the preset second saturation adjustment interval. In a specific implementation, the saturation parameter adjustment information of the target image is determined according to the following formula: s'=s+s1, where s' represents the saturation parameter after adjustment, s represents the saturation parameter before adjustment, and s1 represents the saturation adjustment interval;

[0157] The brightness parameter adjustment information of the target image is determined according to the preset second brightness adjustment interval. In a specific implementation, the brightness parameter adjustment information of the target image is determined according to the following formula: v'=v+v1, where v' represents the brightness parameter after adjustment, v represents the brightness parameter before adjustment, and v1 represents the brightness adjustment interval.

[0158] For example, when the second interval color feature value occupancy rate is less than 20%, its grayscale image is as follows Figure 1l As shown, in this case, the color level adjustment range can be set to [190, 255] to brighten the page as a whole. At the same time, the overall color purity can be improved by increasing the saturation parameter.

[0159] Taking the gray value x=43 as an example, the gray value of the target image is calculated using the above formula: Y=7.38964445190504(E-13)+3.30816859616442x-0.0236981739031359x 2 +5.74373817629407(E-5)x 3 =7.38964445190504(E-13)+3.30816859616442×43-0.0236981739031359×43 2 +5.74373817629407(E-5)43 3=103; Taking the target image color feature value Value=110 as an example, the adjusted color scale parameter is calculated using the above formula: V_target=(Vmax'-Vmin') / (Vmax-Vmin)×Value+Vmin'=(255-190) / (255-0)×110+190=218.039, that is, the color scale parameter of the first interval color feature value can be adjusted to the range of 190-255; Taking the saturation parameter value s=20, s1=95 as an example, wherein the s1 interval range can be within 90-100. During specific implementation, it can be set according to actual needs or empirical values. The adjusted saturation parameter is calculated using the above formula: s'=s+s1=20+95=115.

[0160] like Figure 1m As shown in , it is the color scale parameter adjustment information; Figure 1n As shown, it is the saturation parameter adjustment information; Figure 1o As shown, it is the grayscale value parameter adjustment information of the target image shown.

[0161] By processing the target image through the above process, the background color can be visually integrated with the target image, increasing the visual immersion effect of the displayed content, thereby improving the quality and display effect of the background image.

[0162] Embodiment 2

[0163] In order to better understand the embodiment of the present disclosure, the following takes the case where the occupancy rate of the color feature value in the second interval included in the color feature statistical information of the embodiment of the present disclosure reaches different preset thresholds as an example to illustrate the specific implementation of the embodiment of the present disclosure. Figure 2 As shown, it is an implementation process when the occupancy rate of the second interval reaches different preset thresholds, including steps S201 to S208, wherein:

[0164] S201: Counting the occupancy rate of the color feature value included in the color feature statistical information in the second interval.

[0165] In this step, the occupancy rate of the color feature value included in the color feature statistical information in the second color feature value interval is counted. The specific implementation method can refer to the implementation of step S102, which will not be repeated here.

[0166] S202: Determine whether the occupancy rate of the color feature value in the second interval included in the color feature statistical information is greater than a first preset threshold. If the determination result is yes, execute S203 in sequence; if the determination result is no, execute S206 in sequence.

[0167] S203: Determine brightness parameter adjustment information of the target image.

[0168] In this step, the specific process can refer to the implementation of step S103, which will not be repeated here.

[0169] S204: Determine the color scale parameter adjustment information of the target image.

[0170] In this step, the specific process can refer to the implementation of step S103, which will not be repeated here.

[0171] S205: Determine the saturation parameter adjustment information of the target image and end the process.

[0172] In this step, the specific process can refer to the implementation of step S103, which will not be repeated here.

[0173] S206: Determine whether the occupancy rate of the color feature value included in the color feature statistical information in the second interval is less than the second preset threshold. If the determination result is yes, execute S207 sequentially; if the determination result is no, execute S208 sequentially.

[0174] In this step, the specific process can refer to the implementation of step S103, which will not be repeated here.

[0175] S207: Adjust the grayscale value of the target image and execute step S204.

[0176] In this step, the specific process can refer to the implementation of step S103, which will not be repeated here.

[0177] S208: End the process.

[0178] After generating a content display background image according to the background image processing method provided by the embodiment of the present disclosure, different categories of images can be subjected to different color processing, and then blurred to generate a content display background image. It should be noted that the background image processing method provided by the embodiment of the present disclosure can be applied to display information in a page in an information flow manner, especially in a card-style information flow, in response to a search request initiated by a user, displaying relevant search results in an aggregated card manner on the search result display page, etc., and generating a display background image for the main card based on the target image in the main card.

[0179] Embodiment 3

[0180] Reference Figure 3a FIG. 1 is a flowchart of a search result display method provided by an embodiment of the present disclosure, comprising the following steps:

[0181] S301: Initiate a search request based on the acquired search keyword.

[0182] In specific implementation, the user submits a search request through the client application according to their own needs, and the search keyword is carried in the submitted search request. It should be noted that the user can submit the search request in any way such as text, voice or picture, and the embodiments of the present disclosure do not limit this. For example, Figure 3b As shown, it is a schematic diagram of the search page displayed by the client. The user enters the search keyword in the search box displayed on the search page and submits it. The client发起 a search request to the server based on the search keyword submitted by the user. Taking the search keyword entered by the user as "Big Fish & Begonia" as an example

[0183] S302: Obtain at least one target resource that matches the search keyword, and the target resource includes a target picture.

[0184] In specific implementation, when the server receives the search request sent by the client, it searches for matching target resources according to the search keyword "Big Fish & Begonia" carried therein. Among them, the target resources matched by the server can include various types. For example, they can be video resources, picture resources, music resources, information resources, etc. related to "Big Fish & Begonia", and the target resources matched include target pictures.

[0185] S303: Display the search result cards generated according to at least one target resource on the search result page.

[0186] Among them, the content display background picture of the search result card is generated based on the target picture. In specific implementation, the color of the content display background picture can be a streaming gradient color, and the streaming gradient color is generated by adjusting the color according to the main color of the target picture, and the color of the content display background picture gradually changes to transparent in a predetermined direction.

[0187] In specific implementation, different search result cards can be generated for different types of target resources obtained in step S302.

[0188] For example, in one embodiment, the server generates several search result cards according to the found target resources of different types. In specific implementation, a corresponding search result card can be generated for each search result, or multiple search results can be aggregated to generate one search result card, and the embodiments of the present disclosure do not limit this. When the search result card contains a target picture, the server can also generate the content display background picture of the search result card according to the target picture by using the background picture processing method provided by the embodiments of the present disclosure, and send the search result card containing the content display background picture to the client, and the client displays it to the user on the search result page. As Figure 3c shown, it is a schematic diagram of a possible effect after the search result page is processed by the background picture processing method.

[0189] In another embodiment, after the server finds at least one target resource that matches the search keyword, it can send the at least one target resource found to the client, and the client generates several search result cards. In specific implementation, a corresponding search result card can be generated for each search result, or multiple search results can be aggregated to generate a search result card, which is not limited in the embodiment of the present disclosure. In the case where the search result card contains a target image, the client generates a content display background image of the search result card based on the target image using the background image processing method provided in the embodiment of the present disclosure and displays it on the search result page.

[0190] This embodiment obtains at least one target resource matching the search keyword based on the obtained search keyword, displays the search results generated according to each target resource on the search results page, matches the target resource on the server side for the main search result included in the search results, generates a content display background image based on the target image included in the target resource, and displays it on the page. The display result can significantly distinguish the main search result from other search results, providing users with efficient information acquisition efficiency, while the background color is visually integrated with the color of the target image on the page, providing users with a comfortable visual experience.

[0191] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0192] Based on the same inventive concept, the embodiment of the present disclosure also provides a background image processing device corresponding to the background image processing method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned background image processing method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0193] Embodiment 4

[0194] Reference Figure 4 FIG. 1 is a schematic diagram of a background image processing method provided by Embodiment 3 of the present disclosure, wherein the device includes:

[0195] A first determining unit 401 is used to determine color feature statistical information corresponding to a target image;

[0196] A statistical unit 402, configured to count the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals according to the pre-divided color feature value intervals;

[0197] The second determining unit 403 is used to determine the parameter adjustment information of the target image according to the occupancy rate of the color feature value included in the color feature statistical information in different color feature value intervals.

[0198] The processing unit 404 is used to perform color adjustment processing on the target image according to the determined parameter adjustment information;

[0199] The creation unit 405 is used to generate a content display background image according to the target image after color adjustment.

[0200] In a possible implementation manner, the second determination unit 403 is specifically used to determine the color scale parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the color scale adjustment intervals corresponding to the different occupancy rates; determine the color scale midpoint parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the color scale center point adjustment intervals corresponding to the different occupancy rates; determine the saturation parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the saturation adjustment intervals corresponding to the different occupancy rates; determine the brightness parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the brightness adjustment intervals corresponding to the different occupancy rates.

[0201] In a possible implementation manner, the color feature value intervals are divided according to the following steps:

[0202] According to the pre-set N color feature values, the color feature values ​​included in the color feature statistical information are divided into N+1 color feature value intervals, where N is an integer greater than or equal to 1, and the color feature value included in the N+1th interval is greater than the color feature value included in the Nth interval.

[0203] In a possible implementation manner, the second determination unit 403 is specifically used to determine the parameter adjustment information of the target image according to the occupancy of the color feature values ​​included in the color feature statistical information in different color feature value intervals if the occupancy of any interval range in the N+1 interval ranges is greater than the first preset threshold value: determine the color scale parameter adjustment information of the target image according to the occupancy of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the first color scale adjustment interval corresponding to the different occupancies and the interval to which the color feature value of the target image belongs; determine the saturation parameter adjustment information of the target image according to the preset first saturation adjustment interval; determine the brightness parameter adjustment information of the target image according to the preset first brightness adjustment interval.

[0204] In a possible implementation manner, the second determining unit 403 is specifically configured to: The occupancy rate of each interval is less than a second preset threshold value, and the parameter adjustment information of the target image is determined according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals: the grayscale value of the target image is determined according to the preset grayscale value parameter adjustment information; the color scale parameter adjustment information of the target image is determined according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the second color scale adjustment intervals corresponding to the different occupancies and the interval to which the color feature values ​​of the target image belong; the saturation parameter adjustment information of the target image is determined according to the preset second saturation adjustment interval; the brightness parameter adjustment information of the target image is determined according to the preset second brightness adjustment interval.

[0205] In a possible implementation, the parameter adjustment information includes at least one of the following: color scale parameter adjustment information, saturation parameter adjustment information, brightness parameter adjustment information and color scale midpoint parameter adjustment information; and the processing unit is specifically used to map the color scale parameter of the target image to a first preset interval according to the determined color scale parameter adjustment information; and / or map the saturation parameter of the target image to a second preset interval according to the determined saturation parameter adjustment information; and / or map the brightness parameter of the target image to a third preset interval according to the determined brightness parameter adjustment information; and / or adjust the color scale midpoint parameter of the target image according to the determined color scale midpoint parameter adjustment information.

[0206] In a possible implementation, the target image is represented by any one of the following: red, green, and blue (RGB), hue, saturation, and brightness (HSV), and hue, saturation, and brightness (HSL); and if the target image is represented by HSL, the creation unit 405 is specifically used to convert the color-adjusted target image from the HSL space to the RGB space; blur the pixels in the neighborhood according to a filter kernel of a preset size to generate a content display background image.

[0207] In a possible implementation, the first determination unit 401 is specifically used to convert the color feature values ​​contained in the target image into grayscale values ​​to obtain a grayscale image corresponding to the target image; and determine the color feature statistical information corresponding to the target image based on the number of occurrences of each grayscale value in the grayscale image.

[0208] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0209] Embodiment 5

[0210] The embodiments of the present disclosure also provide a search result display device corresponding to the search result display method. Since the principle of solving the problem by the device in the embodiments of the present disclosure is similar to the above-mentioned search result display method in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0211] Reference Figure 5 FIG. 1 is a schematic diagram of a search result display device provided in Embodiment 5 of the present disclosure, wherein the device includes:

[0212] A search unit 501, configured to initiate a search request based on the acquired search keyword;

[0213] An acquisition unit 502 is used to acquire at least one target resource matching the search keyword, wherein the target resource includes a target image;

[0214] The display unit 503 is configured to display a search result card generated according to the at least one target resource on the search result page, wherein a content display background image of the search result card is generated based on the target image.

[0215] The color of the content display background image is a streaming gradient color, which is generated according to the main color adjustment color of the target image, and the color of the content display background image gradually becomes transparent in a predetermined direction.

[0216] For descriptions of the processing flow of each unit in the device and the interaction flow between each unit, reference may be made to the relevant descriptions in the above method embodiments, which will not be described in detail here.

[0217] Embodiment 6

[0218] Based on the same technical concept, the embodiment of the present application also provides a computer device. Figure 6 As shown, it is a schematic diagram of the structure of a computer device provided in an embodiment of the present application, including a processor 601, a memory 602, and a bus 603. Among them, the memory 602 is used to store execution instructions, including a memory 6021 and an external memory 6022; the memory 6021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 601, and the data exchanged with the external memory 6022 such as a hard disk. The processor 601 exchanges data with the external memory 6022 through the memory 6021. When the computer device is running, the processor 601 communicates with the memory 602 through the bus 603, so that the processor 601 executes the execution instructions mentioned in the above method embodiment.

[0219] The present disclosure also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the background image processing method or the search result display steps described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0220] The computer program product of the background image processing method or the search result display method provided in the embodiments of the present disclosure includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the background image processing method or the search result display method described in the above method embodiments. Please refer to the above method embodiments for details, which will not be repeated here.

[0221] The present disclosure also provides a computer program, which implements any one of the methods of the aforementioned embodiments when executed by a processor. The computer program product can be implemented in hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0222] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0223] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0224] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0225] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0226] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A background image processing method, characterized in that: include: Determine the color feature statistics corresponding to the target image; According to the pre-divided color feature value intervals, counting the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals; Determining parameter adjustment information of the target image according to occupancy rates of color feature values ​​included in the color feature statistical information in different color feature value intervals; Performing color adjustment processing on the target image according to the determined parameter adjustment information; Perform blur processing on the target image after color adjustment to generate a background image for content display; The step of determining the color feature statistical information corresponding to the target image includes: Convert the color feature values ​​contained in the target image into grayscale values ​​to obtain a grayscale image corresponding to the target image; According to the number of occurrences of each grayscale value in the grayscale image, color feature statistical information corresponding to the target image is determined.

2. The background image processing method according to claim 1, characterized in that: Determining parameter adjustment information of the target image according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, specifically including at least one of the following: Determining the color scale parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals and the color scale adjustment intervals corresponding to the different occupancy rates; Determine the color scale midpoint parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals and the color scale center point adjustment intervals corresponding to the different occupancy rates; Determine the saturation parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals and the saturation adjustment intervals corresponding to the different occupancy rates; The brightness parameter adjustment information of the target image is determined according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals and the brightness adjustment intervals corresponding to the different occupancy rates.

3. The background image processing method according to claim 1, characterized in that: The color feature value intervals are divided according to the following steps: According to the pre-set N color feature values, the color feature values ​​included in the color feature statistical information are divided into N+1 color feature value intervals, where N is an integer greater than or equal to 1, and the color feature value included in the N+1th interval is greater than the color feature value included in the Nth interval.

4. The background image processing method according to claim 3, characterized in that: If the occupancy rate of any interval range in the N+1 interval ranges is greater than the first preset threshold, the parameter adjustment information of the target image is determined according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, specifically including at least one of the following: Determine the color scale parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the first color scale adjustment intervals corresponding to the different occupancy rates and the intervals to which the color feature values ​​of the target image belong; Determining saturation parameter adjustment information of the target image according to a preset first saturation adjustment interval; The brightness parameter adjustment information of the target image is determined according to a preset first brightness adjustment interval.

5. The background image processing method according to claim 3, characterized in that: If The parameter adjustment information of the target image is determined according to the occupancy rate of the color feature values ​​included in the color feature statistical information in different color feature value intervals, specifically including: Determining the grayscale value of the target image according to preset grayscale value parameter adjustment information; Determine the color scale parameter adjustment information of the target image according to the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals, and the second color scale adjustment intervals corresponding to the different occupancy rates and the intervals to which the color feature values ​​of the target image belong; Determining saturation parameter adjustment information of the target image according to a preset second saturation adjustment interval; The brightness parameter adjustment information of the target image is determined according to a preset second brightness adjustment interval.

6. The background image processing method according to claim 1, characterized in that: The parameter adjustment information includes at least one of the following: color scale parameter adjustment information, saturation parameter adjustment information, brightness parameter adjustment information and color scale midpoint parameter adjustment information; as well as According to the determined parameter adjustment information, the target image is subjected to color adjustment processing, including: According to the determined color scale parameter adjustment information, mapping the color scale parameter of the target image to a first preset interval; and / or According to the determined saturation parameter adjustment information, mapping the saturation parameter of the target image to a second preset interval; and / or According to the determined brightness parameter adjustment information, mapping the brightness parameter of the target image to a third preset interval; and / or According to the determined color scale midpoint parameter adjustment information, the color scale midpoint parameter of the target image is adjusted.

7. The background image processing method according to claim 1, characterized in that: The target image is represented by any of the following: red, green, and blue (RGB), hue, saturation, and brightness (HSV), and hue, saturation, and brightness (HSL); And if the target image is represented by HSL, then Generate a content display background image based on the target image after color adjustment, including: Convert the color-adjusted target image from the HSL space to the RGB space; According to the filter kernel of the preset size, the pixels in the neighborhood are blurred to generate a background image for content display.

8. A search result display method, characterized in that: include: Initiate a search request based on the obtained search keywords; Acquire at least one target resource matching the search keyword, wherein the target resource includes a target image; A search result card generated according to the at least one target resource is displayed on the search result page and a content display background image of the search result card is used to distinguish the main search result card from other search result cards, wherein the content display background image is generated by processing the target image according to the background image processing method according to claim 1.

9. The search result display method according to claim 8, characterized in that: The color of the content display background image is a streaming gradient color, which is generated according to the main color of the target image, and the color of the content display background image gradually becomes transparent in a predetermined direction.

10. A background image processing device, characterized in that: include: A first determining unit, used to determine color feature statistical information corresponding to a target image; A statistical unit, configured to count the occupancy rates of the color feature values ​​included in the color feature statistical information in different color feature value intervals according to the pre-divided color feature value intervals; A second determining unit, configured to determine parameter adjustment information of the target image according to occupancy rates of color feature values ​​included in the color feature statistical information in different color feature value intervals; A processing unit, configured to perform color adjustment on the target image according to the determined parameter adjustment information; A creation unit is used to perform blur processing on the target image after color adjustment to generate a background image for content display; Wherein, when the first determination unit is executed to determine the color feature statistical information corresponding to the target image, it is further used to convert the color feature value contained in the target image into a grayscale value to obtain a grayscale image corresponding to the target image; According to the number of occurrences of each grayscale value in the grayscale image, color feature statistical information corresponding to the target image is determined.

11. A search result display device, characterized in that: include: A search unit, used to initiate a search request based on the acquired search keyword; An acquisition unit, configured to acquire at least one target resource matching the search keyword, wherein the target resource includes a target image; A display unit is used to display a search result card generated according to the at least one target resource on a search result page and use a content display background image of the search result card to distinguish a main search result card from other search result cards, wherein the content display background image is generated by processing the target image according to the background image processing method according to claim 1.

12. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of a background image processing method as described in any one of claims 1 to 7, or the steps of a search result display method as described in claim 8 or 9 are performed.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the computer program executes the steps of a background image processing method as described in any one of claims 1 to 7, or the steps of a search result display method as described in claim 8 or 9.

Citation Information

Patent Citations

  • Image processing method and apparatus

    CN106204690A

  • Image generation method and device, computer equipment and computer storage medium

    CN109472839A

  • Theme color processing method, device and display page generation method, device and equipment

    CN110673904A

  • Page background setting method and device and electronic device

    CN110865862A

  • Graphical user interface for mobile phones

    CN304333123S