A method, apparatus, storage medium, and electronic device for generating report charts.

By automatically identifying thematic markers or industry sectors in chart data and determining the primary and background colors, the problem of time-consuming manual color selection by users is solved, achieving efficient matching and aesthetically pleasing effects between report charts and business scenarios.

CN117150101BActive Publication Date: 2026-06-30ZHEJIANG LAB

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG LAB
Filing Date
2023-09-05
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

When creating report charts, users need to manually select color schemes, which is time-consuming and the generated charts have low adaptability to business scenarios.

Method used

By identifying thematic markers or industry sectors in the chart data, the system automatically determines the primary and background colors and renders the chart elements based on these colors to generate report charts.

Benefits of technology

It improves the efficiency of generating report charts and their adaptability to business scenarios, and enhances the aesthetics of the charts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117150101B_ABST
    Figure CN117150101B_ABST
Patent Text Reader

Abstract

This specification discloses a method, apparatus, storage medium, and electronic device for generating report charts. The method includes: acquiring chart data input by a user; identifying the chart data to determine whether it contains a theme marker; if so, determining the primary color of the report chart based on the hue corresponding to the theme marker; otherwise, inputting the chart data into a pre-trained classification model to determine the industry sector to which the chart data belongs, and determining the primary color based on the industry sector; if a call instruction corresponding to a geographic information component is received, determining a first background color based on the hue corresponding to the primary color, and setting the background color of the report chart to the first background color; otherwise, setting the background color of the report chart to a second background color, wherein the color depth of the first background color is greater than the color depth of the second background color; and rendering each element contained in the chart data according to the background color and primary color of the report chart to generate a report chart.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a method, apparatus, storage medium, and electronic device for generating report charts. Background Technology

[0002] With the arrival of the "big data" era, facing massive amounts of data, mining its value can help enterprises and institutions grasp key situations and empower rapid decision-making for industrial development. Enterprises can achieve data insights and applications by establishing a one-stop solution that includes data collection and processing, data asset management, in-depth data analysis, and data visualization.

[0003] However, when users process data to create reports and charts, they usually need to find the built-in matching report styles themselves. For people without an aesthetic background, choosing a color scheme is very time-consuming, and the resulting reports and charts have low adaptability to business scenarios.

[0004] Therefore, improving the efficiency of report chart production and the adaptability of report charts to business scenarios is an urgent problem to be solved. Summary of the Invention

[0005] This specification provides a method, apparatus, storage medium, and electronic device for generating report charts, in order to partially solve the aforementioned problems existing in the prior art.

[0006] The following technical solution is adopted in this specification:

[0007] This manual provides a method for generating report charts, including:

[0008] Obtain the chart data input by the user;

[0009] The chart data is identified to determine whether it contains a theme marker. If so, the primary color of the report chart is determined based on the hue corresponding to the theme marker. Otherwise, the chart data is input into a pre-trained classification model to determine the industry sector to which the chart data belongs, and the primary color is determined based on the industry sector. The primary color is used to characterize the hue, saturation, and brightness of the color that accounts for the largest proportion in the foreground color of the report chart.

[0010] If a call instruction corresponding to the geographic information component is received, the first background color is determined according to the hue corresponding to the main color, and the background color of the report chart is set to the first background color; otherwise, the background color of the report chart is set to the second background color, and the color depth of the first background color is greater than the color depth of the second background color.

[0011] The report chart is generated by rendering each element contained in the chart data according to the background color and the main color of the report chart.

[0012] Optionally, the report chart is generated by rendering each element contained in the chart data according to the background color and the main color of the report chart, specifically including:

[0013] Determine the target color value corresponding to the primary color;

[0014] On a preset color wheel, with the target color value as the origin, color values ​​are selected at specified angular intervals. Based on the selected color values, the category colors of the report chart are determined. The category colors are used to distinguish different things in the same element.

