A theme recommendation method, device, apparatus and system

By calculating the color difference between the target environment and the preset theme image using a color clustering algorithm, the system automatically recommends the closest display theme, solving the problem that the display theme of the smart operating system cannot adapt to the environment and improving the user experience.

CN115438209BActive Publication Date: 2026-07-31XIAN THUNDER SOFTWARE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN THUNDER SOFTWARE TECH CO LTD
Filing Date
2022-07-15
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The existing display theme settings of smart operating systems cannot adapt to the device's environment, resulting in a poor user experience.

Method used

By receiving environmental image data sent by smart terminals, the color clustering algorithm is used to calculate the color difference between the target environment and the preset theme image, and the closest theme is recommended for automatic setting.

Benefits of technology

It achieves precise matching between the display theme and the environment, enhances the user experience, and provides an intelligent and immersive theme setting method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115438209B_ABST
    Figure CN115438209B_ABST
Patent Text Reader

Abstract

This invention discloses a theme recommendation method, apparatus, device, and system. The theme recommendation method, applied to a server, includes: receiving the color values ​​of a first preset number of environmental cluster blocks and the weights of each environmental cluster block of a target environment image sent by a smart terminal; obtaining the color values ​​of a first preset number of theme cluster blocks and the weights of each theme cluster block of each preset theme image determined according to a preset color clustering algorithm; determining the overall color difference value between the target environment image and each preset theme image based on the color values ​​and weights of each environmental cluster block of the target environment image and the color values ​​and weights of each theme cluster block of each preset theme image; determining the theme matched by the preset theme image with the smallest overall color difference value as the recommended theme, and returning the result to the smart terminal. This method avoids the loss of image color information during image information processing, providing users with a more accurate and convenient way to set themes, thus improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method, apparatus, device, and system for recommending topics. Background Technology

[0002] Currently, most electronic devices with displays are equipped with smart operating systems, including Android, iOS, Microsoft Windows, and Harmony, to enhance the user experience of the interactive interface. The display theme of the smart operating system determines the color tone, style, aesthetics, and image quality of the display interface. Currently, the typical method for setting the display theme of a smart operating system is to set a default theme at the factory, and then provide a theme settings menu for users to manually select a suitable display theme. Summary of the Invention

[0003] The inventors discovered that in existing electronic devices equipped with smart operating systems, the default theme does not adapt well to the device's environment. Furthermore, the theme settings menu relies on user identification and filtering, and the display theme selected based on user experience also lacks consideration of environmental factors, resulting in a poor user experience due to the electronic device's display theme not adapting to the current environment. To at least partially solve the technical problems existing in the prior art, the inventors made this invention, and through specific embodiments, provide the following technical solution:

[0004] In a first aspect, embodiments of the present invention provide a topic recommendation method applied to a server, the method comprising the following steps:

[0005] The color values ​​of a first preset number of environmental cluster blocks and the weights of each environmental cluster block are received from the target environment image sent by the smart terminal.

[0006] Obtain the color values ​​of the first preset number of theme cluster blocks for each preset theme image, determined by a preset color clustering algorithm, and the weight of each theme cluster block;

[0007] Based on the color values ​​and weights of each environment cluster block of the target environment image and the color values ​​and weights of each theme cluster block of each preset theme image, the overall color difference value between the target environment image and each preset theme image is determined.

[0008] The theme that matches the preset theme image corresponding to the smallest overall color difference value is determined as the recommended theme, and the result is returned to the smart terminal.

[0009] Secondly, embodiments of the present invention provide a topic recommendation method applied to a smart terminal, the method comprising the following steps:

[0010] Get the target environment image corresponding to the current time period;

[0011] Based on a preset color clustering algorithm, the color values ​​of a first preset number of environment clustering blocks in the target environment image and the weights of each environment clustering block are determined and sent to the server.

[0012] Receive the recommended topics returned by the server.

[0013] Thirdly, embodiments of the present invention provide a topic recommendation method, the method comprising the following steps:

[0014] Get the target environment image corresponding to the current time period;

[0015] Based on a preset color clustering algorithm, the color values ​​of a first preset number of environmental clustering blocks and the weights of each environmental clustering block are determined in the target environment image;

[0016] Obtain the color values ​​of a first preset number of theme cluster blocks for each preset theme image, and the weight of each theme cluster block, as determined by the preset color clustering algorithm.

[0017] Based on the color values ​​and weights of each environment cluster block of the target environment image and the color values ​​and weights of each theme cluster block of each preset theme image, the overall color difference value between the target environment image and each preset theme image is determined.

[0018] The theme that matches the preset theme image corresponding to the smallest overall color difference value is determined as the recommended theme.

[0019] Fourthly, embodiments of the present invention provide a server-side component, comprising:

[0020] The first receiving module is used to receive the color values ​​of a first preset number of environmental clustering blocks and the weights of each environmental clustering block from the target environment image sent by the smart terminal.

[0021] The first color determination module is used to obtain the color values ​​of a first preset number of theme cluster blocks for each preset theme image and the weight of each theme cluster block, which are determined according to a preset color clustering algorithm.

[0022] The first color difference calculation module is used to determine the overall color difference value between the target environment image and each preset theme image based on the color value and weight of each environment cluster block of the target environment image and the color value and weight of each theme cluster block of each preset theme image.

[0023] The theme filtering module is used to determine the theme that matches the preset theme image corresponding to the smallest overall color difference value as the recommended theme, and return it to the smart terminal.

[0024] Fifthly, embodiments of the present invention provide a smart terminal, comprising:

[0025] The first image data acquisition module is used to acquire target environment images corresponding to the current time period;

[0026] The first sending module is used to determine the color values ​​of a first preset number of environment clustering blocks in the target environment image and the weight of each environment clustering block according to a preset color clustering algorithm, and send them to the server.

[0027] The second receiving module is used to receive the recommended topics returned by the server.

[0028] Sixthly, embodiments of the present invention provide a topic recommendation system, the system comprising:

[0029] The second image data acquisition module is used to acquire target environment images corresponding to the current time period;

[0030] The second color determination module is used to determine the color values ​​of a first preset number of environment cluster blocks and the weight of each environment cluster block in the target environment image according to a preset color clustering algorithm.

[0031] The third color determination module is used to obtain the color values ​​of a first preset number of theme cluster blocks for each preset theme image and the weight of each theme cluster block, which are determined according to the preset color clustering algorithm.

[0032] The second color difference calculation module is used to determine the overall color difference value between the target environment image and each preset theme image based on the color value and weight of each environment cluster block of the target environment image and the color value and weight of each theme cluster block of each preset theme image.

[0033] The theme determination module is used to determine the theme that matches the preset theme image corresponding to the smallest overall color difference value as the recommended theme.

[0034] In a seventh aspect, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the topic recommendation method as described above.

[0035] Eighthly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the topic recommendation method as described above.

[0036] Ninthly, embodiments of the present invention provide a display system, comprising: at least one smart terminal as described above and at least one server as described above;

[0037] The smart terminal is connected to the server network.

[0038] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:

