Information generation method and device, equipment, medium and program product
The information generation method objectively evaluates color matching in digital layouts by quantifying hue and brightness contrast, addressing inaccuracies in manual reviews and enhancing efficiency and accuracy in digital layout assessment.
Patent Information
- Application Number
- CN202411279667.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-13
AI Technical Summary
Manual color matching review of digital layouts is prone to inaccuracies due to subjective factors, leading to inconsistent and time-consuming evaluation results, which affects the efficiency and quality of digital layout publication.
An information generation method and device that quantifies color relationships using hue and brightness contrast values to objectively evaluate color matching in digital layouts, incorporating automated image processing and semantic recognition to determine a target evaluation value.
The method provides accurate and efficient color matching evaluation, reducing subjectivity and improving review efficiency by objectively assessing color coordination and harmony in digital layouts.
Smart Images

Figure CN119131200A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to an information generation method, device, equipment, medium and program product. Background Art
[0002] Digital layout refers to the overall product of arranging the text, images and other elements of various manuscripts according to certain rules on electronic media (such as computers, tablets, smart phones, etc.), and is the external manifestation of media content. Layout design refers to the reasonable arrangement of graphic content in a specific space according to preset specifications and aesthetic principles to achieve effective information transmission and visual beauty. In layout design, the use of color matching can enhance the visual beauty of the layout.
[0003] In the related art, the color matching of digital pages can be manually reviewed. However, the above method is easily affected by personal subjective factors, resulting in inaccurate review results, which in turn affects the publication of digital pages. Summary of the invention
[0004] The embodiments of the present application provide an information generation method, device, equipment, medium and program product that can effectively improve the problem of inaccurate color matching review of digital layouts performed manually.
[0005] In a first aspect, an embodiment of the present application provides an information generation method, the method comprising:
[0006] Acquire the layout color tone information of the digital layout, where the layout color tone information is used to indicate the color state of the layout content on the digital layout, and the layout color tone information corresponds to at least two colors;
[0007] Generate a reference main color tone of the digital layout according to the layout content of the digital layout;
[0008] Determine a first evaluation value according to the position information of the main color corresponding to the reference main color and at least two colors on the color spectrum, the first evaluation value being used to characterize the degree of hue difference between the main color corresponding to the reference main color and at least two colors corresponding to the layout color information;
[0009] According to the first evaluation value and the second evaluation value, a target evaluation value corresponding to the digital layout is determined, the second evaluation value is determined based on a target color relationship corresponding to at least two colors, the target color relationship is determined based on the color value of each color in the at least two colors, and the purity contrast value and brightness contrast value between each two colors in the at least two colors, the second evaluation value is used to characterize the degree of color coordination of the at least two colors, and the target evaluation value is used to characterize the degree of color matching of the digital layout.
[0010] In a second aspect, an embodiment of the present application provides an information generating device, the information generating device comprising:
[0011] A first acquisition module is used to acquire layout color tone information of a digital layout, where the layout color tone information is used to indicate the color state of layout content on the digital layout, and the layout color tone information corresponds to at least two colors;
[0012] A first generating module is used to generate a reference main color tone of the digital layout according to the layout content of the digital layout;
[0013] A first determination module, for determining a first evaluation value according to position information of a main color corresponding to a reference main color and at least two colors on a color spectrum, the first evaluation value being used to characterize a degree of hue difference between a main color corresponding to the reference main color and at least two colors corresponding to the layout color information;
[0014] The second determination module is used to determine a target evaluation value corresponding to the digital layout based on the first evaluation value and the second evaluation value, the second evaluation value is determined based on a target color relationship corresponding to at least two colors, the target color relationship is determined based on the color value of each color in the at least two colors, and the purity contrast value and brightness contrast value between each two colors in the at least two colors, the second evaluation value is used to characterize the color coordination degree of the at least two colors, and the target evaluation value is used to characterize the color matching degree of the digital layout.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, an information generation method as described in any one of the first aspects is implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, an information generation method as described in any one of the first aspects is implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, an information generation method as described in any one of the first aspects is implemented.
[0018] The information generation method, device, equipment, storage medium and program product of the embodiment of the present application can generate a reference main color tone through the layout content of the digital layout. Then, based on the position information of the main color corresponding to the reference main color tone and at least two colors corresponding to the layout color tone information on the color spectrum, a first evaluation value that can characterize the degree of hue difference between the main color and at least two colors corresponding to the layout color tone information is determined, so as to quantify the evaluation of at least two colors of the layout color tone information into a specific first evaluation value through the color spectrum. Subsequently, the target color relationship of the digital layout is determined according to the purity contrast value and the brightness contrast value between each two colors in the at least two colors, and further, the second evaluation value of the digital layout is determined according to the target color relationship. Among them, purity and brightness directly affect the expressiveness of color, the purity contrast value reflects the difference in color vividness, and the brightness contrast value reflects the difference in color brightness. By quantifying the color relationship corresponding to the color value, purity contrast value and brightness contrast value into a second evaluation value, it is helpful to objectively and accurately evaluate the pros and cons of the color relationship in the digital layout. Then, the target evaluation value determined by the first evaluation value and the second evaluation value is used to comprehensively evaluate the degree of color matching of the digital layout from the two dimensions of color and color relationship, which can objectively reflect the actual effect of the color matching of the digital layout and effectively avoid the uncertainty of the evaluation of the color matching of the digital layout caused by subjective factors of manual review. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 A schematic diagram showing a flow chart of an information generation method provided by some embodiments of the present application;
[0021] Figure 2 A schematic flow chart of a method for generating layout tone information according to a digital layout in an information generating method provided in some embodiments of the present application is shown;
[0022] Figure 3 A flowchart showing a specific implementation of step 230 provided in some embodiments of the present application is shown;
[0023] Figure 4 A flowchart showing a specific implementation of step 120 provided in some embodiments of the present application is shown;
[0024] Figure 5 A flowchart showing a specific implementation of step 130 provided in some embodiments of the present application is shown;
[0025] Figure 6 A flowchart showing a specific implementation of step 130 provided in other embodiments of the present application is shown;
[0026] Figure 7 A schematic diagram showing a flow chart of a method for determining a second evaluation value provided in some embodiments of the present application;
[0027] Figure 8 A flowchart showing a specific implementation of step 140 provided in another embodiment of the present application is shown;
[0028] Fig. 9 A schematic diagram showing the structure of an information generating device provided in some embodiments of the present application is shown;
[0029] Fig.10 A schematic diagram of the structure of an electronic device provided in some embodiments of the present application is shown. DETAILED DESCRIPTION
[0030] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0031] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0032] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0033] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0034] Before explaining the technical solutions provided by the embodiments of the present application, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the relevant technologies involved in the present application.
[0035] Digital newspapers refer to newspaper content published using digital technology and Internet platforms, usually presented in electronic form, including but not limited to web version, APP (Application) version, PDF (Portable Document Format) version, etc., which can be read across devices and platforms.
[0036] Digital layout is the specific form of digital newspapers, including the layout and arrangement of multiple elements such as text, pictures, videos, and audio in digital space. Layout design is the core link in digital layout production, involving content layout, element arrangement, font selection, color matching and other aspects. Color matching refers to the colors used in digital layout and the processing of their relationship. Reasonable color matching can create a specific atmosphere, enhance the visual appeal and beauty of the layout, and also help express the theme emotions and enhance the reader's reading experience.
[0037] The color matching of digital layouts directly affects the visual effects and user experience. Therefore, in related technologies, after the digital layout is completed, the color matching of the digital layout is usually reviewed manually to ensure the rationality, coordination and aesthetics of the color matching. However, manual review depends on the aesthetic standards of the reviewers, and different reviewers may have different subjective evaluations of the color matching, resulting in differences in the review results. In addition, when faced with the review of a large number of digital layouts, the manual review method is not only time-consuming, but also prone to inconsistency in the review results due to subjective factors, reducing the review efficiency.
[0038] In order to solve the problems in the related art, the embodiments of the present application provide an information generation method, apparatus, device, medium and program product.
[0039] The following is combined with Figure 1 To Attachment Figure 8 , the information generation method provided in the embodiment of the present application is described in detail through specific embodiments and their application scenarios.
[0040] Figure 1 FIG. 1 is a flow chart showing a method for generating information provided by some embodiments of the present application. Figure 1 As shown, the information generating method may include steps 110 to S140.
[0041] Step 110, obtaining the layout color tone information of the digital layout, the layout color tone information is used to indicate the color state of the layout content on the digital layout, and the layout color tone information corresponds to at least two colors.
[0042] Step 120, generating a reference main color tone of the digital layout according to the layout content of the digital layout.
[0043] Step 130, determining a first evaluation value based on the position information of the main color corresponding to the reference main color and at least two colors on the color spectrum, wherein the first evaluation value is used to characterize the degree of hue difference between the main color corresponding to the reference main color and at least two colors corresponding to the layout color information.
[0044] Step 140, based on the first evaluation value and the second evaluation value, determine the target evaluation value corresponding to the digital layout, the second evaluation value is determined based on the target color relationship corresponding to at least two colors, the target color relationship is determined based on the color value of each color in the at least two colors, the purity contrast value and the brightness contrast value between each two colors in the at least two colors, the second evaluation value is used to characterize the color coordination degree of the at least two colors, and the target evaluation value is used to characterize the color matching degree of the digital layout.
[0045] Thus, a reference main color tone is generated through the layout content of the digital layout. Then, based on the position information of the main color corresponding to the reference main color tone and at least two colors corresponding to the layout color tone information on the color spectrum, a first evaluation value that can characterize the degree of hue difference between the main color and at least two colors corresponding to the layout color tone information is determined, so as to quantify the evaluation of at least two colors of the layout color tone information into a specific first evaluation value through the color spectrum. Subsequently, the target color relationship of the digital layout is determined according to the purity contrast value and the brightness contrast value between each two colors of the at least two colors, and further, the second evaluation value of the digital layout is determined according to the target color relationship. Among them, purity and brightness directly affect the expressiveness of color, the purity contrast value reflects the difference in color vividness, and the brightness contrast value reflects the difference in color brightness. By quantifying the color relationship corresponding to the color value, purity contrast value and brightness contrast value into a second evaluation value, it is helpful to objectively and accurately evaluate the pros and cons of the color relationship in the digital layout. The target evaluation value determined by the first evaluation value and the second evaluation value comprehensively evaluates the degree of color matching of the digital layout from the two dimensions of color and color relationship. It can objectively reflect the actual effect of the color matching of the digital layout, and effectively avoid the uncertainty of the evaluation of the color matching of the digital layout caused by subjective factors of manual review.
[0046] In particular, when faced with a large number of digital layout review tasks, the traditional manual review method is not only slow, but also prone to review delays and increased error rates due to fatigue. The method provided by the embodiment of the present application can realize the automated review of the color matching of the digital layout, which not only reduces labor costs, but also greatly improves the efficiency and accuracy of the digital layout review, effectively reducing the impact of inaccurate or slow digital layout review results on the publication of the digital layout.
[0047] The above steps are described in detail below, as shown below.
[0048] First, step 110 is involved. In some embodiments of the present application, the layout tone information refers to the colors and their combinations used in the layout design of the digital layout, and how these colors affect the visual effects and the information conveyed. Therefore, before step 110, in order to obtain the layout tone information that contributes to the digital layout review, the step of generating the layout tone information of the digital layout according to the digital layout may also be included, that is, before step 110, as Figure 2 As shown, the information generating method may further include steps 210 to 240.
[0049] Step 210, performing image processing on the digital layout to obtain a recognition result, wherein the recognition result includes at least two initial colors and a distribution area of each of the at least two initial colors on the digital layout.
[0050] Exemplarily, performing image processing on a digital page may specifically include the following steps:
[0051] Image preprocessing: adjusting the image size and resolution of the image corresponding to the digital layout, and removing noise to obtain a preprocessed image;
[0052] Color space conversion: convert the preprocessed image from RGB color space to HSV space to obtain the converted image. RGB color space is a color space based on the human eye's color perception characteristics. Various colors are formed by mixing the three primary colors of red, green, and blue. Hue (H) represents the basic attributes of color, such as red, green, or blue; saturation (S) represents the purity or intensity of the color; and value (V) represents the brightness of the color.
[0053] Image segmentation, using threshold segmentation or color clustering algorithms (such as K-means clustering) to segment the converted image into multiple color regions. Specifically, threshold segmentation distinguishes different colors by setting color thresholds, while color clustering groups pixels according to color similarity;
[0054] The attribute calculation of the color region is to calculate the area, shape (such as aspect ratio, circularity, etc.), position (such as center coordinates, bounding box, etc.) and main color of each color region among multiple color regions.
[0055] Step 220, obtaining the proportion of each initial color according to the proportion of the distribution area of each initial color in the digital layout to the total area of the digital layout.
[0056] Exemplarily, for each initial color, the area of the color area corresponding to the initial color is divided by the total area of the digital layout to obtain the proportion of the initial color. Specifically, the proportion is a value between 0 and 1, indicating the proportion of the initial color in the digital layout.
[0057] Step 230 , selecting a target color of the layout content in the digital layout from at least two initial colors according to the proportion of each initial color.
[0058] Exemplarily, the target color refers to one or more colors that dominate the layout content and have a significant impact on the layout visual effect or information transmission.
[0059] Step 240, generating layout color tone information of the digital layout according to the target color and the distribution area of the target color in the digital layout, wherein the target color includes at least two colors.
[0060] In an embodiment of the present application, by screening a specific initial color from at least two initial colors as the target color of the digital layout based on the proportion of each of the at least two initial colors, it is possible to ensure that the selected target color dominates the overall color of the digital layout, so that the evaluation of the digital layout focuses on the application effects of colors that contribute more to the digital layout, avoiding the evaluation dispersion caused by the large number of colors in the digital layout, thereby improving the accuracy of determining the first evaluation value based on the target color.
[0061] In some embodiments of the present application, Figure 3 As shown, the above step 230 may specifically include steps 231 to 232.
[0062] Step 231 , sorting the proportions of at least two initial colors in descending order of proportions, to obtain a sorting sequence of at least two initial colors.
[0063] For example, the sorting sequence refers to a sequence obtained by sorting the proportions of a group of initial colors according to a certain rule (such as proportion from high to low). The sorting sequence helps the reviewer to clearly see the importance ranking of each initial color in the layout, so that it is easier to select the target color.
[0064] Step 232, selecting target colors of the digital layout from the sorting sequence, the order of the target colors in the sorting sequence meets a preset condition.
[0065] For example, the preset conditions refer to the rules or standards set in advance during the screening or selection process. These preset conditions can be based on the number of colors (such as selecting the top N initial colors with the highest proportion), a threshold of the color proportion (such as only selecting colors with a proportion exceeding a certain value), or other specific color selection rules.
[0066] In the embodiment of the present application, by quantitatively comparing the proportions of various initial colors in the layout and intuitively displaying their importance through sorting, it is helpful for auditors to effectively identify the dominant colors in the digital layout, that is, the initial colors with a higher proportion. Then, from the sorted color sequence, the target color is screened according to preset conditions. Through this step, it is possible to exclude secondary colors with a lower proportion and less impact on the overall color tone, and focus on analyzing the colors that play a dominant role in the color tone of the digital layout, so as to successfully focus the analysis on the dominant colors of the digital layout, thereby avoiding the interference of secondary colors in the evaluation of color tone matching.
[0067] In some embodiments of the present application, the above-mentioned step 230 may also include filtering the target color from at least two initial colors according to the proportion of the at least two initial colors, and the proportion of the target color is greater than or equal to the preset proportion, so as to obtain the filtering result, i.e., the target color, more quickly and improve the user experience.
[0068] Secondly, step 120 is involved. The layout content refers to the information to be conveyed by the digital layout, which may specifically include the text, images and other elements contained in the digital layout. In order to form an overall visual effect, the layout design of the digital layout should have a unified color tone to enhance the overall sense and consistency of the digital layout. The reference main color tone refers to the color tone that occupies a large proportion in the layout color to form a dominant visual effect. The reference main color tone can be determined by analyzing the information, theme and atmosphere to be conveyed by the layout content. The layout content may include the themes, columns and reporting objectives of each article on the digital layout. For example, if the layout is about natural scenery, the main color tone may tend to natural colors such as green and blue; if the layout is about financial technology, the main color tone may tend to calm and professional colors such as blue and gray. Based on this, if Figure 4 As shown, the above step 120 may specifically include steps 121 to 123.
[0069] Step 121 , performing semantic recognition on the text to obtain a semantic recognition result, and performing image content recognition on the image to obtain an image recognition result.
[0070] For example, semantic recognition refers to the process of in-depth analysis of text content to understand its meaning, intention and context. Specifically, natural language processing technology can be used to identify keywords, topics, sentiment tendencies and other information in the text to generate semantic recognition results.
[0071] Image content recognition is the process of using computer vision technology to identify objects, scenes, people, activities and other information in an image. Specifically, image content can be analyzed and corresponding descriptions or labels can be generated through algorithms such as image segmentation, feature extraction, and object detection.
[0072] Step 122, based on the semantic recognition result and the image recognition result, a target subject category corresponding to the layout content is selected from a plurality of preset subject categories.
[0073] Exemplarily, preset topic categories refer to a series of topic classifications predefined during the design or analysis process. These topic categories may be divided based on various factors such as industry, content type, emotional tendency, style, etc., and are used to classify and summarize the layout content. The target topic category refers to the topic classification that best matches the layout content, which is screened out from the preset topic categories through means such as semantic recognition and image content recognition in a specific situation. By comprehensively analyzing and comparing the semantic recognition results and image recognition results, the theme and atmosphere expressed by the layout content can be determined. Then, the target topic category that best matches the layout content is screened out from the preset topic categories.
[0074] Step 123: based on the preset association relationship between the preset theme category and the color tone, obtain a reference main color tone associated with the target theme category.
[0075] Exemplarily, a preset association relationship refers to a rule or mapping relationship pre-established during the design or analysis process, which is used to associate a specific theme category with a corresponding color tone. This association relationship helps to achieve standardization of layout design evaluation. The reference main color tone refers to the main color tendency of the layout content determined based on the target theme category and the preset association relationship in the layout design. After determining the target theme category, the reference main color tone that best matches the target theme category can be found by querying and matching multiple preset association relationships.
[0076] In the embodiment of the present application, different theme categories usually require different emotional expressions and visual atmospheres, that is, they need different tones to present. In the process of color matching evaluation, the theme category of the digital layout is matched with multiple preset theme categories to obtain the target theme category of the digital layout. Then, through the preset association relationship between the preset theme category and the tones, the reference main color tone associated with the target theme category can be quickly determined as a reference for evaluating the tones of the digital layout, which helps to reduce the interference of human subjective judgment and improves the objectivity and accuracy of the evaluation of the tones of the digital layout.
[0077] Next, referring to step 130 , the color spectrum, the first evaluation value, and determining the first evaluation value according to the position information of the main color and at least two colors on the color spectrum involved in the embodiment of the present application will be specifically described.
[0078] Color spectrum refers to the pattern formed by the distribution of light waves according to wavelength or frequency. Specifically, it can include the hue wheel and the visible spectrum. The hue wheel refers to the arrangement of hues (i.e., the types or names of colors, such as red, yellow, blue, etc.) in a ring according to their natural order in the spectrum. The hue wheel helps us understand and apply the adjacent relationships and contrast relationships between colors. The visible spectrum refers to the spectrum diagram composed of narrow spectral lines in the spectrum. In the visible spectrum, as the wavelength increases, the color gradually transitions from purple to blue, cyan, green, yellow, orange, and finally to red.
[0079] The first evaluation value is a quantitative index used to evaluate the harmony, contrast or other related attributes of the color matching of the main color corresponding to the reference main color and at least two colors corresponding to the layout color information. Specifically, the first evaluation value can be defined according to different color design principles and goals, such as color balance, color contrast, color emotion, etc. Based on this, in some embodiments of the present application, such as Figure 5 As shown, the above step 130 may specifically include steps 131a to 134a.
[0080] Step 131a, based on the main color corresponding to the reference main color and at least two colors, construct at least two color pairs, the at least two color pairs include the main color and a color pair constructed by each of the at least two colors. If the main color corresponding to the reference main color is red (the angle on the hue wheel is 0°), and the at least two colors corresponding to the layout color information are green (the angle on the hue wheel is 120°) and blue (the angle on the hue wheel is 240°), then the constructed color pairs may specifically include (red-green) and (red-blue).
[0081] Step 132a, generating a hue difference set according to the position information of the two colors in each of the at least two color pairs on the color spectrum, wherein the hue difference set includes a first position difference value of the two colors in each of the at least two color pairs on the color spectrum.
[0082] For example, if the color spectrum is a visible spectrum, the first position difference value between the two colors in each color pair on the color spectrum may be a wavelength difference. If the color spectrum is a hue circle, the first position difference value between the two colors in each color pair on the color spectrum may be an angle difference. The hue difference set includes a set of first position difference values between the two colors in each color pair in a set of color pairs.
[0083] Step 133a, generating a target statistical value according to the first position difference value in the hue difference set, wherein the target statistical value is used to indicate the degree of hue difference between the main color corresponding to the reference main hue and at least two colors corresponding to the layout hue information.
[0084] Exemplarily, the target statistical value calculated based on the hue difference set is used to quantify the degree of hue difference between the main color corresponding to the reference main hue and at least two colors corresponding to the layout hue information. Specifically, the target statistical value measures the coordination or contrast of color matching in the layout design in the hue dimension, and is an important parameter for evaluating the effect of color matching. As a specific example, the target statistical value can be the mean, median, standard deviation, variance, etc.
[0085] Step 134a: determine the second reference evaluation value corresponding to the target statistical value as the first evaluation value.
[0086] Exemplarily, the target statistical value is converted into a second reference evaluation value, and the second reference evaluation value is used to evaluate the effect of color matching. The conversion method can be defined according to actual needs, such as directly using the target statistical value as the second reference evaluation value, or converting through a certain functional relationship.
[0087] In an embodiment of the present application, by calculating the first position difference value in the hue difference set and generating a target statistical value, the degree of hue difference between at least two colors corresponding to the layout hue information and the main color corresponding to the reference main hue can be quantitatively evaluated. Then, the first evaluation value determined based on the target statistical value helps to intuitively understand the degree of match between the current layout hue and the reference main hue. In addition, the second reference evaluation value corresponding to the target statistical value is determined as the first evaluation value. Based on the correspondence between the preset statistical value and the reference evaluation value, the time period of the color matching evaluation is significantly shortened, thereby effectively improving the efficiency of the digital layout color matching evaluation.
[0088] In some embodiments of the present application, the first evaluation value directly reflects the degree of proximity in the hue spectrum between the main color corresponding to the reference main color and at least two colors corresponding to the layout color information. The higher the first evaluation value, the closer the hue of the layout color is to the reference main color, and the stronger the overall harmony of the color matching. Conversely, the lower the first evaluation value, the greater the hue difference between certain colors corresponding to the layout color and the main color corresponding to the reference main color. Certain colors in the digital layout can be adjusted according to the reference main color to make certain colors in the color matching of the digital layout closer to the hue range of the reference main color.
[0089] In other embodiments of the present application, Figure 6 As shown, the above step 130 may specifically include steps 131b to 133b.
[0090] Step 131b, performing position fusion processing on the position information of at least two colors on the color spectrum to obtain processed position information.
[0091] Exemplarily, the position fusion process refers to the comprehensive processing or integration of the position information of multiple colors on the color spectrum. Specifically, it can include calculating the average value, median, weighted average value or variance value to obtain a comprehensive value that can represent the position information of these colors.
[0092] Step 132b, determining a second position difference value between the main color and at least two colors on the color spectrum based on the position information of the main color on the color spectrum and the processed position information; the second position difference value is used to indicate the degree of hue difference between the main color corresponding to the reference main color tone and at least two colors corresponding to the layout color tone information.
[0093] Exemplarily, the second position difference value is used to quantitatively represent the degree of hue difference between the main color and at least two colors in the digital layout on the color spectrum.
[0094] Step 133b: determine the second reference evaluation value corresponding to the second position difference value as the first evaluation value.
[0095] Exemplarily, the second reference evaluation value converted from the second position difference value can be used to evaluate the color matching effect of the digital layout. In an embodiment of the present application, a mapping relationship or conversion function between the second position difference value and the second reference evaluation value can be predefined according to design requirements or color matching principles. Then, after calculating the second position difference value, the second position difference value is substituted into the predefined mapping relationship or conversion function to calculate the second reference evaluation value. Then, the calculated second reference evaluation value is determined as the first evaluation value to evaluate the color matching effect of the digital layout.
[0096] In the embodiment of the present application, through position fusion processing, the overall color tendency of at least two colors in the color spectrum can be comprehensively considered, rather than just the influence of a single color, thereby effectively improving the accuracy of determining the degree of matching of the main color corresponding to the reference main color tone.
[0097] Then, in step 140, the second evaluation value is determined based on the target color relationship corresponding to at least two colors corresponding to the layout color information. These target color relationships can be determined based on indicators such as color contrast, color harmony, and color balance, and are intended to evaluate the degree of coordination between at least two colors. The second evaluation value is used to characterize the overall coordination of these colors in color matching. Based on this, in order to determine the target color relationship corresponding to the digital layout before step 140, such as Figure 7 As shown, the information generating method may specifically include steps 710 to 740.
[0098] Step 710, generating multiple preset color relationships and parameter information of each preset color relationship in the multiple preset color relationships according to the purity contrast value and the brightness contrast value between every two spectral colors on the color spectrum, the preset color relationship includes a color relationship between at least two spectral colors, the purity contrast value is used to characterize the saturation difference between every two spectral colors, the brightness contrast value is used to characterize the brightness difference between every two spectral colors, and the parameter information includes a color value range, a purity contrast value range, and a brightness contrast value range between every two spectral colors in at least two spectral colors in each preset color relationship.
[0099] Exemplarily, the purity contrast value is used to measure the difference in saturation between two colors. The higher the saturation, the brighter the color; conversely, the darker the color. The lightness contrast value is used to measure the difference in lightness between two colors. The higher the lightness, the brighter the color; conversely, the darker the color. The multiple preset color relationships are a series of color combination methods predefined based on newspaper aesthetics theory, color theory (hue, lightness change and contrast, and purity change and contrast) and color spectrum, which may specifically include adjacent colors, complementary colors, split complementary colors, triangles, rectangles, etc.
[0100] Next, a plurality of preset color relationships will be further specifically described.
[0101] Adjacent colors refer to colors that are connected to each other on the color spectrum. Adjacent colors usually have similar hues, but may have different purity and brightness. The combination of adjacent colors can create a unified, harmonious, and comfortable atmosphere. Because the transition between colors is natural, this combination is often used in layout designs that need to create a tranquil and peaceful feeling.
[0102] Complementary colors refer to colors that are in relative positions on the color spectrum. The hue difference between them is the largest, forming the strongest contrast effect. The combination of complementary colors can significantly highlight the theme and enhance the visual impact. This strong contrast effect can attract the viewer's attention and make the design work more vivid and powerful. It is suitable for occasions that need to emphasize key points or create eye-catching effects.
[0103] Split complementary colors are based on complementary colors, and the adjacent colors on both sides of one color are selected to form a more complex and interesting color combination. This color relationship increases the richness and layering of colors while maintaining a certain contrast, thereby enhancing the fun and appeal of the design. It is suitable for layout designs that need to show creativity, liveliness or modernity.
[0104] Triangle refers to the combination of three equally spaced colors on the color spectrum, forming an equilateral triangle. Triangular color matching can create a balanced and tense visual effect. Due to the coexistence of contrast and coordination between colors, this matching method can not only attract the viewer's attention, but also maintain overall harmony and unity. It is suitable for layout designs that need to show stability, balance or professionalism.
[0105] Rectangle refers to a rectangular color relationship, specifically, it means selecting two complementary colors on the color spectrum, and then selecting a color adjacent to each of the two complementary colors to form a rectangular or square color combination. Rectangular color matching includes both the strong contrast of complementary colors and the harmonious transition of adjacent colors, thus creating a lively and stable visual effect. This matching method is suitable for layout designs that need to show rich color changes but do not want to be too messy, and can create an atmosphere that is both creative and harmonious.
[0106] In some embodiments of the present application, after determining a plurality of preset color relationships, scoring values may be assigned to the plurality of preset color relationships based on the color matching relationships represented by the plurality of preset color relationships. Specifically, scoring values may be assigned to the plurality of preset color relationships according to the following criteria:
[0107] Harmony, which is used to evaluate whether the color combination is harmonious and unified to avoid conflict or chaos;
[0108] Contrast, which is used to evaluate the degree of contrast between color combinations to ensure that there is contrast but not too harsh;
[0109] Variety, used to evaluate whether color matching can bring visual changes and layering;
[0110] Applicability, used to evaluate the applicability of color combinations in different design scenarios.
[0111] As a specific example, the colors on the color spectrum are traversed, the purity contrast value and the lightness contrast value between every two colors are calculated, and then the color combinations on the color spectrum are classified into different preset color relationships according to these purity contrast values and lightness contrast values, and the parameter information of each preset color relationship is extracted.
[0112] Step 720, based on the at least two colors corresponding to the layout tone information, calculate the purity contrast value and the lightness contrast value between each two colors in the at least two colors.
[0113] Exemplarily, when calculating the purity contrast value between two colors, first, the two colors are converted from their respective color spaces, such as the RGB color space, to the HSV (Hue, Saturation, Value) color space to obtain the saturation values S1 and S2 of the two colors. Then, the difference value or relative difference value of S1 and S2 is calculated to obtain the purity contrast value of the two colors. Specifically, |S1-S2| or |S1-S2| / max(S1, S2) can be used to calculate the purity contrast value of the two colors.
[0114] When calculating the brightness contrast value between two colors, first, the two colors are converted from their respective color spaces, such as the RGB color space, to the HSV color space to obtain the brightness values V1 and V2 of the two colors. Then, the difference value or relative difference value of V1 and V2 is calculated to obtain the brightness contrast value of the two colors. Specifically, |V1-V2| or |V1-V2| / max(V1, V2) can be used to calculate the brightness contrast value of the two colors.
[0115] Step 730, matching the target parameter information with the parameter information of each preset color relationship to obtain a matching result, wherein the matching result includes a target preset color relationship corresponding to the target parameter information in multiple preset color relationships, and the target parameter information includes a color value of each color in at least two colors, a purity contrast value and a brightness contrast value between each two colors in at least two colors.
[0116] Exemplarily, an algorithm (such as similarity calculation, distance measurement, etc.) may be used to compare the target parameter information with the parameter information of each preset color relationship, and find the preset color relationship with the highest matching degree as the target preset color relationship.
[0117] Step 740: determine the first reference evaluation value corresponding to the target preset color relationship as the second evaluation value.
[0118] Exemplarily, according to the evaluation or score of the target preset color relationship in the preset color relationship library (ie, the first reference evaluation value), it is directly assigned to the second evaluation value corresponding to the layout color tone information.
[0119] In the embodiment of the present application, first, a plurality of preset color relationships and parameter information of each preset color relationship are generated through a color spectrum, and a color matching template and an evaluation standard are provided. Then, for at least two colors to be evaluated, the purity contrast value and the lightness contrast value that can reflect the specific characteristics of the color matching of the digital layout are calculated. Subsequently, the target parameter information related to the color matching of the digital layout that is actually calculated is matched with the parameter information of the plurality of preset color relationships, so that the target preset color relationship that best matches the color matching of the digital layout can be quickly determined. This method not only considers the color value of the color, but also goes deep into the purity contrast and lightness contrast level between the colors, ensuring the comprehensiveness and accuracy of the matching result. Finally, according to the first reference evaluation value corresponding to the target preset color relationship, the second evaluation value of the digital layout is directly determined. By pre-constructing a plurality of preset color relationships and their parameter information, the time period of the color matching analysis in the process of color tone evaluation is effectively shortened, and the complexity of the evaluation is reduced. At the same time, since the matching process fully considers the multiple dimensions of color matching (color value, purity contrast, lightness contrast), the evaluation result is more accurate and scientific. Therefore, the embodiments of the present application not only improve the efficiency of digital layout color tone evaluation, but also significantly improve the accuracy of the evaluation.
[0120] In some embodiments of the present application, in order to obtain a more accurate target evaluation value, such as Figure 8 As shown, the above step 140 may specifically include steps 141 to 143.
[0121] Step 141 , performing weighted processing on the first evaluation value according to the first weight corresponding to the first evaluation value to obtain an adjusted first evaluation value.
[0122] Exemplarily, the first weight may be adjusted according to factors such as design objectives, user preferences, industry standards, etc. Weighting the first evaluation value is used to adjust the contribution of the first evaluation value in the final score according to its importance.
[0123] Step 142: weighting the second evaluation value according to the second weight corresponding to the second evaluation value to obtain an adjusted second evaluation value.
[0124] Exemplarily, the second weight may be adjusted according to factors such as design objectives, user preferences, industry standards, etc. Weighting the second evaluation value is used to adjust the contribution of the second evaluation value in the final score according to its importance.
[0125] Step 143, determining a target evaluation value corresponding to the digital layout according to the adjusted first evaluation value and the adjusted second evaluation value.
[0126] Exemplarily, the target evaluation value integrates the evaluation results of multiple aspects and can more comprehensively reflect the quality of the color matching of the digital layout.
[0127] In some embodiments of the present application, a target evaluation value corresponding to the digital layout may be determined based on the sum of the adjusted first evaluation value and the adjusted second evaluation value.
[0128] In some other embodiments of the present application, in the above steps 133a and 133b, the target statistical value or the second position difference value can be directly determined as the first evaluation value, based on which the target evaluation value P corresponding to the digital layout can be determined according to the following formula (1):
[0129] P=(p*q1) / (y*q2) (1)
[0130] Among them, p represents the second evaluation value, q1 represents the second weight, y represents the first evaluation value, and q2 represents the second weight.
[0131] Here, the higher the P value, the better the color matching in the layout design of the digital page is in all aspects, which can more effectively convey information, attract readers' attention and improve user experience. On the contrary, the lower the P value, it may indicate that the layout design of the digital page is insufficient in some aspects and needs to be improved.
[0132] In an embodiment of the present application, different evaluation factors (tone information and color relationships) may have different importance in the overall evaluation of a digital layout. By performing differentiated treatment on each evaluation factor according to its actual significance and the degree of contribution to the final evaluation result, specifically, by assigning different weights to the first evaluation value corresponding to the layout tone information and the second evaluation value corresponding to the target color relationship, the relative importance of each evaluation factor in the final evaluation can be flexibly adjusted, thereby improving the accuracy and effectiveness of the layout color evaluation.
[0133] The information generation method provided in the embodiment of the present application can be executed by an information generation device. In the embodiment of the present application, the information generation method device provided in the embodiment of the present application is described by taking the information generation device executing the digital layout tone evaluation information generation as an example.
[0134] Based on the same inventive concept, the present application also provides an information generating device. Fig. 9 Provide detailed explanation.
[0135] Fig. 9 A schematic diagram of the structure of an information generating device provided in an embodiment of the present application.
[0136] like Fig. 9 As shown, the information generating device 900 may specifically include:
[0137] The first acquisition module 901 is used to acquire the layout color information of the digital layout, the layout color information is used to represent the color state of the layout content on the digital layout, and the layout color information corresponds to at least two colors;
[0138] The first generating module 902 is used to generate a reference main color tone of the digital layout according to the layout content of the digital layout;
[0139] A first determination module 903 is used to determine a first evaluation value according to the position information of the main color corresponding to the reference main color and at least two colors on the color spectrum, wherein the first evaluation value is used to represent the degree of hue difference between the main color corresponding to the reference main color and at least two colors corresponding to the layout color information;
[0140] The second determination module 904 is used to determine a target evaluation value corresponding to the digital layout based on the first evaluation value and the second evaluation value, the second evaluation value is determined based on a target color relationship corresponding to at least two colors, the target color relationship is determined based on the color value of each color in the at least two colors, and the purity contrast value and brightness contrast value between each two colors in the at least two colors, the second evaluation value is used to characterize the color coordination degree of the at least two colors, and the target evaluation value is used to characterize the color matching degree of the digital layout.
[0141] In the embodiment of the present application, the first generation module 902 is used to generate a reference main color tone through the layout content of the digital layout. Then, the first determination module 903 is used to determine the first evaluation value that can characterize the degree of hue difference between the main color and the at least two colors corresponding to the layout color tone information based on the position information on the color spectrum of the main color corresponding to the reference main color tone and the at least two colors corresponding to the layout color tone information, so as to quantify the evaluation of the at least two colors of the layout color tone information into a specific first evaluation value through the color spectrum. Subsequently, the target color relationship corresponding to the at least two colors is quantified into a specific second evaluation value using the second determination module 904. The target color relationship of the digital layout is determined according to the purity contrast value and the brightness contrast value between each two colors in the at least two colors, and further, the second evaluation value of the digital layout is determined according to the target color relationship. Among them, purity and brightness directly affect the expressiveness of color, the purity contrast value reflects the difference in color vividness, and the brightness contrast value reflects the difference in color brightness. By quantifying the color relationship corresponding to the color value, the purity contrast value and the brightness contrast value into the second evaluation value, it is helpful to objectively and accurately evaluate the pros and cons of the color relationship in the digital layout. The target evaluation value determined by the first evaluation value and the second evaluation value comprehensively evaluates the degree of color matching of the digital layout from the two dimensions of color and color relationship. It can objectively reflect the actual effect of the color matching of the digital layout, and effectively avoid the uncertainty of the evaluation of the color matching of the digital layout caused by subjective factors of manual review.
[0142] In particular, when faced with a large number of digital layout review tasks, the traditional manual review method is not only slow, but also prone to review delays and increased error rates due to fatigue. The method provided by the embodiment of the present application can realize the automated review of the color matching of the digital layout, which not only reduces labor costs, but also greatly improves the efficiency and accuracy of the digital layout review, effectively reducing the impact of inaccurate or slow digital layout review results on the publication of the digital layout.
[0143] The information generating device 900 in the embodiment of the present application is described in detail below, as shown below.
[0144] The information generating device 900 in the embodiment of the present application may further include:
[0145] A first processing module is used to perform image processing on the digital layout to obtain a recognition result, wherein the recognition result includes at least two initial colors and a distribution area of each of the at least two initial colors on the digital layout;
[0146] A third determination module is used to obtain a proportion of each initial color according to a proportion of a distribution area of each initial color in the digital layout to a total area of the digital layout;
[0147] A first screening module is used to screen a target color of layout content in the digital layout from at least two initial colors according to a proportion of each initial color;
[0148] The second generating module is used to generate the layout color tone information of the digital layout according to the target color and the distribution area of the target color in the digital layout, and the target color includes at least two colors.
[0149] In some embodiments of the present application, the first screening module in the embodiments of the present application can be specifically used for:
[0150] According to the order of the proportion from high to low, the proportions of at least two initial colors are sorted in order to obtain a sorting sequence of at least two initial colors;
[0151] Target colors of the digital layout are filtered from the sorting sequence, and the order of the target colors in the sorting sequence meets the preset conditions.
[0152] The information generating device 900 in the embodiment of the present application may further include:
[0153] A third generating module is used for generating a plurality of preset color relationships and parameter information of each preset color relationship in the plurality of preset color relationships according to the purity contrast value and the brightness contrast value between every two spectral colors on the color spectrum before executing the step of determining the target evaluation value corresponding to the digital layout according to the first evaluation value and the second evaluation value, wherein the preset color relationship includes a color relationship between at least two spectral colors, the purity contrast value is used to characterize the saturation difference between every two spectral colors, the brightness contrast value is used to characterize the brightness difference between every two spectral colors, and the parameter information includes a color value range, a purity contrast value range, and a brightness contrast value range between every two spectral colors in at least two spectral colors in each preset color relationship;
[0154] A first calculation module, for calculating a purity contrast value and a lightness contrast value between each two colors in at least two colors according to at least two colors corresponding to the layout tone information;
[0155] a fourth determination module, configured to match the target parameter information with the parameter information of each preset color relationship to obtain a matching result, wherein the matching result includes a target preset color relationship corresponding to the target parameter information in a plurality of preset color relationships, and the target parameter information includes a color value of each color in at least two colors, and a purity contrast value and a brightness contrast value between each two colors in at least two colors;
[0156] The fifth determining module is used to determine the first reference evaluation value corresponding to the target preset color relationship as the second evaluation value.
[0157] In some embodiments of the present application, the first generating module 902 in the embodiments of the present application may be specifically used for:
[0158] The layout content includes text and images;
[0159] Perform semantic recognition on the text to obtain a semantic recognition result, and perform image content recognition on the image to obtain an image recognition result;
[0160] According to the semantic recognition results and the image recognition results, the target topic category corresponding to the layout content is selected from multiple preset topic categories;
[0161] Based on the preset association relationship between the preset theme category and the color tone, a reference main color tone associated with the target theme category is obtained.
[0162] In some embodiments of the present application, the first determining module 903 in the embodiments of the present application may be specifically used to:
[0163] Based on the main color corresponding to the reference main color tone and at least two colors, construct at least two color pairs, wherein the at least two color pairs include a color pair constructed from the main color and each of the at least two colors;
[0164] Generate a hue difference set according to position information of two colors in each color pair of at least two color pairs on a color spectrum, the hue difference set including a first position difference value of two colors in each color pair of at least two color pairs on a color spectrum;
[0165] Generate a target statistical value according to the first position difference value in the hue difference set, the target statistical value being used to indicate the degree of hue difference between the main color corresponding to the reference main hue and at least two colors corresponding to the layout hue information;
[0166] The second reference evaluation value corresponding to the target statistical value is determined as the first evaluation value.
[0167] In some other embodiments of the present application, the first determining module 903 in the embodiment of the present application may be specifically used for:
[0168] Performing position fusion processing on position information of at least two colors on the color spectrum to obtain processed position information;
[0169] Determine a second position difference value between the main color and at least two colors on the color spectrum according to the position information of the main color on the color spectrum and the processed position information; the second position difference value is used to indicate the degree of hue difference between the main color corresponding to the reference main color tone and the at least two colors corresponding to the layout color tone information;
[0170] The second reference evaluation value corresponding to the second position difference value is determined as the first evaluation value.
[0171] In some embodiments of the present application, the second determination module 904 in the embodiments of the present application may be specifically used to:
[0172] Performing weighted processing on the first evaluation value according to a first weight corresponding to the first evaluation value to obtain an adjusted first evaluation value;
[0173] performing weighted processing on the second evaluation value according to a second weight corresponding to the second evaluation value to obtain an adjusted second evaluation value;
[0174] A target evaluation value corresponding to the digital layout is determined according to the adjusted first evaluation value and the adjusted second evaluation value.
[0175] The information generation device provided in the embodiment of the present application can achieve Figures 1 to 8 The various processes implemented in the information generation method embodiment shown achieve the same technical effect and will not be described again here to avoid repetition.
[0176] Fig.10 A schematic diagram of the structure of an electronic device provided in some embodiments of the present application is shown.
[0177] The electronic device may include a processor 1011 and a memory 1012 storing computer program instructions.
[0178] Specifically, the processor 1011 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0179] The memory 1012 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1012 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 1012 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 1012 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1012 is a non-volatile solid-state memory.
[0180] In certain embodiments, the memory 1012 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory 1012 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the information generation method according to the first aspect of the present application.
[0181] The processor 1011 implements any one of the information generating methods in the above embodiments by reading and executing computer program instructions stored in the memory 1012 .
[0182] In some examples, the electronic device may further include a communication interface 1013 and a bus 1010. Fig.10 As shown, the processor 1011, the memory 1012, and the communication interface 1013 are connected via the bus 1010 and communicate with each other.
[0183] The communication interface 1013 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0184] Bus 1010 includes hardware, software or both, and the components of online data flow billing equipment are coupled to each other. For example, but not limitation, bus 1010 may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1010 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0185] Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).
[0186] The electronic device can execute the information generation method in the embodiment of the present application, thereby realizing the combination Figures 1 to 9 The described information generation method and device.
[0187] In addition, in combination with the information generation method in the above embodiment, the embodiment of the present application also provides a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the information generation methods in the above embodiment is implemented. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as portable disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, etc.
[0188] The embodiment of the present application also provides a computer program product, which is stored in a storage medium and may specifically include a computer program or instruction, and when the computer program or instruction is executed by a processor, any one of the information generation methods in the above embodiments is implemented. The program product is executed by at least one processor to implement the various processes of the above information generation method embodiment, and can achieve the same technical effect, so it will not be repeated here to avoid repetition.
[0189] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0190] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable information generating device to produce a machine so that these instructions executed by the processor of a computer or other programmable information generating device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0191] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for generating information, characterized in that: include: Acquire layout color tone information of the digital layout, wherein the layout color tone information is used to indicate the color state of layout content presented on the digital layout, and the layout color tone information corresponds to at least two colors; Generating a reference main color tone of the digital layout according to the layout content of the digital layout; Determine a first evaluation value according to the position information of the main color corresponding to the reference main color and the at least two colors on the color spectrum, wherein the first evaluation value is used to characterize the degree of hue difference between the main color corresponding to the reference main color and the at least two colors corresponding to the layout color information; According to the first evaluation value and the second evaluation value, a target evaluation value corresponding to the digital layout is determined, the second evaluation value is determined based on a target color relationship corresponding to the at least two colors, the target color relationship is determined based on the color value of each color in the at least two colors, and the purity contrast value and brightness contrast value between each two colors in the at least two colors, the second evaluation value is used to characterize the color coordination degree of the at least two colors, and the target evaluation value is used to characterize the color matching degree of the digital layout.
2. The method according to claim 1, characterized in that Before obtaining the layout color tone information of the digital layout, the method further includes: Performing image processing on the digital layout to obtain a recognition result, wherein the recognition result includes at least two initial colors and a distribution area of each of the at least two initial colors on the digital layout; Obtaining a proportion of each of the at least two initial colors according to a proportion of a distribution area of each of the at least two initial colors on the digital layout to a total area of the digital layout; According to the proportion of each of the initial colors, selecting a target color of the layout content in the digital layout from the at least two initial colors; The layout color tone information of the digital layout is generated according to the target color and the distribution area of the target color in the digital layout, and the target color includes the at least two colors.
3. The method according to claim 2, characterized in that The step of selecting a target color of the layout content in the digital layout from the at least two initial colors according to the proportion of each initial color includes: Sort the proportions of the at least two initial colors in descending order to obtain a sorting sequence of the at least two initial colors; The target colors of the digital layout are selected from the sorting sequence, and the order of the target colors in the sorting sequence meets a preset condition.
4. The method according to claim 1, characterized in that Before determining the target evaluation value corresponding to the digital layout according to the first evaluation value and the second evaluation value, the method further includes: Generate a plurality of preset color relationships and parameter information of each preset color relationship in the plurality of preset color relationships according to the purity contrast value and the brightness contrast value between every two spectral colors on the color spectrum, wherein the preset color relationship includes a color relationship between at least two spectral colors, the purity contrast value is used to characterize the saturation difference between the every two spectral colors, the brightness contrast value is used to characterize the brightness difference between the every two spectral colors, and the parameter information includes a color value range, a purity contrast value range, and a brightness contrast value range between every two spectral colors in the at least two spectral colors in each preset color relationship; According to at least two colors corresponding to the layout tone information, calculating a purity contrast value and a lightness contrast value between each two colors in the at least two colors; Matching the target parameter information with the parameter information of each preset color relationship to obtain a matching result, wherein the matching result includes a target preset color relationship corresponding to the target parameter information among the multiple preset color relationships, and the target parameter information includes a color value of each color in the at least two colors, and a purity contrast value and a brightness contrast value between each two colors in the at least two colors; The first reference evaluation value corresponding to the target preset color relationship is determined as the second evaluation value.
5. The method according to claim 1, characterized in that The layout content includes text and images, and generating a reference main color tone of the digital layout according to the layout content of the digital layout includes: Performing semantic recognition on the text to obtain a semantic recognition result, and performing image content recognition on the image to obtain an image recognition result; Filtering a target subject category corresponding to the page content from a plurality of preset subject categories according to the semantic recognition result and the image recognition result; Based on a preset association relationship between a preset theme category and a color tone, the reference main color tone associated with the target theme category is obtained.
6. The method according to any one of claims 1 to 5, characterized in that: The step of determining the first evaluation value according to the main color corresponding to the reference main color tone and the position information of the at least two colors on the color spectrum comprises: Based on the primary color corresponding to the reference primary color tone and the at least two colors, construct at least two color pairs, wherein the at least two color pairs include a color pair constructed from the primary color and each color of the at least two colors; Generate a hue difference set according to position information of two colors of each color pair of the at least two color pairs on the color spectrum, the hue difference set comprising first position difference values of two colors of each color pair of the at least two color pairs on the color spectrum; Generate a target statistical value according to the first position difference value in the hue difference set, wherein the target statistical value is used to indicate the degree of hue difference between the main color corresponding to the reference main hue and at least two colors corresponding to the layout hue information; A second reference evaluation value corresponding to the target statistical value is determined as the first evaluation value.
7. The method according to any one of claims 1 to 5, characterized in that: The step of determining the first evaluation value according to the main color corresponding to the reference main color tone and the position information of the at least two colors on the color spectrum comprises: Performing position fusion processing on the position information of the at least two colors on the color spectrum to obtain processed position information; Determine a second position difference value between the main color and the at least two colors on the color spectrum according to the position information of the main color on the color spectrum and the processed position information; the second position difference value is used to indicate the degree of hue difference between the main color corresponding to the reference main color tone and the at least two colors corresponding to the layout color tone information; A second reference evaluation value corresponding to the second position difference value is determined as the first evaluation value.
8. The method according to any one of claims 1 to 5, characterized in that: Determining a target evaluation value corresponding to the digital layout according to the first evaluation value and the second evaluation value includes: performing weighted processing on the first evaluation value according to a first weight corresponding to the first evaluation value to obtain an adjusted first evaluation value; performing weighted processing on the second evaluation value according to a second weight corresponding to the second evaluation value to obtain an adjusted second evaluation value; A target evaluation value corresponding to the digital layout is determined according to the adjusted first evaluation value and the adjusted second evaluation value.
9. An information generating device, characterized in that: The device comprises: A first acquisition module is used to acquire layout color tone information of a digital layout, wherein the layout color tone information is used to indicate the color state of layout content presented on the digital layout, and the layout color tone information corresponds to at least two colors; A first generating module, used for generating a reference main color tone of the digital layout according to the layout content of the digital layout; A first determination module, for determining a first evaluation value according to the position information of the main color corresponding to the reference main color and the at least two colors on the color spectrum, wherein the first evaluation value is used to characterize the degree of hue difference between the main color corresponding to the reference main color and the at least two colors corresponding to the layout color information; A second determination module is used to determine a target evaluation value corresponding to the digital layout based on the first evaluation value and the second evaluation value, the second evaluation value is determined based on a target color relationship corresponding to the at least two colors, the target color relationship is determined based on the color value of each color in the at least two colors, and the purity contrast value and brightness contrast value between each two colors in the at least two colors, the second evaluation value is used to characterize the color coordination degree of the at least two colors, and the target evaluation value is used to characterize the color matching degree of the digital layout.
10. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the information generating method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the information generating method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The computer program product includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the information generating method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Advertisement identification pattern generation method and device, electronic equipment and storage medium
CN120975853A