[0015] The report chart is generated by rendering each element contained in the chart data according to the background color, the main color, and the category color of the report chart.

[0016] Optionally, the report chart is generated by rendering each element contained in the chart data according to the background color and the main color of the report chart, specifically including:

[0017] Determine the complementary and contrasting colors corresponding to the primary color;

[0018] The divergent color corresponding to the report chart is determined based on the complementary color and the contrasting color. The divergent color is used to distinguish different things with relative relationships within the same element.

[0019] The report chart is generated by rendering each element contained in the chart data according to the background color, the main color, and the diverging color of the report chart.

[0020] Optionally, each element in the chart data is rendered according to the background color and the main color of the report chart, specifically including:

[0021] Based on the changes in the primary color gradation, the sequential monochromatic color is determined, and based on the changes in the gradation of the complementary color of the primary color, the sequential polychromatic color is determined.

[0022] Based on the sequential monochrome and sequential multicolor, the sequential color corresponding to the report chart is determined, and the sequential color is used to render elements with continuous gradient changes;

[0023] The report chart is generated by rendering each element contained in the chart data according to the background color, the primary color, the diverging color, and the sequential color of the report chart.

[0024] Optionally, each element in the chart data is rendered according to the background color and the main color of the report chart, specifically including:

[0025] For each element in the report chart, if the background color of the report chart is the first background color, then the hue corresponding to that element is set to the hue corresponding to the main color;

[0026] If the background color of the report chart is the second background color, then a border is set for the element, and the hue of the border is determined according to the hue corresponding to the main color.

[0027] Optionally, each element in the chart data is rendered according to the background color and the main color of the report chart, specifically including:

[0028] If the background color of the report chart is the first background color, then the color corresponding to the text in the report chart is set to white with a specified transparency;

[0029] If the background color of the report chart is the second background color, then the color corresponding to the text in the report chart is set to gray with the hue corresponding to the primary color.

[0030] Optionally, the method further includes:

[0031] Based on the background color, determine the style of each element in the report chart, and based on the size of the current Kanban container, determine the position and size of each element in the report chart.

[0032] This specification provides a device for generating report charts, including:

[0033] The module retrieves the chart data input by the user.

[0034] The identification module identifies the chart data and determines whether the chart data contains a theme marker. If so, it determines the main color of the report chart based on the hue corresponding to the theme marker. Otherwise, it inputs the chart data into a pre-trained classification model to determine the industry sector to which the chart data belongs and determines the main color based on the industry sector. The main color is used to characterize the hue, saturation, and brightness of the color that accounts for the largest proportion in the foreground color of the report chart.

[0035] If the determination module receives a call instruction corresponding to the geographic information component, it determines the first background color based on the hue corresponding to the main color and sets the background color of the report chart to the first background color; otherwise, it sets the background color of the report chart to the second background color, wherein the color depth of the first background color is greater than the color depth of the second background color.

[0036] The rendering module renders each element contained in the chart data according to the background color and the main color of the report chart to generate the report chart.

[0037] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for generating report charts.

[0038] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method for generating report charts.

[0039] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0040] In the report chart generation method provided in this specification, the client obtains the chart data input by the user; the chart data is identified to determine whether it contains a theme marker. If so, the primary color of the report chart is determined based on the hue corresponding to the theme marker; otherwise, the chart data is input into a pre-trained classification model to determine the industry sector to which the chart data belongs, and the primary color is determined based on the industry sector; if a call instruction corresponding to the geographic information component is received, a first background color is determined based on the hue corresponding to the primary color, and the background color of the report chart is set to the first background color; otherwise, the background color of the report chart is set to the second background color, and the color depth of the first background color is greater than that of the second background color; each element contained in the chart data is rendered according to the background color and primary color of the report chart to generate the report chart.