[0039] The theme recommendation method provided in this invention compares the target environment image sent by the smart terminal with a preset theme image to obtain the theme with the smallest color difference from the environment. During color comparison, the overall color difference value between the target environment image and the preset theme image is determined based on the color and weight of the same number of clustered blocks. This yields the preset theme image whose color is closest to the target environment image. This avoids the loss of image color information during image information processing, resulting in a more accurate overall color difference value between the target environment image and the preset theme image, thus ensuring that the recommended theme is color-appropriate to the target environment image. For displays of electronic devices with relatively fixed placement, the recommended theme obtained through comparison can usually adapt to the current placement environment of the electronic device. Furthermore, this invention can provide different recommended themes at different times of the day based on the environmental changes of the device, making the themes provided at each time period more consistent with the lighting characteristics of the daily environment. This achieves intelligent recommendation of display themes based on environmental changes. Themes adapted to the usage environment help improve the user experience, providing users with a more accurate and convenient way to set themes, thus enhancing the user experience.

[0040] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.

[0041] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0042] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0043] Figure 1 A flowchart illustrating the topic recommendation method provided in an embodiment of the present invention;

[0044] Figure 2 A schematic flowchart of the backlight brightness recommendation method provided in an embodiment of the present invention;

[0045] Figure 3 This is a schematic diagram illustrating the application process of a topic recommendation method provided in an embodiment of the present invention;

[0046] Figure 4 A flowchart illustrating another topic recommendation method provided in an embodiment of the present invention;

[0047] Figure 5 A flowchart illustrating another topic recommendation method provided in an embodiment of the present invention;

[0048] Figure 6 This is a schematic diagram of the server-side structure provided in an embodiment of the present invention;

[0049] Figure 7 This is a schematic diagram of the structure of a smart terminal provided in an embodiment of the present invention;

[0050] Figure 8 A schematic diagram of the structure of a topic recommendation system provided in an embodiment of the present invention;

[0051] Figure 9 This is a schematic diagram of the structure of a display system provided in an embodiment of the present invention. Detailed Implementation

[0052] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0053] Example 1

[0054] This invention provides a topic recommendation method applied to the server side, as described in the following embodiments. Figure 1 As shown, the method for recommending this topic includes the following steps:

[0055] S101: Receive the color values ​​of a first preset number of environmental clustering blocks and the weights of each environmental clustering block from the target environment image sent by the smart terminal;

[0056] S102: Obtain the color values ​​of the first preset number of theme cluster blocks for each preset theme image and the weight of each theme cluster block, determined by the preset color clustering algorithm.

[0057] S103: Based on the color values ​​and weights of each color aggregation point of the target environment image and the color values ​​and weights of each theme cluster block of each preset theme image, determine the overall color difference value between the target environment image and each preset theme image;

[0058] S104: Determine the theme that matches the preset theme image corresponding to the smallest overall color difference value as the recommended theme, and return it to the smart terminal.

[0059] The smart terminal described in this embodiment of the invention can be a smart device equipped with a smart operating system such as Android. After installation, it is usually placed in a fixed location and rarely moves. Examples include smart TVs, desktop computers, and smart terminals built into vehicles. This smart terminal has a display screen, enabling it to display recommended themes. As a terminal device that directly interacts with the user, the desktop (launcher) color tone, style, and detailed adjustment of the image quality of its display screen are important factors directly affecting the user experience. Based on this, the theme recommendation method provided in this embodiment of the invention uses a target environment image sent by the smart terminal to identify the placement environment matched by the smart terminal in the current time period, including data such as the brightness and color tone of the environment. Based on this target environment image, the theme matching the theme image with the overall color difference closest to the target environment image is determined as the recommended theme. The resulting recommended theme makes the desktop color tone, screen backlight, and image quality of the display screen more in line with the user's visual needs. Compared with the traditional mode that requires the user to manually select and adjust the display theme, this provides a more intelligent and immersive experience for the user.

[0060] In one embodiment, the target environment image sent by the smart terminal in step S101 above can be a target environment image corresponding to the current time period acquired by the smart terminal, specifically including:

[0061] The target environment image corresponding to the time period of the current time is obtained from the preset image database; the preset image database includes multiple preset environment images corresponding to different time periods, and each preset environment image is an environmental image of the target area collected at a preset historical time.

[0062] In one specific embodiment, the aforementioned preset environment image can be obtained in the following way:

[0063] Environmental images of the target area are collected at preset daily intervals at the corresponding preset historical times.

[0064] Based on the time period corresponding to the preset historical time in the predefined clock correspondence, the latest acquired environmental image is updated with the preset environmental image for the corresponding time period.

[0065] The current time period described in this embodiment of the invention refers to the time period to which the current moment belongs. The preset environment images in the preset image database mentioned above can be images of the environment on which the display screen of the smart terminal is placed, pre-captured by a camera integrated into the smart terminal or a camera set near the display screen. Before using the camera to capture images, it can be checked whether the camera is turned on. If so, preset camera parameters are loaded for the camera, including but not limited to: white balance, exposure compensation, brightness, sharpness, contrast, saturation, chroma, and focal length. Backlight compensation is enabled to counteract the influence of front and backlight on image capture, avoiding the problem of images being too dark in some scenes, which reduces the reference value of the captured images. Highlight compensation is also enabled to reduce the impact of local overexposure on the reference value of the image.

[0066] After the camera parameters are initialized, the camera preview is turned on and the preview image is saved to obtain an environmental image of the target area, which is the area covered by the camera.

[0067] In this embodiment of the invention, to obtain multiple preset environmental images corresponding to different time periods, the camera can perform periodic previews, for example, opening a preview every 2 hours to obtain the corresponding preview image, thus updating the environmental image of the target area at fixed time points. Therefore, if the camera remains powered on for 24 hours, 12 preview images corresponding to one day can be obtained, i.e., environmental image images of the target area corresponding to 12 different time periods. Based on this image acquisition process, the latest acquired environmental image is updated to the preset environmental image for the corresponding time period, thereby ensuring that the preset environmental images in the preset image database are always closest to the current environmental data of the smart terminal. When the smart terminal is powered on or woken from standby, the smart terminal obtains a theme recommendation instruction. Based on this instruction, it obtains the target environmental image corresponding to the current time period, thus determining the current time period. The preset environmental image for the corresponding time period is then retrieved from the preset image database as the target environmental image. For example, if the current time is 2 PM, and the preset image data stores preset environmental images corresponding to the time period from 2 PM to 4 PM, then the preset environmental image corresponding to 2 PM to 4 PM is used as the target environmental image for the current time period.

[0068] In one specific embodiment, the target environment image sent by the aforementioned smart terminal can also be an environmental image of the smart terminal's current environment, collected in real time by the smart terminal according to the topic recommendation instruction within the current time period. The specific real-time collection method can be through direct capture by the smart terminal's camera or by images captured and transmitted by a camera located external to the smart terminal. Specific implementation methods can be found in the detailed descriptions in the prior art; however, in this embodiment of the invention, no specific limitations are imposed.

[0069] In one specific embodiment, refer to Figure 3 As shown, assuming the smart terminal is a smart TV device, and assuming the smart TV device is equipped with a camera and the camera has a light sensor, the process of implementing topic recommendation for the smart TV device can specifically include:

[0070] Preparation process of preset image database: When the smart TV device is powered on, the camera parameters are initialized, the camera preview is turned on, the preview image is stored, and the environmental image of the area covered by the camera and the corresponding environmental target brightness are obtained. Based on this image acquisition process, the latest acquired environmental image is updated to the preset environmental image of the corresponding time period in the preset image database, and the environmental target brightness of each preset environmental image is stored in the preset image database.