[0041] As can be seen from the above method, after the user uploads the chart data, the client can automatically determine the main color of the chart based on the content of the chart data, and determine the background color of the chart based on whether the geographic information component is called. Then, based on the main color and background color determined by the chart content, the client renders each element in the chart, making the chart more compatible with the business scenario, improving the aesthetics of the report chart, and ensuring the efficiency of report chart generation. Attached Figure Description

[0042] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:

[0043] Figure 1 This is a flowchart illustrating a method for generating report charts provided in this specification;

[0044] Figure 2This is a schematic diagram illustrating a chart beautification process provided in this manual;

[0045] Figure 3 A schematic diagram of a report chart generation device provided in this specification;

[0046] Figure 4 This specification provides a corresponding Figure 1 A schematic diagram of an electronic device. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0048] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0049] Figure 1 This is a flowchart illustrating a method for generating report charts provided in this specification, including the following steps:

[0050] S101: Obtain the chart data input by the user.

[0051] S102: Identify the chart data and determine whether the chart data contains a theme marker. If so, determine the main color of the report chart based on the hue corresponding to the theme marker. Otherwise, input the chart data into a pre-trained classification model to determine the industry sector to which the chart data belongs through the classification model, and determine the main color based on the industry sector. The main color is used to characterize the hue, saturation, and brightness of the color that accounts for the largest proportion in the foreground color of the report chart.

[0052] Before executing the actual task, the client can build a report material library based on pre-collected industry text and chart data of relevant types. Then, natural language processing (NLP) algorithms are used to segment, sentence, and word the collected data and extract keywords. Through model training, an industry classification model is trained.

[0053] Specifically, the client can use the collected data as training samples, employing models such as Conditional Random Field (CRF) and a user-defined dictionary to segment the training samples. Then, algorithms such as Term Frequency-Inverse Document Frequency (TF-IDF) and Text Rank can be used to extract keywords from the data. Based on the extracted keywords, the corresponding industry sector of the data is determined as the label for the training samples.

[0054] The client can then input training samples into the classification model to be trained. The classification model predicts the industry sector to which the training sample belongs, which is then used as the predicted industry sector. The client can train the classification model with the optimization objective of minimizing the deviation between the predicted industry sector and the aforementioned label (the actual industry sector) until the classification model converges to a preset range or reaches a preset number of training iterations, and then deploy the trained classification model.

[0055] During the actual chart generation task, the client can obtain chart data input by the user. This data can be images (such as statistical charts, logos, maps, etc.) or text input by the user to build the visualization chart. This data can be structured or unstructured. Of course, the chart data can also be the user-generated, unprocessed initial chart.

[0056] In this specification, the colors of report charts can be divided into foreground and background colors according to color hierarchy. The client can first identify the chart data to determine whether it contains a theme logo. If so, the client can use the hue corresponding to the theme logo as the hue of the report chart's primary color, and then determine the saturation and brightness of the primary color. The saturation and brightness of the primary color can also be the same as those of the theme logo.

[0057] In practical applications, the primary color can represent the product's representative color and is related to the product's brand color (logo color). It is often used to render elements such as main buttons, text, key operation states, highlighted reminders, and empty states. Therefore, in this manual, the primary color of the report chart can also be understood as the hue, saturation, and brightness corresponding to the color that accounts for the largest proportion in the foreground color of the report chart.

[0058] In physics and psychology, the basic colors that can be distinguished are "red, orange, yellow, green, cyan, blue, and purple." Black, white, and gray do not have hue attributes. The feelings that hue evokes can be broadly divided into three categories: cool colors (blue, blue-green, etc.), warm colors (red, orange, yellow, etc.), and neutral colors (purple and green). Neutral colors generally cannot create a warm or cool impression on their own.

[0059] In this specification, the primary color and background color can be defined according to the three elements of color (HSB), where:

[0060] Hue (H) is called the appearance of a color and is the most accurate standard for distinguishing different colors. On the color wheel, hue is measured by position and ranges from 0 to 360 degrees (black and white have no hue).