[0071] When a smart TV device receives a theme recommendation instruction, it retrieves the target environment image corresponding to the current time period from the preset image database.

[0072] The smart TV device determines the color values ​​of a first preset number of environmental cluster blocks and the weight of each environmental cluster block in the target environment image according to a preset color clustering algorithm; and sends the color values ​​of the first preset number of environmental cluster blocks and the weight of each environmental cluster block in the target environment image to the server.

[0073] The server receives the color values ​​of the first preset number of environmental clusters and the weight of each environmental cluster in the target environment image. According to the above steps S102 to S104, it obtains the recommended topic and returns the recommended topic to the smart TV device.

[0074] Finally, the smart TV device sets up theme application recommendations based on the received recommended themes and displays the relevant interface for the recommended theme, including the shape, color, and icon style of the preset theme images.

[0075] In one embodiment, the aforementioned smart TV device determines the color values ​​of a first preset number of environment cluster blocks and the weights of each environment cluster block in the target environment image based on a preset color clustering algorithm, which may specifically include the following steps:

[0076] Obtain the color value of each pixel in the target environment image in a preset color space;

[0077] Based on the color values ​​of each pixel in the target environment image in the preset color space, according to the preset color clustering algorithm, each pixel in the target environment image is clustered into a first preset number of environment clustering blocks to obtain the color value of each environment clustering block; wherein, the color value of each environment clustering block is represented by the color value of the cluster center of the environment clustering block.

[0078] The weight of each environment cluster is obtained based on the proportion of pixels in each environment cluster to the total number of pixels in the target environment image.

[0079] In this embodiment of the invention, the proportion of the number of pixels in each environment cluster block to the total number of pixels in the target environment image is the ratio of the number of pixels in each environment cluster block to the total number of pixels in the preset target environment image.

[0080] In one specific embodiment, the aforementioned preset color space can be the RGB color space. Accordingly, obtaining the color values ​​of each pixel in the target environment image within the preset color space specifically includes:

[0081] Obtain the color coordinates of each pixel in the target environment image in the RGB color space.

[0082] In one specific embodiment, the color values ​​of each pixel in the target environment image in the preset color space are used to cluster each pixel in the target environment image into a first preset number of environment clustering blocks according to a preset color clustering algorithm, thereby obtaining the color value of each environment clustering block. Specifically, this includes:

[0083] In the RGB color space, select a first preset number of arbitrary color coordinates as clustering reference points;

[0084] Calculate the distance between the color coordinates of each pixel in the target environment image and each cluster reference point. Determine the cluster reference point with the smallest distance as the cluster reference point for the corresponding pixel in the target environment image. Then, determine all pixels in the target environment image that correspond to the same cluster reference point as an environment cluster block.

[0085] Based on the color coordinates of each pixel in each environment clustering block, determine the cluster center of the corresponding environment clustering block;

[0086] Using the cluster center as a new clustering reference point, repeat the above steps until the determined cluster center meets the preset convergence condition, and then output the final environment clustering block and cluster center results.

[0087] Obtain the color value of the cluster center of each environment cluster block as the color value of the corresponding environment cluster block.

[0088] In one specific embodiment, determining the cluster center of the corresponding environment cluster block based on the color coordinates of each pixel in each environment cluster block specifically includes:

[0089] The average color coordinates of all pixels in each of the environmental cluster blocks are calculated to obtain the cluster center of each environmental cluster block.

[0090] In one specific embodiment, the aforementioned preset convergence condition includes: the difference between the first cumulative distances of the cluster centers obtained from two adjacent calculations is less than a preset distance threshold; wherein, the first cumulative distance is obtained by accumulating the distances from the color coordinates of each pixel in each environmental cluster block to the corresponding cluster center.

[0091] The preset color clustering algorithm described in this embodiment of the invention can be a clustering algorithm capable of color quantization, thereby compressing the number of image colors in the RGB color space. The following is a detailed explanation of the color clustering algorithm described in this invention through a specific example:

[0092] Assuming that the preset color clustering algorithm is the k-means color clustering algorithm, in the RGB color space, when calculating the color value difference (the alpha channel is fixed at 0xff, i.e., opaque), this process uses Euclidean distance to describe the color distance between pixel c1 and pixel c2. The specific calculation method is as follows: (1)

[0093]

[0094] Where D(c1,c2) ​​represents the color distance between pixel c1 and pixel c2, R1, G1, and B1 represent the three color coefficients of the color coordinates of pixel c1, and R2, G2, and B2 represent the three color coefficients of the color coordinates of pixel c2.

[0095] The first preset quantity mentioned above is the number of color aggregates to be extracted. For ease of explanation, the first preset quantity is set to 5 in this example, so the color palette composed of these 5 colors can be considered to represent the color theme of the target environment image.

[0096] Based on the above settings, the specific process of determining the color values ​​of a first preset number of environment cluster blocks and the weights of each environment cluster block in the target environment image according to a preset color clustering algorithm includes:

[0097] Five aggregation reference points N1, N2, ..., N5 are randomly selected from all RGB pixels of the target environment image;

[0098] According to the above formula (1), calculate the color distance D[k] between each pixel in the target environment image and each aggregation reference point N1 to N5, where k is a positive integer ≤5. Select the minimum value min(D[k]) and assign this pixel to the environment clustering block Cluster(x) represented by the aggregation reference point Nx that makes this minimum value true.

[0099] After calculating all pixels in sequence, the target environment image is divided into 5 environment clusters.

[0100] For each partitioned environment cluster, the average color coordinates of all pixels in each environment cluster are calculated based on the following formula (2) to obtain the cluster center Nk' of the corresponding environment cluster, and this is used as the new cluster reference point. Then, the new cluster reference point Nk' minimizes the sum of the RGB Euclidean distances between all pixels inside the environment cluster and this point.

[0101]

[0102] Where N'(R,G,B) represents the average of the color coordinates of all pixels in the environment cluster block, len represents the total number of pixels in the environment cluster block, Pi(R,G,B) represents the color coordinates of the pixels in the environment cluster block, i is a positive integer, and 0 < i ≤ len;

[0103] Calculate the distance from the color coordinates of each pixel in the 5 environmental clustering blocks to the corresponding cluster center Nk' and sum them to obtain the sum of the Euclidean distances S(i) between the entire image pixels and their respective cluster centers Nk';

[0104] Repeat the above calculation to obtain new environmental cluster blocks and their cluster centers, and calculate the sum of Euclidean distances S(i+1) between the new whole image pixels and the reference points Nk' of each cluster.

[0105] Calculate the difference between S(i+1) and s(i). If this difference no longer converges or is less than the preset distance threshold Cap, then save the color value of the cluster center of the last 5 environmental cluster blocks as the color value of these 5 environmental cluster blocks.

[0106] The weights of the five environment clusters are obtained by determining the proportion of the number of pixels in each of the five environment clusters to the total number of pixels in the target environment image.

[0107] In this embodiment of the invention, the above-mentioned whole image pixels refer to all pixels in the target environment image.