[0061] Saturation (S) represents the purity of a color. The higher the saturation, the more vibrant the color; the lower the saturation, the more muted (close to gray) the color. The value ranges from 0 to 100.

[0062] Brightness (B) represents the lightness or darkness of a color. The higher the brightness, the brighter the color; the lower the brightness, the closer the color is to black. The value ranges from 0 to 100.

[0063] It should be noted that when the chart data uploaded by the user contains multiple logos, the client can distinguish these logos and determine the logo that best represents the theme of the chart based on the size and layout of these logos. For example, the client can use the logo that occupies the largest area, appears the most frequently, and has the most prominent layout as the theme logo.

[0064] If the chart data does not contain a theme identifier, the client can input the chart data into a pre-trained classification model. The classification model will determine the industry sector to which the chart data belongs, and then determine the color that matches that industry sector as the main color of the chart data.

[0065] For example, when the industry sector to which the chart data belongs is government reporting, the primary color that matches it can be red; when the industry sector to which the chart belongs is medical or technology, the primary color that matches it can be blue; and when the industry sector to which the chart belongs is environmental protection, the primary color that matches it can be green.

[0066] Furthermore, based on the quality of the report's charts, determine the category colors, diverging colors, and sequence colors for the charts. Among these, category colors are used most frequently in visualization charts. Generally, the first category color should be consistent with the primary color. This color scheme conforms to the golden rule of color, 6:3:1, where the primary color accounts for 60%, the secondary color for 30%, and the auxiliary color for 10%.

[0067] Specifically, the client can label and categorize primary colors matching industry attributes based on color semantics, sentiment mapping, and design rules; one industry may be applicable to multiple formulation schemes. The client can automatically match the primary color at the first position in the sequence, with other colors as options, allowing users to choose their own matching colors. This primary color is the color value ranked first in the category, serving as the target color value. Using this target color value as the origin, a color value is taken every 30 degrees on the HSB color wheel, resulting in a 12-color wheel based on the primary color. Then, it is validated using Euclidean distance. When the Delta E value is ≥30, these categorized colors achieve ideal recognizability.

[0068] In this way, the client can obtain multiple category colors. By using these category colors to render different things in the same element, the various things in the element can be clearly distinguished. For example, in the scenario of epidemic case statistics, the client can classify cases into local cases, overseas cases, and unknown cases according to the source of the cases, and then perform data statistics through statistical charts. These statistical charts can be used as an element in the report charts, rendering local cases, overseas cases, and unknown cases according to three category colors: blue, yellow, and green.

[0069] In addition, the client can determine the complementary color of the primary color (the color corresponding to the position 180 degrees from the primary color in the HSB color wheel) and the contrasting color of the primary color (the color corresponding to the position ±120 degrees from the primary color in the HSB color wheel). Then, based on the complementary color of the primary color, the client can determine the first matching diverging color and obtain other suitable diverging colors based on the contrasting color of the primary color.

[0070] In this specification, divergent colors are used to distinguish different things with relative relationships within the same element. This relative relationship can be used to represent the change of the numerical state of things from negative to zero and then to positive. For example, when statistically analyzing the temperature of a certain region, the client can set the cooler areas to blue, the warmer areas to orange, and the moderately warm areas to white. The shade of the color represents the degree of hotness or coldness. The three divergent colors, blue, white, and orange, correspond exactly to the relative states of cool-moderate-hot.

[0071] In addition, the client can determine the sequential monochromatic colors (such as colors with color values ​​between 0 and 100) based on the color gradation of the primary color, determine the sequential polychromatic colors based on the contrasting colors of the primary color, and then obtain the sequential polychromatic color palette based on the gradient change of hue to determine the sequential colors of the report charts.

[0072] In this specification, sequential colors are used to render elements in report charts that have a continuous gradient change. For example, when counting the population of a region, sequential colors from light to dark can be used to represent the continuous changes in the population of each region. Similarly, when counting the trend of an epidemic, sequential colors from light to dark can be used to represent the continuous change trend of the number of confirmed cases over time.

[0073] S103: If a call instruction corresponding to the geographic information component is received, the first background color is determined according to the hue corresponding to the main color, and the background color of the report chart is set to the first background color; otherwise, the background color of the report chart is set to the second background color, and the color depth of the first background color is greater than the color depth of the second background color.

[0074] After determining the primary color of the foreground for the report charts, the client can further determine the background color of the report charts.

[0075] Specifically, the client can determine whether it has received a call instruction corresponding to the geographic information component. If so, it means that the current report chart contains geographic information elements. The client can set the background color of the report chart to a darker first background color (such as black, dark gray, or dark blue). In this specification, the first background color can be represented as (H1, x1, y1), where the saturation x1 and brightness y1 of the first background color can be preset fixed values, and the hue H1 is consistent with the hue of the main color and is dynamically adjusted as the main color changes.

[0076] If the client does not receive the call instruction from the geographic information component, the client can set the background color to a lighter second background color (such as white, light green or light yellow). This second background color can be represented as (H2, x2, y2), where H2, x2, and y2 can be set to fixed values ​​of 0, 0, and 100, respectively.

[0077] S104: Render each element contained in the chart data according to the background color and the main color of the report chart to generate the report chart.

[0078] The client can render each element in the chart data based on the background color, main color, category color, divergence color, and sequence color of the report chart.

[0079] Specifically, to highlight the hierarchy of elements, the background of the visual elements needs to be defined separately. In light mode (second background color), the HSB of the element's background color is (H3, x3, y3), all of which are fixed values ​​of 0, 0, and 100. The client can set the border of the element's stroke to 1px, and the border's HSB is (H4, x4, y4), where x4 and y4 are fixed values, and the hue H4 is the same as the hue H1 of the main color.

[0080] In Dark Mode (first background color), to ensure a comfortable overall color scheme, the element background uses black with the primary hue. The HSB of the component background color is (H5, x5, y5), where x5 and y5 are fixed values, and H5 has the same hue as the primary color H2.

[0081] Additionally, in light mode, to ensure color harmony, the text color in report charts can be set to gray with the primary hue. In dark mode, the text color can be set to white with 90% transparency, i.e., HSB (H6, x6, y6) are all fixed values ​​of 0, 0, 100.

[0082] Furthermore, the client can automatically configure the layout of child elements based on the current Kanban container size and child elements. It can determine the position of child elements based on the original layout, reorganize the positions of overlapping child elements, ensure that the spacing between child elements in each row of the Kanban is consistent, and adjust the style and size of child elements.

[0083] It should be noted that when the user inputs an initial chart, the client can also optimize the layout and colors of the initial chart based on the determined primary color, background color, category color, sequence color, and divergence color, thereby outputting an optimized report chart. For ease of understanding, this manual provides a diagram illustrating the chart enhancement process, such as... Figure 2 As shown.

[0084] Figure 2 This is a schematic diagram illustrating a chart beautification process provided in this manual.

[0085] The client can first preprocess the materials based on a pre-acquired material library, then train the classification model. After deploying the classification model, the client can determine the main color and background color of the report chart based on the chart data input by the user, and then render each element in the report chart according to the main color and background color, thereby generating the report chart.

[0086] As can be seen from the above method, after the user uploads the chart data, the client can automatically determine the main color of the chart based on the content of the chart data, and determine the background color of the chart based on whether the geographic information component is called. Then, based on the main color and background color determined by the chart content, the client renders each element in the chart, making the chart more compatible with the business scenario, improving the aesthetics of the report chart, and ensuring the efficiency of report chart generation.

[0087] The above describes one or more methods for generating report charts in this specification. Based on the same approach, this specification also provides corresponding report chart generation devices, such as... Figure 3 As shown.