[0108] In this embodiment of the invention, in order to facilitate the identification of the color value and weight of each environmental cluster block, a corresponding information table of color value and weight of each environmental cluster block can be established, so as to obtain the color value and weight of each environmental cluster block of the target environmental image by looking up the table.

[0109] In one embodiment, the step S102 described above, which involves obtaining the color values ​​of a first preset number of theme cluster blocks for each preset theme image determined by a preset color clustering algorithm and the weights of each theme cluster block, specifically includes:

[0110] For each preset theme image in the preset theme library, obtain the color value of each pixel in the preset theme image in the preset color space;

[0111] For each preset theme image, based on the color value of each pixel of the preset theme image in the preset color space, according to the preset color clustering algorithm, each pixel in the preset theme image is clustered into a first preset number of theme clustering blocks to obtain the color value of each theme clustering block; wherein, the color value of each theme clustering block is represented by the color value of the cluster center of the theme clustering block;

[0112] The weight of each environment cluster is obtained based on the proportion of pixels in each theme cluster block in the preset theme image.

[0113] In this embodiment of the invention, the proportion of the number of pixels in each theme cluster block to the total number of pixels in the preset theme image is the ratio of the number of pixels in each theme cluster block to the total number of pixels in the preset theme image.

[0114] Based on the description in the above embodiments, the preset color space can be the RGB color space. Accordingly, the above-mentioned acquisition of the color value of each pixel on each preset theme image in the preset color space specifically includes:

[0115] Obtain the color coordinates of each pixel in the RGB color space for each preset theme image.

[0116] In this embodiment of the invention, based on the color values ​​of each pixel of the preset theme image in the preset color space, and according to the preset color clustering algorithm, each pixel in the theme image is clustered into a first preset number of theme clustering blocks to obtain the color value of each theme clustering block, including:

[0117] In the RGB color space, select a first preset number of arbitrary color coordinates as clustering reference points;

[0118] Calculate the distance between the color coordinates of each pixel in the preset theme image and each clustering reference point. Determine the clustering reference point with the smallest distance as the clustering reference point for the corresponding pixel in the preset theme image. Then, determine all pixels in the preset theme image that correspond to the same clustering reference point as an environment clustering block.

[0119] Based on the color coordinates of each pixel in each environment clustering block, determine the cluster center of the corresponding environment clustering block;

[0120] Using the cluster center as a new clustering reference point, repeat the above steps until the determined cluster center meets the preset convergence condition, and then output the final topic clustering block and cluster center results.

[0121] Obtain the color value of the cluster center of each topic cluster block as the color value of the corresponding topic cluster block.

[0122] In one specific embodiment, determining the cluster center of the corresponding environment cluster block based on the color coordinates of each pixel in each topic cluster block specifically includes:

[0123] The average color coordinates of all pixels in each environment cluster block are calculated to obtain the cluster center of each environment cluster block.

[0124] In one specific embodiment, the aforementioned preset convergence condition includes: the difference between the first cumulative distances of the cluster centers obtained from two adjacent calculations is less than a preset distance threshold; wherein, the first cumulative distance is obtained by accumulating the distances from the color coordinates of each pixel in each topic cluster block to the corresponding cluster center.

[0125] In this embodiment of the invention, the process of determining the color value of each theme cluster block and the weight of each theme cluster block in the preset theme image of each theme can refer to the above detailed description of obtaining the color value of each environment cluster block and the weight of each environment cluster block in the target environment image, and will not be repeated here.

[0126] In this embodiment of the invention, the aforementioned preset theme image is the theme image corresponding to a theme in the preset theme library.

[0127] In this embodiment of the invention, before executing the topic recommendation method, based on the above-described implementation of determining the color values ​​of a first preset number of topic cluster blocks for each preset topic image and the weights of each topic cluster block, the color values ​​of a first preset number of topic cluster blocks for each preset topic image in the preset topic library and the weights of each topic cluster block can be obtained in advance and stored in a preset database. Thus, during the execution of the topic recommendation method, the color values ​​of the first preset number of topic cluster blocks for each preset topic image corresponding to each topic can be directly obtained from the preset topic library. Alternatively, during the execution of the topic recommendation method, the color values ​​of the first preset number of topic cluster blocks for each topic image can be calculated in real-time based on the above-described preset color clustering algorithm.

[0128] In one embodiment, the determination of the overall color difference value between the target environment image and each preset theme image based on the color values ​​and weights of each environment cluster block of the target environment image and the color values ​​and weights of each theme cluster block of each preset theme image, as described in step S103 above, specifically includes:

[0129] According to a preset order, each environmental cluster block in the target environment image is sorted to obtain a first list, and each theme cluster block in each preset theme image is sorted to obtain a second list; the preset order is either in descending order of weight or in ascending order of weight.

[0130] Get the difference in color value of the clustering block corresponding to each row of the first list and the second list, as well as the weight of the environment clustering block in each row;

[0131] The weighted color difference value corresponding to each environmental cluster block in the target environment image is obtained by multiplying the difference of each row by the weight of the environmental cluster block in that row.

[0132] The weighted color difference values ​​corresponding to each environmental cluster block in the target environment image are summed to obtain the overall color difference value between the target environment image and the preset theme image.

[0133] As a specific implementation of this invention, the overall color difference value between the target environment image and any preset theme image can be obtained in the following manner:

[0134] For each preset theme image:

[0135] The first list is obtained by sorting the environmental clusters in the target environment image according to the order of their weights from largest to smallest.

[0136] The second list is obtained by sorting the theme clusters of the preset theme image in descending order of their weights.

[0137] Obtain the color value of the environment clustering block in each row of the first list and the color value of the topic clustering block in each row of the second list, calculate the difference between the color values ​​of each row of the first list and the second list, and obtain the weight of the environment clustering block in each row.

[0138] Multiply the difference between each row in the first list and the second list above by the weight of the environmental clustering block in that row to obtain the weighted color difference value corresponding to each environmental clustering block in the target environment image;

[0139] The weighted color difference values ​​corresponding to each environmental cluster block in the target environment image are summed to obtain the overall color difference value between the target environment image and the preset theme image.

[0140] Of course, in this embodiment of the invention, when obtaining the first list, the environmental clusters in the target environment image can also be sorted in ascending order of weight. Similarly, when obtaining the second list, the theme clusters in the preset theme image should also be sorted in ascending order of weight. After obtaining the first and second lists in ascending order of weight, the subsequent steps for determining the overall color difference value between the target environment image and the preset theme image are similar to the steps performed after obtaining the first and second lists in ascending order of weight, and will not be repeated here.

[0141] In one example, assuming the first preset quantity is 5, then both the first list and the second list have 5 rows. The specific process of obtaining the color value of the environment cluster block in each row of the first list and the color value of the topic cluster block in each row of the second list, and calculating the difference between the color values ​​of each row of the first list and the second list, is as follows:

[0142] According to the sorting order of each cluster block in the first list and the second list, obtain the two color values ​​of the first row of the first list and the second list, that is, the color value of the environmental cluster block with the largest weight of the target environment image and the color value of the theme cluster block with the largest weight of the preset theme image. Calculate the difference between the two according to the above formula (1); then, obtain the two color values ​​of the second row of the first list and the second list, that is, the color value of the environmental cluster block with the second largest weight of the target environment image and the color value of the theme cluster block with the second largest weight of the preset theme image. Calculate the difference between the two according to the above formula (1); ... calculate in sequence until the two color values ​​of the fifth row of the first list and the second list are obtained, that is, the color value of the environmental cluster block with the fifth largest weight of the target environment image and the color value of the environmental cluster block with the fifth largest weight of the preset theme image. Calculate the difference between the two according to the above formula (1), and finally obtain the difference between the color values ​​of the corresponding cluster blocks in the fifth row of the first list and the second list.

[0143] After obtaining the color difference of the five rows of corresponding cluster blocks in the first and second lists based on the above process, the weight of each environmental cluster block in the first list is multiplied and weighted according to the difference of the color value of the corresponding cluster block in the same row, so as to obtain the weighted color difference value corresponding to each environmental cluster block of the target environment image.

[0144] Finally, the weighted color difference values ​​corresponding to each environmental cluster block of the target environment image are summed to obtain the overall color difference value between the target environment image and the preset theme image.

[0145] In this embodiment of the invention, this overall color difference value can be used as an indicator of the color theme difference between two images.

[0146] In this embodiment of the invention, after obtaining the overall color difference value between the target environment image and each preset theme image, the theme image with the smallest color theme difference index with the target environment image is selected, that is, the preset theme image corresponding to the smallest overall color difference value, and the theme matched by the preset theme image is determined as the recommended theme and returned to the smart terminal.

[0147] In one embodiment, to make the brightness of the recommended theme obtained by the smart terminal more consistent with the ambient brightness, refer to Figure 2 As shown, the recommended backlight brightness can also be obtained through the following methods:

[0148] S201: Obtain the ambient target brightness corresponding to the target environment image;

[0149] S202: Based on the preset correspondence between ambient brightness and backlight brightness, the backlight brightness corresponding to the ambient target brightness is determined as the recommended backlight brightness; the ambient target brightness is the brightness of the target area captured when the target environment image is captured.

[0150] In one specific embodiment, the ambient target brightness is the ambient brightness measured by the light sensor attached to the camera.

[0151] In this embodiment of the invention, the aforementioned preset correspondence between ambient brightness and backlight brightness can be set as a curve showing the correspondence between ambient brightness values ​​and backlight brightness. Based on this curve, the backlight brightness corresponding to the target ambient brightness is obtained. The curve can be a curve showing the correspondence between ambient brightness and backlight brightness values ​​obtained in advance through experiments.

[0152] In one specific embodiment, refer to Figure 3 As shown, assuming the smart terminal is a smart TV device, and this smart TV device is equipped with a camera and the camera has a light sensor, applying the above-mentioned topic recommendation method to this smart TV device, the process of implementing topic recommendation for the smart TV device can specifically include:

[0153] Preparation process of preset image database: When the smart TV device is powered on, the camera parameters are initialized, the camera preview is turned on, the preview image is stored, and the environmental image of the area covered by the camera and the corresponding environmental target brightness are obtained. Based on this image acquisition process, the latest acquired environmental image is updated to the preset environmental image of the corresponding time period in the preset image database, and the environmental target brightness of each preset environmental image is stored in the preset image database.

[0154] When a smart TV receives a theme recommendation instruction, it retrieves the target environment image and target ambient brightness corresponding to the current time period from the preset image database.

[0155] The smart TV device determines the color values ​​of a first preset number of environmental cluster blocks and the weight of each environmental cluster block in the target environment image; and sends the color values ​​of the first preset number of environmental cluster blocks and the weight of each environmental cluster block in the target environment image to the server.

[0156] Furthermore, the smart TV device determines the backlight brightness corresponding to the ambient target brightness according to the above steps S201 and S202;

[0157] The server obtains the recommended topic according to steps S101 to S104 above, and returns the recommended topic to the smart TV device.

[0158] Finally, the smart TV device sets the theme application recommendation settings based on the received recommended theme and the obtained backlight brightness, and displays the relevant interface of the recommended theme under the backlight brightness conditions, including the shape, color and icon style of the preset theme image of the recommended theme.

[0159] The theme recommendation method provided in this invention compares the target environment image sent by the smart terminal with a preset theme image to obtain the theme with the smallest color difference from the environment. During color comparison, the overall color difference value between the target environment image and the preset theme image is determined based on the color and weight of the same number of clustered blocks. This yields the preset theme image whose color is closest to the target environment image. This avoids the loss of image color information during image information processing, resulting in a more accurate overall color difference value between the target environment image and the preset theme image, thus ensuring that the recommended theme is color-appropriate to the target environment image. For displays of electronic devices with relatively fixed placement, the recommended theme obtained through comparison can usually adapt to the current placement environment of the electronic device. Furthermore, this invention can provide different recommended themes at different times of the day based on the environmental changes of the device, making the themes provided at each time period more consistent with the lighting characteristics of the daily environment. This achieves intelligent recommendation of display themes based on environmental changes. Themes adapted to the usage environment help improve the user experience, providing users with a more accurate and convenient way to set themes, thus enhancing the user experience.

[0160] Example 2

[0161] Based on the same inventive concept, this invention also provides a topic recommendation method, applied to smart terminals, see below. Figure 4 As shown, the topic recommendation method includes the following steps:

[0162] S401: Obtain the target environment image corresponding to the current time period;

[0163] S402: Based on a preset color clustering algorithm, determine the color values ​​of a first preset number of environment clustering blocks in the target environment image and the weight of each environment clustering block, and send them to the server.

[0164] S403: Receive the recommended topics returned by the server.

[0165] The smart terminal described in this embodiment of the invention can be a smart device equipped with a smart operating system such as Android. After installation, it is usually placed in a fixed location and rarely moves. Examples include smart TVs, desktop computers, and smart terminals built into vehicles. This smart terminal has a display screen, enabling it to display recommended themes. As a terminal device that directly interacts with the user, the desktop (launcher) color tone, style, and detailed adjustment of the image quality of its display screen are important factors directly affecting the user experience. Based on this, the theme recommendation method provided in this embodiment of the invention uses a target environment image sent by the smart terminal to identify the placement environment matched by the smart terminal in the current time period, including data such as the brightness and color tone of the environment. Based on this target environment image, the theme matching the theme image with the overall color difference closest to the target environment image is determined as the recommended theme. The resulting recommended theme makes the desktop color tone, screen backlight, and image quality of the display screen more in line with the user's visual needs. Compared with the traditional mode that requires the user to manually select and adjust the display theme, this provides a more intelligent and immersive experience for the user.

[0166] In this embodiment of the invention, the step S402 described above, which involves determining the color values ​​of a first preset number of environment clustering blocks and the weights of each environment clustering block in the target environment image according to a preset color clustering algorithm, includes:

[0167] Obtain the color value of each pixel in the target environment image in a preset color space;

[0168] Based on the color values ​​of each pixel in the target environment image in the preset color space, according to the preset color clustering algorithm, each pixel in the target environment image is clustered into a first preset number of environment clustering blocks to obtain the color value of each environment clustering block; wherein, the color value of each environment clustering block is represented by the color value of the cluster center of the environment clustering block.

[0169] The weight of each environment cluster is obtained based on the proportion of pixels in each environment cluster to the total number of pixels in the target environment image.