[0088] Figure 3 A schematic diagram of a report chart generation device provided in this specification includes:

[0089] The acquisition module 301 is used to acquire the chart data input by the user;

[0090] The identification module 302 is used to identify the chart data and determine whether the chart data contains a theme mark. If so, the main color of the report chart is determined according to the hue corresponding to the theme mark. Otherwise, the chart data is input into a pre-trained classification model to determine the industry field to which the chart data belongs through the classification model, and the main color is determined according to the industry field. The main color is used to characterize the hue, saturation and brightness of the color that accounts for the largest proportion in the foreground color of the report chart.

[0091] The determining module 303 is used to determine a first background color based on the hue corresponding to the main color if a call instruction corresponding to the geographic information component is received, and set the background color of the report chart to the first background color; otherwise, set the background color of the report chart to a second background color, wherein the color depth of the first background color is greater than the color depth of the second background color.

[0092] The rendering module 304 is used to render each element contained in the chart data according to the background color and the main color of the report chart to generate the report chart.

[0093] Optionally, the rendering module 304 is specifically used to: determine the target color value corresponding to the main color; select color values ​​at specified angular intervals on a preset color wheel with the target color value as the origin; determine the category colors of the report chart based on the selected color values, wherein the category colors are used to distinguish different things in the same element; and render each element contained in the chart data based on the background color of the report chart, the main color, and the category colors to generate the report chart.

[0094] Optionally, the rendering module 304 is specifically used to: determine the complementary color and contrasting color corresponding to the primary color; determine the diverging color corresponding to the report chart based on the complementary color and the contrasting color, wherein the diverging color is used to distinguish different things with relative relationships in the same element; and render each element contained in the chart data based on the background color of the report chart, the primary color, and the diverging color to generate the report chart.

[0095] Optionally, the rendering module 304 is specifically configured to: determine sequential monochrome based on the change in the primary color's gradation, and determine sequential polycolor based on the change in the gradation of the primary color's contrasting color; determine the sequential color corresponding to the report chart based on the sequential monochrome and sequential polycolor, wherein the sequential color is used to render elements with continuous gradient changes; and render each element contained in the chart data based on the background color of the report chart, the primary color, the diverging color, and the sequential color to generate the report chart.

[0096] Optionally, the rendering module 304 is specifically configured to, for each element in the report chart, if the background color of the report chart is the first background color, set the hue corresponding to the element to the hue corresponding to the main color; if the background color of the report chart is the second background color, set a border for the element, and determine the hue corresponding to the border according to the hue corresponding to the main color.

[0097] Optionally, the rendering module 304 is specifically configured to: if the background color of the report chart is the first background color, then set the color corresponding to the text in the report chart to white with a specified transparency; if the background color of the report chart is the second background color, then set the color corresponding to the text in the report chart to gray with the hue corresponding to the primary color.

[0098] Optionally, the rendering module 304 is further configured to determine the style of each element in the report chart based on the background color, and to determine the position and size of each element in the report chart based on the size of the current Kanban container.

[0099] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 This provides a method for generating report charts.

[0100] This instruction manual also provides Figure 4 The one shown corresponds to Figure 1 A schematic diagram of the structure of an electronic device. (e.g.) Figure 4 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The method for generating the report charts described above. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0101] Improvements in a technology can be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many improvements to the methodology can now be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that an improvement in methodology cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog are the most commonly used. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0102] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0103] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0104] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

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

[0106] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. 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, create a machine 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.

[0107] 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.

[0108] 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.

[0109] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0110] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0111] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0112] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

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

[0114] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0115] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0116] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for generating report charts, characterized in that, include: Obtain the chart data input by the user; The chart data is identified to determine whether it contains a theme marker. If so, the primary color of the report chart is determined based on the hue corresponding to the theme marker. Otherwise, the chart data is input into a pre-trained classification model to determine the industry sector to which the chart data belongs, and the primary color is determined based on the industry sector. The primary color is used to characterize the hue, saturation, and brightness of the color that accounts for the largest proportion in the foreground color of the report chart. If a call instruction corresponding to the geographic information component is received, the first background color is determined according to the hue corresponding to the main color, and the background color of the report chart is set to the first background color; otherwise, the background color of the report chart is set to the second background color, and the color depth of the first background color is greater than the color depth of the second background color. The report chart is generated by rendering each element in the chart data based on the background color and the primary color of the report chart. Specifically, a target color value corresponding to the primary color is determined, and color values ​​are selected at specified angular intervals on the color wheel with the target color value as the origin. The selected color values ​​are used to determine the category colors of the report chart, and each element in the chart data is rendered based on the background color, the primary color, and the category colors. The category colors are used to distinguish different things within the same element.

2. The method as described in claim 1, characterized in that, The report chart is generated by rendering each element in the chart data according to the background color and the main color of the report chart, specifically including: Determine the complementary and contrasting colors corresponding to the primary color; The divergent color corresponding to the report chart is determined based on the complementary color and the contrasting color. The divergent color is used to distinguish different things with relative relationships within the same element. The report chart is generated by rendering each element contained in the chart data according to the background color, the main color, and the diverging color of the report chart.

3. The method as described in claim 2, characterized in that, The report chart is generated by rendering each element in the chart data according to the background color and the main color of the report chart, specifically including: Based on the changes in the primary color gradation, the sequential monochromatic color is determined, and based on the changes in the gradation of the complementary color of the primary color, the sequential polychromatic color is determined. Based on the sequential monochrome and sequential multicolor, the sequential color corresponding to the report chart is determined, and the sequential color is used to render elements with continuous gradient changes; The report chart is generated by rendering each element contained in the chart data according to the background color, the primary color, the diverging color, and the sequential color of the report chart.

4. The method as described in claim 1, characterized in that, Rendering each element in the chart data according to the background color and main color of the report chart specifically includes: For each element in the report chart, if the background color of the report chart is the first background color, then the hue corresponding to that element is set to the hue corresponding to the main color; If the background color of the report chart is the second background color, then a border is set for the element, and the hue of the border is determined according to the hue corresponding to the main color.

5. The method as described in claim 1, characterized in that, Rendering each element in the chart data according to the background color and main color of the report chart specifically includes: If the background color of the report chart is the first background color, then the color corresponding to the text in the report chart is set to white with a specified transparency; If the background color of the report chart is the second background color, then the color corresponding to the text in the report chart is set to gray with the hue corresponding to the primary color.

6. The method as described in claim 1, characterized in that, The method further includes: Based on the background color, determine the style of each element in the report chart, and based on the size of the current Kanban container, determine the position and size of each element in the report chart.

7. A device for generating report charts, characterized in that, include: The module retrieves the chart data input by the user. The identification module identifies the chart data and determines whether the chart data contains a theme marker. If so, it determines the main color of the report chart based on the hue corresponding to the theme marker. Otherwise, it inputs the chart data into a pre-trained classification model to determine the industry sector to which the chart data belongs and determines the main color based on the industry sector. The main color is used to characterize the hue, saturation, and brightness of the color that accounts for the largest proportion in the foreground color of the report chart. If the determination module receives a call instruction corresponding to the geographic information component, it determines the first background color based on the hue corresponding to the main color and sets the background color of the report chart to the first background color; otherwise, it sets the background color of the report chart to the second background color, wherein the color depth of the first background color is greater than the color depth of the second background color. The rendering module renders each element in the chart data according to the background color and the primary color of the report chart to generate the report chart. Specifically, it determines the target color value corresponding to the primary color, selects color values ​​at specified angular intervals on the color wheel with the target color value as the origin, determines the category colors of the report chart based on the selected color values, and renders each element in the chart data according to the background color, the primary color, and the category colors. The category colors are used to distinguish different things within the same element.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 6.