[0170] In one specific embodiment, the aforementioned preset color space can be the RGB color space. Accordingly, the process of obtaining the color values ​​of each pixel in the target environment image within the preset color space specifically includes:

[0171] Obtain the color coordinates of each pixel in the target environment image in the RGB color space.

[0172] In one specific embodiment, the color values ​​of each pixel in the target environment image in the preset color space are used to cluster each pixel in the target environment image into a first preset number of environment clustering blocks according to the preset color clustering algorithm, thereby obtaining the color value of each environment clustering block. Specifically, this includes:

[0173] In the RGB color space, select a first preset number of arbitrary color coordinates as clustering reference points;

[0174] Calculate the distance between the color coordinates of each pixel in the target environment image and each cluster reference point. Determine the cluster reference point with the smallest distance as the cluster reference point for the corresponding pixel in the target environment image. Then, determine all pixels in the target environment image that correspond to the same cluster reference point as an environment cluster block.

[0175] Based on the color coordinates of each pixel in each environment clustering block, determine the cluster center of the corresponding environment clustering block;

[0176] Using the cluster center as a new clustering reference point, repeat the above steps until the determined cluster center meets the preset convergence condition, and then output the final environment clustering block and cluster center results.

[0177] Obtain the color value of the cluster center of each environment cluster block as the color value of the corresponding environment cluster block.

[0178] In one specific embodiment, determining the cluster center of the corresponding environment cluster block based on the color coordinates of each pixel in each environment cluster block specifically includes:

[0179] The average color coordinates of all pixels in each environment cluster block are calculated to obtain the cluster center of each environment cluster block.

[0180] In one specific embodiment, the aforementioned preset convergence condition includes: the difference between the first cumulative distances of the cluster centers obtained from two adjacent calculations is less than a preset distance threshold; wherein, the first cumulative distance is obtained by accumulating the distances from the color coordinates of each pixel in each environmental cluster block to the corresponding cluster center.

[0181] In this embodiment of the invention, obtaining the target environment image corresponding to the current time period as described in step S401 above includes:

[0182] The target environment image corresponding to the time period of the current time is obtained from the preset image database; the preset image database includes multiple preset environment images corresponding to different time periods, and each preset environment image is an environmental image of the target area collected at a preset historical time.

[0183] In one specific embodiment, the aforementioned preset environment image is obtained in the following way:

[0184] Environmental images of the target area are collected at preset daily intervals at the corresponding preset historical times.

[0185] Based on the time period corresponding to the preset historical time in the predefined clock correspondence, the latest acquired environmental image is updated with the preset environmental image for the corresponding time period.

[0186] The current time period described in this embodiment of the invention refers to the time period to which the current moment belongs. The preset environment images in the preset image database mentioned above can be images of the environment on which the display screen of the smart terminal is placed, pre-captured by a camera integrated into the smart terminal or a camera set near the display screen. Before using the camera to capture images, it can be checked whether the camera is turned on. If so, preset camera parameters are loaded for the camera, including but not limited to: white balance, exposure compensation, brightness, sharpness, contrast, saturation, chroma, and focal length. Backlight compensation is enabled to counteract the influence of front and backlight on image capture, avoiding the problem of images being too dark in some scenes, which reduces the reference value of the captured images. Highlight compensation is also enabled to reduce the impact of local overexposure on the reference value of the image.

[0187] After the camera parameters are initialized, the camera preview is turned on and the preview image is saved to obtain an environmental image of the target area, which is the area covered by the camera.

[0188] In this embodiment of the invention, to obtain multiple preset environmental images corresponding to different time periods, the camera can perform periodic previews, for example, opening a preview every 2 hours to obtain the corresponding preview image, thus updating the environmental image of the target area at fixed time points. Therefore, if the camera remains powered on for 24 hours, it can obtain 12 preview images corresponding to a day, i.e., environmental image images of the target area corresponding to 12 different time periods. Based on this image acquisition process, the latest acquired environmental image is updated to the preset environmental image for the corresponding time period, thereby ensuring that the preset environmental images in the preset image database are always closest to the current environmental data of the smart terminal. When the smart terminal is powered on or woken from standby, the smart terminal obtains a theme recommendation instruction. Based on this instruction, it obtains the target environmental image corresponding to the current time period, thus determining the current time period. The preset environmental image for the corresponding time period is then retrieved from the preset image database as the target environmental image. For example, if the current time is 2 PM, and the preset image data stores preset environmental images corresponding to the time period from 2 PM to 4 PM, then the preset environmental image corresponding to 2 PM to 4 PM is used as the target environmental image for the current time period.

[0189] In one specific embodiment, the target environment image sent by the aforementioned smart terminal can also be an environmental image of the smart terminal's current environment, collected in real time by the smart terminal according to the topic recommendation instruction within the current time period. The specific real-time collection method can be through direct capture by the smart terminal's camera or by images captured and transmitted by a camera located external to the smart terminal. Specific implementation methods can be found in the detailed descriptions in the prior art; however, in this embodiment of the invention, no specific limitations are imposed.

[0190] In one specific embodiment, refer to Figure 3 As shown, assuming the smart terminal is a smart TV device, and assuming the smart TV device is equipped with a camera and the camera has a light sensor, the process by which the smart TV device acquires an image of the target environment corresponding to the current time period can specifically include:

[0191] Preparation process of preset image database: When the smart TV device is powered on, the camera parameters are initialized, the camera preview is turned on, the preview image is stored, and the environmental image of the area covered by the camera and the corresponding environmental target brightness are obtained. Based on this image acquisition process, the latest acquired environmental image is updated to the preset environmental image of the corresponding time period in the preset image database, and the environmental target brightness of each preset environmental image is stored in the preset image database.

[0192] When a smart TV receives a theme recommendation instruction, it retrieves the target environment image corresponding to the current time period from the preset image database.

[0193] The detailed implementation process of steps S401 and S402 in this embodiment of the invention can be referred to the detailed description of the steps in Embodiment 1 regarding the determination of the color values ​​of the first preset number of environmental clustering blocks of the target environment image by the smart terminal and the weight of each environmental clustering block. Since the principle of the problem solved in Embodiment 2 is similar to the topic recommendation method in Embodiment 1, the implementation of Embodiment 2 can refer to the implementation of Embodiment 1, and the repeated parts will not be described again.

[0194] Example 3

[0195] Based on the same inventive concept, this invention also provides a topic recommendation method, applied to a topic recommendation system, with reference to... Figure 5 As shown, the topic recommendation method includes the following steps:

[0196] S501: Obtain the target environment image corresponding to the current time period;

[0197] S502: Based on a preset color clustering algorithm, determine the color values ​​of a first preset number of environment clustering blocks and the weight of each environment clustering block in the target environment image;

[0198] S503: Obtain the color values ​​of the first preset number of theme cluster blocks for each preset theme image and the weight of each theme cluster block, as determined by the preset color clustering algorithm.

[0199] S504: Determine the overall color difference value between the target environment image and each preset theme image based on the color value and weight of each environment cluster block of the target environment image and the color value and weight of each theme cluster block of each preset theme image;

[0200] S505: Determine the theme that matches the preset theme image corresponding to the smallest overall color difference value as the recommended theme.

[0201] In this embodiment of the invention, the topic recommendation system executing this method can be deployed on a smart terminal, a server, or both, through network information interaction between the smart terminal and the server. When applied to the server, the target environment image obtained in step S501 is an environmental image corresponding to the placement environment of the smart terminal. Furthermore, after obtaining the recommended topics according to steps S502-S505, the recommended topics can be sent to the corresponding smart terminal. When applied to both a smart terminal and a server, step S501 can be executed on the smart terminal, and steps S502-505 can be executed on the server; alternatively, steps S501 and S502 can be executed on the smart terminal, while steps S503-505 can be executed on the server.

[0202] The detailed implementation process of steps S501 to S505 in the embodiments of the present invention can be referred to the detailed description of steps S101 to S104 in the first embodiment and steps S401 to S403 in the second embodiment. Since the principle of solving the problem in this third embodiment is similar to the topic recommendation method in the first and second embodiments, the implementation of this third embodiment can refer to the implementation of the first and second embodiments, and the repeated parts will not be described again.

[0203] Example 4

[0204] Based on the same inventive concept, this invention also provides a server-side embodiment, referring to... Figure 6 As shown, the server-side includes:

[0205] The first receiving module 601 is used to receive the color values ​​of a first preset number of environmental clustering blocks and the weights of each environmental clustering block of the target environment image sent by the smart terminal.

[0206] The first color determination module 602 is used to obtain the color values ​​of a first preset number of theme cluster blocks for each preset theme image and the weight of each theme cluster block, which are determined according to a preset color clustering algorithm.

[0207] The first color difference calculation module 603 is used to determine the overall color difference value between the target environment image and each preset theme image based on the color values ​​and weights of each environment cluster block of the target environment image and the color values ​​and weights of each theme cluster block of each preset theme image.

[0208] The theme filtering module 604 is used to determine the theme matched by the preset theme image corresponding to the smallest overall color difference value as the recommended theme, and return it to the smart terminal.

[0209] The specific methods by which each module performs operations in the server-side provided in Embodiment 4 above have been described in detail in the specific embodiments of the topic recommendation method in Embodiment 1 above, and will not be elaborated here.

[0210] Example 5

[0211] Based on the same inventive concept, this invention also provides a smart terminal, referring to... Figure 7 As shown, the smart terminal includes:

[0212] The first image data acquisition module 701 is used to acquire the target environment image corresponding to the current time period;

[0213] The first sending module 702 is used to determine the color values ​​of a first preset number of environment clustering blocks in the target environment image and the weight of each environment clustering block according to a preset color clustering algorithm, and send them to the server.

[0214] The second receiving module 703 is used to receive the recommended topics returned by the server.

[0215] The specific way in which each module performs operations in the smart terminal provided in Embodiment 5 has been described in detail in the specific embodiments of the topic recommendation method in Embodiment 2 above, and will not be elaborated here.

[0216] Example 6

[0217] Based on the same inventive concept, embodiments of the present invention also provide a topic recommendation system, referring to... Figure 8 As shown, this topic recommendation system includes:

[0218] The second image data acquisition module 801 is used to acquire the target environment image corresponding to the current time period;

[0219] The second color determination module 802 is used to determine the color values ​​of a first preset number of environment cluster blocks and the weight of each environment cluster block in the target environment image according to a preset color clustering algorithm.

[0220] The third color determination module 803 is used to obtain the color values ​​of a first preset number of theme cluster blocks for each preset theme image and the weight of each theme cluster block, which are determined according to the preset color clustering algorithm.

[0221] The second color difference calculation module 804 is used to determine the overall color difference value between the target environment image and each preset theme image based on the color value and weight of each environment cluster block of the target environment image and the color value and weight of each theme cluster block of each preset theme image.

[0222] The theme determination module 805 is used to determine the theme that matches the preset theme image corresponding to the smallest overall color difference value as the recommended theme.

[0223] The specific methods by which each module performs operations in the topic recommendation system provided in Embodiment Six above have been described in detail in the specific embodiments of the topic recommendation method in Embodiment Three above, and will not be elaborated here.

[0224] Example 7

[0225] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, characterized in that, when the program is executed by a processor, it implements the topic recommendation method as described in Embodiment 1, Embodiment 2 or Embodiment 3 above.

[0226] Example 8

[0227] Based on the same inventive concept, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the topic recommendation method as described in Embodiment 1, Embodiment 2, or Embodiment 3 above.

[0228] Example 9

[0229] Based on the same inventive concept, embodiments of the present invention also provide a display system, referring to... Figure 9 As shown, the system includes: at least one smart terminal 1 as described in Embodiment Six above and at least one server 2 as described in Embodiment Five above;

[0230] The smart terminal 1 is connected to the server 2 via a network.

[0231] The specific methods of the smart terminal 1 and the server 2 in Embodiment 9 have been described in detail in the embodiments of the topic recommendation methods and related devices and systems in Embodiments 1 to 6 above, and will not be elaborated here.

[0232] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0233] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0234] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0235] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0236] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A topic recommendation method, applied on the server side, characterized in that, include: The system receives the color values ​​of a first preset number of environmental cluster blocks and the weights of each environmental cluster block from a target environment image sent by a smart terminal, wherein the target environment image corresponds to the current time period. For each preset theme image in the preset theme library, obtain the color value of each pixel in the preset theme image in the preset color space; For each of the aforementioned preset theme images: select a first preset number of arbitrary color coordinates in the preset color space as clustering reference points; Calculate the distance between the color coordinates of each pixel in the preset theme image and each clustering reference point. Determine the clustering reference point with the smallest distance as the clustering reference point for the corresponding pixel in the preset theme image. Then, determine all pixels in the preset theme image that correspond to the same clustering reference point as a theme clustering block. Based on the color coordinates of each pixel in each topic cluster block, determine the cluster center of the corresponding topic cluster block; Using the cluster center as a new clustering reference point, calculate the distance from the color coordinates of each pixel in each topic cluster block to the corresponding cluster center, and sum them to obtain the sum of the Euclidean distances between the entire image pixels and their respective cluster centers; Repeat the above steps to calculate the new topic cluster blocks and their cluster centers, and calculate the sum of the Euclidean distances between the new whole image pixels and their respective cluster centers; The final topic clustering block and clustering center results are output when the difference between the sum of the Euclidean distances between the whole image pixels obtained from two consecutive calculations and the corresponding cluster centers is less than a preset distance threshold. Obtain the color value of the cluster center of each topic cluster block as the color value of the corresponding topic cluster block; The weight of each theme cluster is obtained based on the proportion of the number of pixels in each theme cluster in the preset theme image. According to a preset order, each environmental cluster block in the target environment image is sorted to obtain a first list, and each theme cluster block in each preset theme image is sorted to obtain a second list; the preset order is either in descending order of weight or in ascending order of weight. Get the difference in color value of the clustering block corresponding to each row of the first list and the second list, as well as the weight of the environment clustering block in each row; The weighted color difference value corresponding to each environmental cluster block in the target environment image is obtained by multiplying the difference of each row by the weight of the environmental cluster block in that row. The weighted color difference values ​​corresponding to each environmental cluster block in the target environment image are summed to obtain the overall color difference value between the target environment image and each preset theme image; The theme that matches the preset theme image corresponding to the smallest overall color difference value is determined as the recommended theme, and the result is returned to the smart terminal.

2. A theme recommendation method characterized by comprising: include: Get the target environment image corresponding to the current time period; Based on a preset color clustering algorithm, the color values ​​of a first preset number of environment clustering blocks and the weights of each environment clustering block are determined in the target environment image; For each preset theme image in the preset theme library, obtain the color value of each pixel in the preset theme image in the preset color space; For each of the aforementioned preset theme images: select a first preset number of arbitrary color coordinates in the preset color space as clustering reference points; Calculate the distance between the color coordinates of each pixel in the preset theme image and each clustering reference point. Determine the clustering reference point with the smallest distance as the clustering reference point for the corresponding pixel in the preset theme image. Then, determine all pixels in the preset theme image that correspond to the same clustering reference point as a theme clustering block. Based on the color coordinates of each pixel in each topic cluster block, determine the cluster center of the corresponding topic cluster block; Using the cluster center as a new clustering reference point, calculate the distance from the color coordinates of each pixel in each topic cluster block to the corresponding cluster center, and sum them to obtain the sum of the Euclidean distances between the entire image pixels and their respective cluster centers; Repeat the above steps to calculate the new topic cluster blocks and their cluster centers, and calculate the sum of the Euclidean distances between the new whole image pixels and their respective cluster centers; The final topic clustering block and clustering center results are output when the difference between the sum of the Euclidean distances between the whole image pixels obtained from two consecutive calculations and the corresponding cluster centers is less than a preset distance threshold. Obtain the color value of the cluster center of each topic cluster block as the color value of the corresponding topic cluster block; The weight of each theme cluster is obtained based on the proportion of the number of pixels in each theme cluster in the preset theme image. According to a preset order, each environmental cluster block in the target environment image is sorted to obtain a first list, and each theme cluster block in each preset theme image is sorted to obtain a second list; the preset order is either in descending order of weight or in ascending order of weight. Get the difference in color value of the clustering block corresponding to each row of the first list and the second list, as well as the weight of the environment clustering block in each row; The weighted color difference value corresponding to each environmental cluster block in the target environment image is obtained by multiplying the difference of each row by the weight of the environmental cluster block in that row. The weighted color difference values ​​corresponding to each environmental cluster block in the target environment image are summed to obtain the overall color difference value between the target environment image and each preset theme image; The theme that matches the preset theme image corresponding to the smallest overall color difference value is determined as the recommended theme.

3. A server end, characterized by, include: The first receiving module is used to receive the color values ​​of a first preset number of environmental clustering blocks and the weight of each environmental clustering block of the target environment image sent by the smart terminal, wherein the target environment image corresponds to the current time period; The first color determination module is used to obtain the color value of each pixel in a preset color space for each preset theme image in a preset theme library; for each preset theme image: select a first preset number of arbitrary color coordinates as clustering reference points in the preset color space; calculate the distance between the color coordinates of each pixel in the preset theme image and each clustering reference point, determine the clustering reference point with the smallest distance as the clustering reference point for the corresponding pixel in the preset theme image, and determine all pixels in the preset theme image corresponding to the same clustering reference point as a theme clustering block; determine the cluster center of the corresponding theme clustering block according to the color coordinates of each pixel in each theme clustering block; and use the cluster center as a new clustering block. Using a reference point, calculate the distance from the color coordinates of each pixel in each theme cluster to its corresponding cluster center, and sum these distances to obtain the sum of the Euclidean distances between the entire image pixels and their respective cluster centers. Repeat the above steps to calculate new theme clusters and their cluster centers, and calculate the sum of the Euclidean distances between the entire image pixels and their respective cluster centers. Continue until the difference between the sum of the Euclidean distances between the entire image pixels and their respective cluster centers calculated in two consecutive steps is less than a preset distance threshold, then output the final theme cluster and cluster center results. Obtain the color value of the cluster center of each theme cluster as the color value of the corresponding theme cluster. Based on the proportion of pixels in each theme cluster in the preset theme image, obtain the weight of each theme cluster. The first color difference calculation module is used to sort each environmental cluster block in the target environment image according to a preset order to obtain a first list, and sort each theme cluster block of each preset theme image to obtain a second list; the preset order is either in descending order of weight or in ascending order of weight; the module obtains the color difference of the cluster block corresponding to each row of the first list and the second list, as well as the weight of the environmental cluster block in each row; Multiply the difference in each row by the weight of the environmental cluster block in that row to obtain the weighted color difference value corresponding to each environmental cluster block in the target environment image; sum the weighted color difference values ​​corresponding to each environmental cluster block in the target environment image to obtain the overall color difference value between the target environment image and each preset theme image; The theme filtering module is used to determine the theme that matches the preset theme image corresponding to the smallest overall color difference value as the recommended theme, and return it to the smart terminal.

4. A theme recommendation system characterized by, include: The second image data acquisition module is used to acquire target environment images corresponding to the current time period; The second color determination module is used to determine the color values ​​of a first preset number of environment cluster blocks and the weight of each environment cluster block in the target environment image according to a preset color clustering algorithm. The third color determination module is used to obtain the color values ​​of each pixel in a preset color space for each preset theme image in a preset theme library; for each preset theme image: select a first preset number of arbitrary color coordinates as clustering reference points in the preset color space; calculate the distance between the color coordinates of each pixel in the preset theme image and each clustering reference point, determine the clustering reference point with the smallest distance as the clustering reference point for the corresponding pixel in the preset theme image, and determine all pixels in the preset theme image corresponding to the same clustering reference point as a theme clustering block; determine the cluster center of the corresponding theme clustering block according to the color coordinates of each pixel in each theme clustering block; and use the cluster center as the new clustering point. Using a reference point, calculate the distance from the color coordinates of each pixel in each theme cluster to its corresponding cluster center, and sum these distances to obtain the sum of the Euclidean distances between the entire image pixels and their respective cluster centers. Repeat the above steps to calculate new theme clusters and their cluster centers, and calculate the sum of the Euclidean distances between the entire image pixels and their respective cluster centers. Continue until the difference between the sum of the Euclidean distances between the entire image pixels and their respective cluster centers calculated in two consecutive steps is less than a preset distance threshold, then output the final theme cluster and cluster center results. Obtain the color value of the cluster center of each theme cluster as the color value of the corresponding theme cluster. Based on the proportion of pixels in each theme cluster in the preset theme image, obtain the weight of each theme cluster. The second color difference calculation module is used to sort each environmental cluster block in the target environment image to obtain a first list according to a preset order, and sort each theme cluster block of each preset theme image to obtain a second list; the preset order is either in descending order of weight or in ascending order of weight; the module obtains the color difference of the cluster block corresponding to each row of the first list and the second list, as well as the weight of the environmental cluster block in each row; Multiply the difference in each row by the weight of the environmental cluster block in that row to obtain the weighted color difference value corresponding to each environmental cluster block in the target environment image; sum the weighted color difference values ​​corresponding to each environmental cluster block in the target environment image to obtain the overall color difference value between the target environment image and each preset theme image; The theme determination module is used to determine the theme that matches the preset theme image corresponding to the smallest overall color difference value as the recommended theme.

5. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the program is executed by the processor, it implements the topic recommendation method as described in claim 1, or the topic recommendation method as described in claim 2.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the topic recommendation method of claim 1, or the topic recommendation method of claim 2.